snake: correct rolled_up window state handling

git-svn-id: svn://kolibrios.org@2061 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2011-08-18 17:30:58 +00:00
parent e4ca2a0ae9
commit 41ce17015f
5 changed files with 34 additions and 16 deletions

View File

@ -19,14 +19,15 @@ First_menu:
call Set_geometry
mcall 12,1
mcall 0, , ,[window_style], ,window_title
test [proc_info.wnd_state], 0x04 ; is rolled up?
jnz @f
call Draw_decorations
call Draw_first_menu_picture
call Draw_menu_strings
call Draw_buttons
@@:
mcall 12,2
.still:
mcall 10 ; wait for event
; ok, what an event?
@ -309,4 +310,4 @@ Set_first_level_of_play_mode:
;;---Set_first_level_of_play_mode-------------------------------------------------------------------------------------------
;;---Some_functions-------------------------------------------------------------------------------------------------------------
;;---Some_functions-------------------------------------------------------------------------------------------------------------

View File

@ -36,13 +36,14 @@ Game_over:
call Set_geometry
mcall 12,1
mcall 0, , ,[window_style], ,window_title
test [proc_info.wnd_state], 0x04 ; is rolled up?
jnz @f
call Draw_decorations
call Draw_game_over_picture
call Draw_game_over_strings ; edit_box is here
mcall 12,2
@@:
.still:
mcall 10 ; wait for event
; ok, what an event?
@ -194,4 +195,4 @@ Score_and_name_store:
;;---Name_store------------------------------------------------------------------------------------------------------------
;;---Some_functions------------------------------------------------------------------------------------------------------------
;;---Some_functions------------------------------------------------------------------------------------------------------------

View File

@ -19,13 +19,14 @@ mcall 26, 9
call Set_geometry
mcall 12,1
mcall 0, , ,[window_style], ,window_title
test [proc_info.wnd_state], 0x04 ; is rolled up?
jnz Pause_mode
call Draw_decorations
call Draw_stones
call Draw_snake
call Draw_eat
call Draw_level_strings
mcall 12,2
.still:
@ -844,4 +845,4 @@ Draw_lives_in_head:
;;---Draw_lives_in_head----------------------------------------------------------------------------------------------------
;;---Some_functions------------------------------------------------------------------------------------------------------------
;;---Some_functions------------------------------------------------------------------------------------------------------------

View File

@ -12,14 +12,14 @@ Pause_mode:
call Set_geometry
mcall 12,1
mcall 0, , ,[window_style], ,window_title
test [proc_info.wnd_state], 0x04 ; is rolled up?
jnz @f
call Draw_decorations
call Draw_pause_picture
call Draw_pause_strings
mcall 12,2
@@:
.still:
mcall 10 ; wait for event
; ok, what an event?
@ -95,4 +95,4 @@ Draw_pause_strings:
;;---Draw_pause_strings------------------------------------------------------------------------------------------------
;;---Some_functions------------------------------------------------------------------------------------------------------------
;;---Some_functions------------------------------------------------------------------------------------------------------------

View File

@ -12,7 +12,7 @@ include '../../../macros.inc'
include '../../../system/launch/trunk/mem.inc'
include '../../../develop/libraries/libs-dev/.test/dll.inc'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../../system/board/trunk/debug.inc'
;include '../../../system/board/trunk/debug.inc'
;;===Define_chapter============================================================================================================
@ -188,7 +188,7 @@ align 4
mov eax, WINDOW_MODE_WINDOWED
call Set_window_mode
mcall 0,0,0,0x51000000 ; create empty window. Set_geometry will set all parameters
mcall 0,0,0,[window_style_windowed] ; create empty window. Set_geometry will set all parameters
call Set_geometry.by_hotkey
mcall 71,1,window_title
@ -249,6 +249,14 @@ Set_geometry:
jnz .by_hotkey
mcall 9,proc_info,-1
test [proc_info.wnd_state], 0x04 ; is rolled up?
jz @f
mov eax, [proc_info.box.width]
mov [window_width], eax
mov eax, [proc_info.box.height]
mov [window_height], eax
jmp .quit
@@:
mov eax, [proc_info.box.width]
cmp eax, [window_width]
jne @f
@ -328,7 +336,14 @@ Set_geometry:
.by_hotkey:
mcall 9,proc_info,-1
mov [resized_by_hotkey], 0
test [proc_info.wnd_state], 0x04 ; is rolled up?
jz @f
mov eax, [proc_info.box.width]
mov [window_width], eax
mov eax, [proc_info.box.height]
mov [window_height], eax
jmp .quit
@@:
mov eax, [square_side_length]
inc eax ; space between squares
mov [g_s], eax