6,9 → 6,15 |
mov eax, [time_wait_limit] |
mov [time_to_wait], eax |
|
Pause_Redraw_window: |
.redraw: |
mcall 12,1 |
mcall 0,200*65536+WINDOW_WIDTH,326*65536+WINDOW_HEIGHT,[window_style], ,window_title |
mov ebx, [wp_x] |
shl ebx, 16 |
add ebx, dword[window_width] |
mov ecx, [wp_y] |
shl ecx, 16 |
add ecx, dword[window_height] |
mcall 0, , ,[window_style], ,window_title |
|
call Draw_decorations |
call Draw_pause_picture |
17,16 → 23,16 |
mcall 12,2 |
|
|
Pause_Wait_for_event: |
.still: |
mcall 10 ; wait for event |
; ok, what an event? |
dec al ; has the window been moved or resized? |
jz Pause_Redraw_window |
jz .redraw |
dec al ; was a key pressed? |
jz Pause_Is_key |
jz .key |
|
|
Pause_Is_button: ; a button was pressed |
.button: ; a button was pressed |
mcall 17 ; get button number |
shr eax, 8 ; we should do it to get the real button code |
|
33,10 → 39,10 |
cmp eax, 1 |
je Exit |
|
jmp Pause_Wait_for_event |
jmp .still |
|
|
Pause_Is_key: ; a key was pressed |
.key: ; a key was pressed |
mcall 2 ; get keycode |
|
cmp ah, 0x1B ; Escape - go to menu |
44,7 → 50,7 |
cmp ah, 0x20 ; Space - resume game |
je Level_body |
|
jmp Pause_Wait_for_event |
jmp .still |
|
;;---Pause_mode---------------------------------------------------------------------------------------------------------------- |
|
54,10 → 60,10 |
Draw_pause_picture: |
;;===Draw_pause_picture======================================================================================================== |
|
mov al, 6 |
mov bh, 2 |
mov ecx, picture_pause |
mov ax, 0*0x100+29 |
mov cx, 4*0x100+6 |
mov edx, [pause_picture_color] |
mov esi, picture_pause |
call Draw_picture |
|
ret |
68,7 → 74,12 |
Draw_pause_strings: |
;;===Draw_pause_strings================================================================================================ |
|
mcall 4,219*65536+BOTTOM_MIDDLE_STRINGS,[navigation_strings_color],string_resume_space ; Show 'RESUME - SPACE' string |
mov ebx, [window_width] |
shr ebx, 1 |
sub ebx, (string_menu_esc-string_resume_space-1)*3+6 |
shl ebx, 16 |
add ebx, dword[bottom_middle_strings] |
mcall 4, ,[navigation_strings_color],string_resume_space ; Show 'RESUME - SPACE' string |
|
call Draw_menu_esc ; Show 'MENU - ESC' string |
|