From 72eb0b5fb724b46b645c63edfdf87d1447253bdd Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Sun, 24 Oct 2010 19:11:32 +0000 Subject: [PATCH] snake: version 0.7 git-svn-id: svn://kolibrios.org@1677 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/games/snake/trunk/first_menu.asm | 30 +- programs/games/snake/trunk/game_over.asm | 18 +- programs/games/snake/trunk/level.asm | 226 ++- programs/games/snake/trunk/pause.asm | 22 +- programs/games/snake/trunk/snake.asm | 1561 ++++++++++++++++----- programs/games/snake/trunk/snake.ini | 46 +- 6 files changed, 1486 insertions(+), 417 deletions(-) diff --git a/programs/games/snake/trunk/first_menu.asm b/programs/games/snake/trunk/first_menu.asm index 611ba05775..6c31991515 100644 --- a/programs/games/snake/trunk/first_menu.asm +++ b/programs/games/snake/trunk/first_menu.asm @@ -1,21 +1,23 @@ ;;===First_menu_mode=========================================================================================================== First_menu: + mov byte[window_title+5], 0 + mcall 71,1,window_title mcall 40,111b ; set events: standart + mcall 66,1,1 ; set scan codes mode for keyboard mov [is_new_record], 0 + mov [lives], START_LIVES call Show_cursor mov [score], 0 call Set_first_level_of_play_mode + mov ebx, [time_wait_limit_const] + mov [time_wait_limit], ebx + .redraw: + call Set_geometry mcall 12,1 - 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 @@ -68,16 +70,26 @@ First_menu: .key: ; a key was pressed mcall 2 ; get keycode - cmp ah, 0x1B ; Escape + cmp ah, 0x01 ; Escape je Save_do_smth_else_and_exit - cmp ah, 0x0D ; Enter + cmp ah, 0x1C ; Enter je Level_begin - cmp ah, 0x20 ; Space + cmp ah, 0x39 ; Space jne @f call Change_play_mode call Delete_buttons call Draw_buttons jmp .still ; jump to wait for another event + @@: + cmp ah, [shortcut_increase] + jne @f + call Increase_geometry + jmp .redraw + @@: + cmp ah, [shortcut_decrease] + jne @f + call Decrease_geometry + jmp .redraw @@: jmp .still ; jump to wait for another event diff --git a/programs/games/snake/trunk/game_over.asm b/programs/games/snake/trunk/game_over.asm index cd2ab6b64b..322fa6b9f3 100644 --- a/programs/games/snake/trunk/game_over.asm +++ b/programs/games/snake/trunk/game_over.asm @@ -2,6 +2,17 @@ Game_over: + cmp [play_mode], LEVELS_MODE + jne @f + dec [lives] + jz @f + call Draw_splash + jmp Level_begin + @@: + + mov byte[window_title+5], 0 + mcall 71,1,window_title + mcall 66,1,0 ; set ascii mode for keyboard call Show_cursor mov ebx, [score] @@ -22,13 +33,8 @@ Game_over: mcall 40,100111b ; set events: standart + mouse .redraw: + call Set_geometry mcall 12,1 - 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 diff --git a/programs/games/snake/trunk/level.asm b/programs/games/snake/trunk/level.asm index acbe301349..33fd6a0534 100644 --- a/programs/games/snake/trunk/level.asm +++ b/programs/games/snake/trunk/level.asm @@ -4,6 +4,7 @@ Level_begin: call Load_level call Get_eat + mcall 66,1,1 ; set scan codes mode for keyboard Level_body: ;;===Level_body======================================================================================================== @@ -15,13 +16,8 @@ mcall 26, 9 mov [time_to_wait], eax .redraw: + call Set_geometry mcall 12,1 - 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 @@ -70,26 +66,83 @@ mcall 26, 9 shr eax, 8 ; сдвигаем регистр eax на 8 бит вправо, чтобы получить номер нажатой кнопки cmp eax, 1 - je Save_do_smth_else_and_exit ; если это не кнопка 1 (зарезервирована системой как кнопка закрытия программы), пропускаем 2 следующие строчки кода + je Save_do_smth_else_and_exit jmp .still .key: mcall 2 ; get keycode - - cmp ah, 0x1B ; Escape + +;pushf +;pusha +;movzx eax, ah +;dph eax +;newline +;popa +;popf + + cmp ah, 0x01 ; Escape je First_menu - cmp ah, 0x20 ; Space + cmp ah, 0x39 ; Space je Pause_mode - cmp ah, 0xB0 ; Left + cmp ah, 0x4B ; Left je .key.left - cmp ah, 0xB1 ; Down + cmp ah, [shortcut_move_left] ; Left + je .key.left + cmp ah, 0x50 ; Down je .key.down - cmp ah, 0xB2 ; Up + cmp ah, [shortcut_move_down] ; Down + je .key.down + cmp ah, 0x48 ; Up je .key.up - cmp ah, 0xB3 ; Right + cmp ah, [shortcut_move_up] ; Up + je .key.up + cmp ah, 0x4D ; Right je .key.right + cmp ah, [shortcut_move_right] ; Right + je .key.right + + cmp ah, 0x4B+0x80 ; Left released + je .key.released.left + mov al, [shortcut_move_left] + add al, 0x80 + cmp ah, al ; Left released + je .key.released.left + cmp ah, 0x50+0x80 ; Down released + je .key.released.down + mov al, [shortcut_move_down] + add al, 0x80 + cmp ah, al ; Down released + je .key.released.down + cmp ah, 0x48+0x80 ; Up released + je .key.released.up + mov al, [shortcut_move_up] + add al, 0x80 + cmp ah, al ; Up released + je .key.released.up + cmp ah, 0x4D+0x80 ; Right released + je .key.released.right + mov al, [shortcut_move_right] + add al, 0x80 + cmp ah, al ; Right released + je .key.released.right + + cmp ah, [shortcut_reverse] + jne @f + call Reverse_snake + jmp .still + @@: + cmp ah, [shortcut_increase] + jne @f + call Increase_geometry + jmp .redraw + @@: + cmp ah, [shortcut_decrease] + jne @f + call Decrease_geometry + jmp .redraw + @@: jmp .still ; jump to wait for another event @@ -98,32 +151,77 @@ mcall 26, 9 bts [action], 0 jc @f mov [time_to_wait], 0 + @@: + cmp [smart_reverse], 1 + jne @f + cmp [snake_direction], RIGHT + je .still @@: mov [snake_direction_next], LEFT + bts [acceleration_mask], LEFT + jc Game_step jmp .still .key.down: bts [action], 0 jc @f mov [time_to_wait], 0 + @@: + cmp [smart_reverse], 1 + jne @f + cmp [snake_direction], UP + je .still @@: mov [snake_direction_next], DOWN + bts [acceleration_mask], DOWN + jc Game_step jmp .still .key.up: bts [action], 0 jc @f mov [time_to_wait], 0 + @@: + cmp [smart_reverse], 1 + jne @f + cmp [snake_direction], DOWN + je .still @@: mov [snake_direction_next], UP + bts [acceleration_mask], UP + jc Game_step jmp .still .key.right: bts [action], 0 jc @f mov [time_to_wait], 0 + @@: + cmp [smart_reverse], 1 + jne @f + cmp [snake_direction], LEFT + je .still @@: mov [snake_direction_next], RIGHT + bts [acceleration_mask], RIGHT + jc Game_step + jmp .still + + + .key.released.left: + btr [acceleration_mask], LEFT + jmp .still + + .key.released.down: + btr [acceleration_mask], DOWN + jmp .still + + .key.released.up: + btr [acceleration_mask], UP + jmp .still + + .key.released.right: + btr [acceleration_mask], RIGHT jmp .still @@ -256,6 +354,7 @@ Draw_head_prehead: mov bx, [esi] mov edx, [snake_color] call Draw_square + call Draw_lives_in_head ret @@ -349,7 +448,7 @@ Get_eat: ;; out : ;; ax = coord's of the eat square (al=x, ah=y) ;; - + mcall 26,9 ; xor eax, esp shl eax, 1 @@ -502,8 +601,28 @@ Snake_move: mov cl, 1 call Draw_on_map call Draw_head_prehead + + cmp [play_mode], CLASSIC_MODE + jne .is_not_classic_mode + dec byte[speed_up_counter] + jns @f + mov al, byte[speed_up_counter+1] + mov byte[speed_up_counter], al + cmp [time_wait_limit], 4 + jl @f + dec [time_wait_limit] + @@: + + .is_not_classic_mode: + cmp [play_mode], LEVELS_MODE + jne .is_not_levels_mode + cmp [snake_length_x2], (EAT_TO_END_LEVEL+3)*2 + je .skip + + .is_not_levels_mode: call Get_eat call Draw_eat + .skip: jmp Keys_done @@ -519,6 +638,7 @@ Snake_move: pop ax call Get_from_map + test bl, bl jnz Game_over @@ -606,17 +726,26 @@ Draw_splash: dec cl cmp cl, 0 - jl @f + jl .picture push eax ebx mcall 5,PAUSE_WHILE_DRAWING_SPLASH + mcall 2 + cmp ah, 0x39 ; Space + jne @f pop ebx eax - - jmp .draw + jmp .quit @@: + cmp ah, 0x1C ; Enter + jne @f + pop ebx eax + jmp .quit + @@: + pop ebx eax + jmp .draw - + .picture: mov ax, 2*0x100+24 mov cx, 1*0x100+5 mov edx, [splash_level_string_color] @@ -632,7 +761,7 @@ Draw_splash: @@: test al, al jz @f - add esi, 20 + add esi, 5 dec al jmp @b @@: @@ -647,7 +776,7 @@ Draw_splash: @@: test ah, ah jz @f - add esi, 20 + add esi, 5 dec ah jmp @b @@: @@ -657,11 +786,62 @@ Draw_splash: mov edx, [splash_level_number_color] call Draw_picture - mcall 5,PAUSE_BETWEEN_LEVELS - + mcall 26,9 + mov [time_before_waiting], eax + mov [time_to_wait], PAUSE_BETWEEN_LEVELS + @@: + mcall 23,[time_to_wait] + mcall 2 + cmp ah, 0x39 ; Space + je .quit + cmp ah, 0x1C ; Enter + je .quit + mcall 26,9 + push eax + sub eax, [time_before_waiting] + pop [time_before_waiting] + sub [time_to_wait], eax + jns @b + .quit: ret ;;---Draw_splash----------------------------------------------------------------------------------------------------------- +Draw_lives_in_head: + ;;===Draw_lives_in_head==================================================================================================== + + cmp [play_mode], LEVELS_MODE + jne .quit + test [show_lives_style], 2 + jz .quit + mov eax, snake_dots-2 + add eax, [snake_length_x2] + mov ax, word[eax] + + mov bl, ah + mul byte[g_s] + mov edx, [gbxm1] + add dx, ax + shl edx, 16 + mov al, bl + mul byte[g_s] + mov dx, word[gbym1] + add dx, ax + + mov eax, [g_s] + shl eax, 16 + add eax, [g_s] + and eax, 0xfffefffe + shr eax, 1 + add edx, eax + sub edx, 0x00020003 + mcall 47,0x80010001,lives,,[lives_in_head_number_color] + + .quit: + ret + + ;;---Draw_lives_in_head---------------------------------------------------------------------------------------------------- + + ;;---Some_functions------------------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/programs/games/snake/trunk/pause.asm b/programs/games/snake/trunk/pause.asm index 6879976641..f61b6a98bd 100644 --- a/programs/games/snake/trunk/pause.asm +++ b/programs/games/snake/trunk/pause.asm @@ -2,19 +2,15 @@ Pause_mode: + mcall 66,1,1 ; set scan codes mode for keyboard call Show_cursor mov [action], 0 mov eax, [time_wait_limit] mov [time_to_wait], eax .redraw: + call Set_geometry mcall 12,1 - 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 @@ -46,10 +42,20 @@ Pause_mode: .key: ; a key was pressed mcall 2 ; get keycode - cmp ah, 0x1B ; Escape - go to menu + cmp ah, 0x01 ; Escape - go to menu je First_menu - cmp ah, 0x20 ; Space - resume game + cmp ah, 0x39 ; Space - resume game je Level_body + cmp ah, [shortcut_increase] + jne @f + call Increase_geometry + jmp .redraw + @@: + cmp ah, [shortcut_decrease] + jne @f + call Decrease_geometry + jmp .redraw + @@: jmp .still diff --git a/programs/games/snake/trunk/snake.asm b/programs/games/snake/trunk/snake.asm index baf324a6a2..f1d2f34a63 100644 --- a/programs/games/snake/trunk/snake.asm +++ b/programs/games/snake/trunk/snake.asm @@ -12,10 +12,13 @@ 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============================================================================================================ +WINDOW_MODE_WINDOWED equ 0 +WINDOW_MODE_FULLSCREEN equ 1 + GRID_WIDTH equ 28 GRID_HEIGHT equ 14 @@ -29,11 +32,12 @@ UP equ 2 RIGHT equ 3 struct LEVEL - field db GRID_WIDTH*GRID_HEIGHT dup (?) + field db 4*GRID_HEIGHT dup (?) snake_dots db 6 dup (?) snake_direction dd ? snake_direction_next dd ? number_of_stones dd ? + name dd ? ends CLASSIC_MODE equ 0 @@ -42,12 +46,14 @@ LEVELS_MODE equ 1 CLASSIC_MODE_FIRST_LEVEL equ 0 LEVELS_MODE_FIRST_LEVEL equ 1 -EAT_TO_END_LEVEL equ 12 -PAUSE_BETWEEN_LEVELS equ 250 -PAUSE_WHILE_DRAWING_SPLASH equ 4 +EAT_TO_END_LEVEL equ 7 +PAUSE_BETWEEN_LEVELS equ 200 +PAUSE_WHILE_DRAWING_SPLASH equ 3 CHAMPION_NAME_LENGTH equ 15 -LAST_LEVEL_NUMBER equ 12 +LAST_LEVEL_NUMBER equ 36 + +START_LIVES equ 3 ;;---Define_chapter------------------------------------------------------------------------------------------------------------ @@ -59,31 +65,59 @@ stdcall dll.Load,@IMPORT align 4 - mov eax, cur_dir_path - @@: - cmp byte[eax], 0 - jz @f - inc eax - jmp @b - @@: - mov dword[eax], '.ini' + mov edi, cur_dir_path + mov al, 0 + mov ecx, 4096 + repne scasb + mov dword[edi-1], '.ini' invoke ini.get_int, cur_dir_path, aPreferences, aSpeed, 80 neg eax add [time_wait_limit], eax + mov ebx, [time_wait_limit] + mov [time_wait_limit_const], ebx + sub ebx, 4 + mov eax, 200 + div bl + mov byte[speed_up_counter], al + mov byte[speed_up_counter+1], al invoke ini.get_str, cur_dir_path, aPreferences, aTheme, aTheme_name, 31, aTheme_name + invoke ini.get_int, cur_dir_path, aPreferences, aSmart_reverse, 0 + mov [smart_reverse], eax + invoke ini.get_int, cur_dir_path, aPreferences, aShow_lives_style, 2 + mov [show_lives_style], eax + invoke ini.get_int, cur_dir_path, aPreferences, aDraw_level_name_in_window_title, 1 + mov [draw_level_name_in_window_title], eax + invoke ini.get_str, cur_dir_path, aPreferences, aSeparating_symbol, separating_symbol, 3, default_separating_symbol - invoke ini.get_int, cur_dir_path, aTheme_name, aDecorations, 2 + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aMove_left, 0x23, 0 + mov [shortcut_move_left], al + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aMove_down, 0x24, 0 + mov [shortcut_move_down], al + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aMove_up, 0x25, 0 + mov [shortcut_move_up], al + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aMove_right, 0x26, 0 + mov [shortcut_move_right], al + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aReverse, 0x0F, 0 + mov [shortcut_reverse], al + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aIncrease, 0x16, 0 + mov [shortcut_increase], al + invoke ini.get_shortcut, cur_dir_path, aShortcuts, aDecrease, 0x17, 0 + mov [shortcut_decrease], al + + invoke ini.get_int, cur_dir_path, aTheme_name, aDecorations, 3 mov [decorations], eax invoke ini.get_color, cur_dir_path, aTheme_name, aBackground_color, 0x000000 or [background_color], eax - or [window_style], eax + or [window_style_windowed], eax invoke ini.get_color, cur_dir_path, aTheme_name, aDecorations_color, 0xAAAA00 or [decorations_color], eax invoke ini.get_color, cur_dir_path, aTheme_name, aSnake_color, 0x1111ff or [snake_color], eax invoke ini.get_color, cur_dir_path, aTheme_name, aSnake_head_color, 0x6B6Bff or [snake_head_color], eax + invoke ini.get_color, cur_dir_path, aTheme_name, aLives_in_head_number_color, 0xff8800 + or [lives_in_head_number_color], eax invoke ini.get_color, cur_dir_path, aTheme_name, aSnake_picture_color, 0x4488ff or [snake_picture_color], eax invoke ini.get_color, cur_dir_path, aTheme_name, aVersion_picture_color, 0x55ff55 @@ -152,7 +186,11 @@ align 4 mcall 37,4,cursor_data,2 ; load empty cursor (for "hiding" cursor while level_mode) mov [cursor_handle], eax - call Set_geometry + mov eax, WINDOW_MODE_WINDOWED + call Set_window_mode + mcall 0,0,0,0x51000000 ; create empty window. Set_geometry will set all parameters + call Set_geometry.by_hotkey + mcall 71,1,window_title include 'first_menu.asm' ; First menu body and functions include 'level.asm' ; Level body and functions (game process) @@ -204,6 +242,93 @@ Exit: Set_geometry: ;;===Set_geometry========================================================================================================== + cmp [resized_by_hotkey], 1 + je .by_hotkey + + test [proc_info.wnd_state], 0x01 + jnz .by_hotkey + + mcall 9,proc_info,-1 + mov eax, [proc_info.box.width] + cmp eax, [window_width] + jne @f + mov eax, [proc_info.box.height] + cmp eax, [window_height] + jne @f + jmp .quit + @@: + mov eax, [proc_info.box.width] + mov [window_width], eax + mov eax, [proc_info.box.height] + mov [window_height], eax + + .by_mouse: ; or any other kind of resizing. for example, double click on window title + + test [proc_info.wnd_state], 0x01 + jnz .by_hotkey + + + cmp [window_width], 250 + jnl @f + mov [window_width], 250 + @@: + cmp [window_height], 150 + jnl @f + mov [window_height], 150 + @@: + + mcall 48,4 + mov ecx, [window_height] + sub ecx, eax + sub ecx, 5 + sub ecx, [g_e] + sub ecx, [g_e] + sub ecx, 25+30 + mov esi, ecx + + mov eax, [window_width] + sub eax, 5+5 + sub eax, [g_e] + sub eax, [g_e] + sub eax, [g_s] + sub eax, [g_s] + mov edi, eax + + mov dx, 0 + div cx + cmp ax, 2 + jl .fit_to_width + + .fit_to_height: + mov eax, esi + mov ebx, GRID_HEIGHT + div bl + cmp al, MIN_SQUARE_SIDE_LENGTH + jnl @f + mov al, MIN_SQUARE_SIDE_LENGTH + @@: + dec al + mov byte[square_side_length], al + jmp .by_hotkey + + .fit_to_width: + mov eax, edi + mov ebx, GRID_WIDTH + div bl + cmp al, MIN_SQUARE_SIDE_LENGTH + jnl @f + mov al, MIN_SQUARE_SIDE_LENGTH + @@: + dec al + mov byte[square_side_length], al + jmp .by_hotkey + +; jmp .done + + .by_hotkey: + mcall 9,proc_info,-1 + mov [resized_by_hotkey], 0 + mov eax, [square_side_length] inc eax ; space between squares mov [g_s], eax @@ -215,14 +340,6 @@ Set_geometry: add eax, ebx mov [g_e], eax - mov eax, [g_s] - add eax, [g_e] - mov [gbxm1], eax - - mov eax, [g_e] - add eax, 25 - mov [gbym1], eax - mov edx, GRID_WIDTH mov eax, [g_s] mul dx @@ -233,13 +350,42 @@ Set_geometry: mul dx mov [gh_mul_gs], eax - mov eax, [gbxm1] - add eax, [gw_mul_gs] - mov [gbxm1_plus_gw_mul_gs], eax + mov eax, [gw_mul_gs] + add eax, [g_s] + add eax, [g_s] + add eax, [g_e] + add eax, [g_e] + add eax, 5*2 ; skin width + mov esi, eax + test [proc_info.wnd_state], 0x01 + cmovnz eax, [proc_info.box.width] + mov [window_width], eax - mov eax, [gbym1] + sub eax, [gw_mul_gs] + sub eax, 5*2 + shr eax, 1 + mov [gbxm1], eax + + mcall 48,4 ; get skin header height + mov ebx, eax add eax, [gh_mul_gs] - mov [gbym1_plus_gh_mul_gs], eax + add eax, [g_e] + add eax, 25 + add eax, [g_e] + add eax, 30 + add eax, 5 ; skin height (bottom part) + mov edi, eax + test [proc_info.wnd_state], 0x01 + cmovnz eax, [proc_info.box.height] + mov [window_height], eax + + sub eax, [gh_mul_gs] + sub eax, ebx + sub eax, 5 + sub eax, 5 + + shr eax, 1 + mov [gbym1], eax mov eax, [g_s] shl eax, 16 @@ -256,41 +402,34 @@ Set_geometry: add eax, [gbym1] mov [gbym1_shl16_gbym1], eax + mov eax, [gbxm1] + add eax, [gw_mul_gs] + mov [gbxm1_plus_gw_mul_gs], eax - mov eax, [gw_mul_gs] - add eax, [gbxm1] - add eax, [gbxm1] - add eax, 5*2 ; skin width - mov [window_width], eax - - mcall 48,4 ; get skin header height + mov eax, [gbym1] add eax, [gh_mul_gs] - add eax, [gbym1] - add eax, [g_e] - add eax, 30 - add eax, 5 ; skin height (bottom part) - mov [window_height], eax + mov [gbym1_plus_gh_mul_gs], eax mcall 48, 5 mov dx, ax shr eax, 16 sub dx, ax - cmp dx, word[window_width] ; does window fit to work area width? + cmp dx, si ; does window fit to work area width? jnl @f dec [square_side_length] - jmp Set_geometry + jmp Set_geometry.by_hotkey @@: mov cx, bx shr ebx, 16 sub cx, bx - cmp cx, word[window_height] ; does window fit to work area height? + cmp cx, di ; does window fit to work area height? jnl @f dec [square_side_length] - jmp Set_geometry + jmp Set_geometry.by_hotkey @@: - sub dx, word[window_width] + sub dx, si shr dx, 1 mov word[wp_x], dx sub cx, word[window_height] @@ -362,7 +501,10 @@ Set_geometry: mov [button_y_bottom], ecx + .done: + mcall 67,[wp_x],[wp_y],[window_width],[window_height] + .quit: ret ;;---Set_geometry------------------------------------------------------------------------------------------------------ @@ -372,8 +514,7 @@ Increase_geometry: ;;===Increase_geometry================================================================================================= inc [square_side_length] - call Set_geometry - mcall 67,[wp_x],[wp_y],[window_width],[window_height] + mov [resized_by_hotkey], 1 ret @@ -386,8 +527,7 @@ Decrease_geometry: cmp [square_side_length], MIN_SQUARE_SIDE_LENGTH je @f dec [square_side_length] - call Set_geometry - mcall 67,[wp_x],[wp_y],[window_width],[window_height] + mov [resized_by_hotkey], 1 @@: ret @@ -921,23 +1061,33 @@ Draw_picture: .draw: mov bl, ah + mov di, 7 .loop: - cmp byte[esi], 0 - jz @f - push eax ebx ecx esi + bt word[esi], di + jnc @f + push eax ebx ecx esi edi call Draw_square - pop esi ecx ebx eax + pop edi esi ecx ebx eax @@: + dec di + jns @f + mov di, 7 inc esi + @@: inc bl cmp bl, al jne .loop inc bh + cmp di, 7 + jz @f + inc esi + @@: cmp bh, cl jne .draw + ret ;;---Draw_picture------------------------------------------------------------------------------------------------------ @@ -951,8 +1101,6 @@ Draw_on_map: ;; cl = value to draw ;; - push eax ebx edx - and eax, 0x0000ffff xor bx, bx mov bl, al @@ -960,19 +1108,17 @@ Draw_on_map: mov dx, GRID_WIDTH mul dx add ax, bx - mov edx, field_map - add edx, eax - mov [edx], cl - - pop edx ebx eax + mov edi, field_map + add edi, eax + mov [edi], cl ret - ;;---Draw_on_map----------------------------------------------------------------------------------------------------------- + ;;---Draw_on_map------------------------------------------------------------------------------------------------------- Get_from_map: - ;;===Get_from_map========================================================================================================== + ;;===Get_from_map====================================================================================================== ;; in : ;; al = x coord ;; ah = y coord @@ -1011,18 +1157,78 @@ Load_level: @@: test al, al jz @f - add edx, 410 + add edx, stage_01-stage_00 dec al jmp @b @@: - + + mov esi, window_title_with_lives + mov edi, window_title+5 + + .lives_in_title: + cmp [play_mode], LEVELS_MODE + jne .level_name_in_title + test [show_lives_style], 1 + jz .level_name_in_title + mov [edi], byte ' ' + mov al, byte[separating_symbol] + mov [edi+1], byte al + mov [edi+2], byte ' ' + add edi, 3 + mov eax, [lives] + add al, 0x30 + mov [window_title_with_lives], al + mov ecx, 10 + rep movsb + dec edi + + .level_name_in_title: + cmp [draw_level_name_in_window_title], 1 + jne @f + mov [edi], byte ' ' + mov al, byte[separating_symbol] + mov [edi+1], byte al + mov [edi+2], byte ' ' + add edi, 3 + mov esi, edx + add esi, LEVEL.name + mov esi, [esi] + mov ecx, 16 + rep movsd + + @@: + mcall 71,1,window_title + mov [cur_level], edx mov esi, edx add esi, LEVEL.field mov edi, field_map - mov ecx, GRID_WIDTH*GRID_HEIGHT/4 - rep movsd + mov ecx, 2 + mov ah, GRID_HEIGHT + .begin: + mov ebx, 7 + mov al, GRID_WIDTH + .loop: + bt [esi], ebx + jnc @f + mov byte[edi], cl + jmp .skip + @@: + mov byte[edi], 0 + .skip: + dec ebx + jns @f + mov ebx, 7 + inc esi + @@: + inc edi + dec al + jnz .loop + inc esi + dec ah + jnz .begin + mov esi, edx add esi, LEVEL.snake_dots @@ -1099,30 +1305,77 @@ Show_cursor: ;;---Show_cursor----------------------------------------------------------------------------------------------------------- -;;---Some_functions------------------------------------------------------------------------------------------------------------- +Set_window_mode: + ;;===Set_window_mode======================================================================================================= + + test al, al + jnz .fullscreen + mov eax, [window_style_windowed] + jmp .quit + + .fullscreen: + mov eax, [window_style_fullscreen] + + .quit: + mov [window_style], eax + ret + +;;---Some_functions------------------------------------------------------------------------------------------------------------ + + +Reverse_snake: + ;;===Reverse_snake========================================================================================================= + + cmp [snake_direction], LEFT + jne @f + mov [snake_direction_next], RIGHT + jmp .quit + @@: + cmp [snake_direction], RIGHT + jne @f + mov [snake_direction_next], LEFT + jmp .quit + @@: + cmp [snake_direction], UP + jne @f + mov [snake_direction_next], DOWN + jmp .quit + @@: + cmp [snake_direction], DOWN + jne @f + mov [snake_direction_next], UP +; jmp .quit + @@: + + .quit: + ret + + ;;---Reverse_snake--------------------------------------------------------------------------------------------------------- ;;===Variables================================================================================================================== -window_title db 'Snake',0 -window_style dd 0x34000000 +window_title db 'Snake',64+15 dup (0) +window_title_with_lives db '_ live(s)',0 +default_separating_symbol db '|',0 +window_style_windowed dd 0x33000000 ; scalable skinned window +window_style_fullscreen dd 0x00000000 time_before_waiting dd 0x0 time_to_wait dd 0x0 time_wait_limit dd 101 +time_wait_limit_const dd 0x0 play_mode dd 0x0 +lives dd START_LIVES +acceleration_mask dd 0x0 -square_side_length dd 19 - -gbxm1 dd 30 -gbym1 dd 30 +resized_by_hotkey dd 0x0 +fullscreen dd 0x0 szZ string_score ,'SCORE : ' szZ string_hi_score ,'HI-SCORE : ' -;szZ string_player ,'PLAYER :' szZ string_champion ,'CHAMPION : ' szZ string_level ,'LEVEL : ' -;szZ string_hi_level ,'HI-LEVEL :' szZ string_pause_space ,'PAUSE - ',0x27,'SPACE',0x27 szZ string_resume_space ,'RESUME - ',0x27,'SPACE',0x27 szZ string_menu_esc ,'MENU - ',0x27,'ESC',0x27 @@ -1145,396 +1398,928 @@ is_new_record dd 0 action dd 0 -picture_first_menu_snake db 1,1,1,1,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,1,1,1,1,\ - 1,0,0,0,0,1,1,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,0,1,\ - 1,1,1,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1,\ - 0,0,0,1,0,1,0,1,1,0,1,1,1,1,0,1,0,1,0,0,1,0,0,0,\ - 1,1,1,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,1,1,1 - +picture_first_menu_snake db 0xf4,0x99,0x2f,\ + 0x86,0xa5,0x49,\ + 0xf5,0xa5,0x8f,\ + 0x15,0xbd,0x48,\ + 0xf4,0xa5,0x2f -picture_first_menu_version db 1,1,1,1,0,0,0,1,1,1,1,\ - 1,0,0,1,0,0,0,1,0,0,0,\ - 1,0,0,1,0,0,0,1,1,1,1,\ - 1,0,0,1,0,0,0,0,0,0,1,\ - 1,1,1,1,0,1,0,1,1,1,1 +picture_first_menu_version db 0xf1,0xe0,\ + 0x90,0x20,\ + 0x90,0x20,\ + 0x90,0x20,\ + 0xf4,0x20 -picture_pause db 1,1,1,0,0,0,1,1,0,0,1,0,0,1,0,1,1,1,1,0,1,1,1,1,\ - 1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,\ - 1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,\ - 1,1,1,0,0,1,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1,1,1,1,\ - 1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,\ - 1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,1,0,1,1,1,1 +picture_pause db 11100011b,00100101b,11101111b,\ + 10010100b,10100101b,00001000b,\ + 10010100b,10100101b,00001000b,\ + 11100111b,10100101b,11101111b,\ + 10000100b,10100100b,00101000b,\ + 10000100b,10011001b,11101111b -picture_game_over db 0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,1,0,0,1,0,0,1,1,1,0,0,1,0,0,0,1,0,1,1,1,1,0,0,0,0,\ - 1,0,0,0,0,0,1,0,0,0,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,\ - 1,0,0,1,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,0,0,\ - 1,0,0,0,1,0,1,1,1,1,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,\ - 0,1,1,1,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,1,1,1,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,1,1,1,0,1,1,1,1,0,\ - 0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,\ - 0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,1,0,0,0,1,\ - 0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,0,\ - 0,0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,1,1,1,0,1,0,0,0,1 +picture_game_over db 00110000b,00000000b,00000000b,00000000b,\ + 01001001b,11001000b,10111100b,00000000b,\ + 10000010b,00101101b,10100000b,00000000b,\ + 10011010b,00101010b,10111000b,00000000b,\ + 10001011b,11101000b,10100000b,00000000b,\ + 01110010b,00101000b,10111100b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000111b,00000000b,00000000b,00000000b,\ + 00001000b,10100010b,11110111b,10000000b,\ + 00001000b,10100010b,10000100b,01000000b,\ + 00001000b,10100010b,11100100b,01000000b,\ + 00001000b,10010100b,10000111b,10000000b,\ + 00000111b,00001000b,11110100b,01000000b -picture_you_win db 1,0,0,0,1,0,0,1,1,1,0,0,1,0,0,0,1,\ - 1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,\ - 0,1,0,1,0,0,1,0,0,0,1,0,1,0,0,0,1,\ - 0,0,1,0,0,0,1,0,0,0,1,0,1,0,0,0,1,\ - 0,0,1,0,0,0,0,1,1,1,0,0,0,1,1,1,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,1,0,0,0,1,0,0,1,0,0,1,0,0,0,1,0,\ - 0,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,0,\ - 0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,1,0,\ - 0,1,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,\ - 0,0,1,0,1,0,0,0,1,0,0,1,0,0,0,1,0 +picture_you_win db 10001001b,11001000b,10000000b,\ + 10001010b,00101000b,10000000b,\ + 01010010b,00101000b,10000000b,\ + 00100010b,00101000b,10000000b,\ + 00100001b,11000111b,00000000b,\ + 00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,\ + 01000100b,10010001b,00000000b,\ + 01010100b,10011001b,00000000b,\ + 01010100b,10010101b,00000000b,\ + 01010100b,10010011b,00000000b,\ + 00101000b,10010001b,00000000b -picture_level db 1,0,0,0,0,1,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,\ - 1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,\ - 1,0,0,0,0,1,1,1,0,0,1,0,0,1,0,1,1,1,0,0,1,0,0,0,\ - 1,0,0,0,0,1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,\ - 1,1,1,1,0,1,1,1,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,1 +picture_level db 10000111b,10100101b,11101000b,\ + 10000100b,00100101b,00001000b,\ + 10000111b,00100101b,11001000b,\ + 10000100b,00101001b,00001000b,\ + 11110111b,10110001b,11101111b -digits_font db 1,1,1,1,\ - 1,0,0,1,\ - 1,0,0,1,\ - 1,0,0,1,\ - 1,1,1,1,\ - \ - 0,0,1,0,\ - 0,1,1,0,\ - 0,0,1,0,\ - 0,0,1,0,\ - 0,0,1,0,\ - \ - 1,1,1,1,\ - 0,0,0,1,\ - 1,1,1,1,\ - 1,0,0,0,\ - 1,1,1,1,\ - \ - 1,1,1,1,\ - 0,0,0,1,\ - 0,1,1,1,\ - 0,0,0,1,\ - 1,1,1,1,\ - \ - 1,0,0,1,\ - 1,0,0,1,\ - 1,1,1,1,\ - 0,0,0,1,\ - 0,0,0,1,\ - \ - 1,1,1,1,\ - 1,0,0,0,\ - 1,1,1,1,\ - 0,0,0,1,\ - 1,1,1,1,\ - \ - 1,1,1,1,\ - 1,0,0,0,\ - 1,1,1,1,\ - 1,0,0,1,\ - 1,1,1,1,\ - \ - 1,1,1,1,\ - 0,0,0,1,\ - 0,0,0,1,\ - 0,0,0,1,\ - 0,0,0,1,\ - \ - 1,1,1,1,\ - 1,0,0,1,\ - 1,1,1,1,\ - 1,0,0,1,\ - 1,1,1,1,\ - \ - 1,1,1,1,\ - 1,0,0,1,\ - 1,1,1,1,\ - 0,0,0,1,\ - 1,1,1,1 +digits_font db 0xf0,0x90,0x90,0x90,0xf0,\ + 0x20,0x60,0x20,0x20,0x20,\ + 0xf0,0x10,0xf0,0x80,0xf0,\ + 0xf0,0x10,0x70,0x10,0xf0,\ + 0x90,0x90,0xf0,0x10,0x10,\ + 0xf0,0x80,0xf0,0x10,0xf0,\ + 0xf0,0x80,0xf0,0x90,0xf0,\ + 0xf0,0x10,0x10,0x10,0x10,\ + 0xf0,0x90,0xf0,0x90,0xf0,\ + 0xf0,0x90,0xf0,0x10,0xf0 stage_00: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 3,3, 4,3, 5,3 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 0 +.name dd stage_00_name stage_01: -.field db 2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\ - 2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2 +.field db 11111000b,00000000b,00000001b,11110000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 10000000b,00000000b,00000000b,00010000b,\ + 11111000b,00000000b,00000001b,11110000b .snake_dots db 3,3, 4,3, 5,3 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 36 +.name dd stage_01_name stage_02: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00011111b,11000000b,00111111b,10000000b,\ + 00010000b,00000000b,00000000b,10000000b,\ + 00010000b,00000000b,00000000b,10000000b,\ + 00010000b,00000000b,00000000b,10000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00010000b,00000000b,00000000b,10000000b,\ + 00010000b,00000000b,00000000b,10000000b,\ + 00010000b,00000000b,00000000b,10000000b,\ + 00011111b,11000000b,00111111b,10000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 7,5, 8,5, 9,5 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 40 +.name dd stage_02_name stage_03: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,2,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,2,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,2,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,2,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00001001b,00000000b,00000000b,\ + 00000000b,00001001b,00000000b,00000000b,\ + 00000000b,00001001b,00000000b,00000000b,\ + 00001111b,11111001b,11111111b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00001111b,11111001b,11111111b,00000000b,\ + 00000000b,00001001b,00000000b,00000000b,\ + 00000000b,00001001b,00000000b,00000000b,\ + 00000000b,00001001b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 23,0, 22,0, 21,0 .snake_direction dd LEFT .snake_direction_next dd LEFT -.number_of_stones dd 44 +.number_of_stones dd 48 +.name dd stage_03_name stage_04: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,\ - 0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00100000b,01000000b,00000000b,\ + 00000010b,00100000b,01000100b,00000000b,\ + 00000010b,00000000b,00000100b,00000000b,\ + 00010000b,00100000b,01000000b,10000000b,\ + 00000010b,00100000b,01000100b,00000000b,\ + 00010010b,00000000b,00000100b,10000000b,\ + 00010010b,00000000b,00000100b,10000000b,\ + 00000010b,00100000b,01000000b,00000000b,\ + 00010000b,00100000b,01000000b,10000000b,\ + 00000010b,00000000b,00000100b,00000000b,\ + 00000010b,00100000b,01000100b,00000000b,\ + 00000000b,00100000b,01000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 19,6, 19,7, 19,8 .snake_napravlenie dd DOWN .snake_napravlenie_next dd DOWN -.number_of_stones dd 40 +.number_of_stones dd 39 +.name dd stage_04_name stage_05: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,\ - 0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,\ - 0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000001b,11111111b,11111000b,00000000b,\ + 00000001b,11111111b,11111000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000111b,11111111b,11111110b,00000000b,\ + 00000111b,11111111b,11111110b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00111111b,11111111b,11111111b,11000000b,\ + 00111111b,11111111b,11111111b,11000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 0,0, 0,1, 1,1 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 112 +.name dd stage_05_name stage_06: -.field db 0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,\ - 0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,\ - 0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,\ - 0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,\ - 0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0 +.field db 00000001b,10000000b,00000000b,00000000b,\ + 00000001b,11111111b,11111000b,00000000b,\ + 00000001b,11111111b,11111000b,00000000b,\ + 00000000b,00000000b,00011000b,00000000b,\ + 00000000b,00000000b,00011000b,00000000b,\ + 00011111b,11111111b,11111000b,00000000b,\ + 00011111b,11111111b,11111000b,00000000b,\ + 00011000b,00000000b,00000000b,00000000b,\ + 00011000b,00000000b,00000000b,00000000b,\ + 00011111b,11111111b,11111111b,11100000b,\ + 00011111b,11111111b,11111111b,11100000b,\ + 00000000b,00000000b,00000000b,01100000b,\ + 00000000b,00000000b,00000000b,01100000b,\ + 00000000b,00000000b,00000000b,01100000b .snake_dots db 0,0, 0,1, 1,1 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 128 +.name dd stage_06_name stage_07: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,2,2,2,2,2,2,2,2,2,2,0,2,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,2,2,2,2,2,2,2,2,2,2,2,2,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000011b,11111111b,11111100b,00000000b,\ + 00000000b,00000000b,00000100b,00000000b,\ + 00000011b,11111111b,11110100b,00000000b,\ + 00000010b,00000000b,00010100b,00000000b,\ + 00000010b,11111111b,11010100b,00000000b,\ + 00000010b,00000000b,00010100b,00000000b,\ + 00000010b,11111111b,11110100b,00000000b,\ + 00000010b,00000000b,00000100b,00000000b,\ + 00000011b,11111111b,11111100b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 8,1, 9,1, 10,1 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 83 +.name dd stage_07_name stage_08: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\ - 0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,2,0,2,0,0,2,0,0,2,0,0,0,0,0,2,0,2,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\ - 0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,\ - 0,0,0,0,0,2,2,2,0,0,2,0,0,0,0,0,2,0,0,0,0,0,2,0,2,0,0,0,\ - 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\ - 0,0,0,2,0,0,0,0,2,2,0,0,0,0,0,0,0,2,2,2,0,0,2,0,0,0,0,0,\ - 0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00010000b,00000000b,\ + 00001001b,00000001b,00000000b,00000000b,\ + 00000001b,01001001b,00000101b,00000000b,\ + 00000000b,01000000b,00000100b,00000000b,\ + 00001111b,00000000b,11100000b,00000000b,\ + 00000000b,00000000b,00001000b,10000000b,\ + 00000111b,00100000b,10000010b,10000000b,\ + 00010000b,00000000b,00000010b,00000000b,\ + 00010000b,11000000b,01110010b,00000000b,\ + 00010010b,00000000b,00000010b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 0,0, 1,0, 2,0 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 40 +.name dd stage_08_name stage_09: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,1,1,1,1,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,1,1,1,1,0,0,\ - 0,0,1,0,0,0,0,1,1,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,0,0,0,0,\ - 0,0,1,1,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,0,0,\ - 0,0,0,0,0,1,0,1,0,1,1,0,0,1,1,1,0,1,0,1,0,0,1,0,0,0,0,0,\ - 0,0,1,1,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,0,1,0,1,1,1,1,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00111101b,00100110b,01001011b,11000000b,\ + 00100001b,10101001b,01010010b,00000000b,\ + 00111101b,01100001b,01100011b,10000000b,\ + 00000101b,01100111b,01010010b,00000000b,\ + 00111101b,00100001b,01001011b,11000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 12,6, 12,7, 12,8 .snake_direction dd DOWN .snake_direction_next dd DOWN .number_of_stones dd 59 +.name dd stage_09_name stage_10: -.field db 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,\ - 2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0,2,2,2,0 +.field db 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 11101110b,11101110b,11101110b,11100000b,\ + 11101110b,11101110b,11101110b,11100000b .snake_dots db 3,2, 3,3, 4,3 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 231 +.name dd stage_10_name stage_11: -.field db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,2,2,2,0,0,0,0,0,2,2,2,0,0,0,0,0,2,2,2,0,0,0,0,\ - 0,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,\ - 0,0,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,0,\ - 0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,\ - 0,0,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,0,\ - 0,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,\ - 0,0,0,0,0,2,2,2,0,0,0,0,0,2,2,2,0,0,0,0,0,2,2,2,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000111b,00000111b,00000111b,00000000b,\ + 00001101b,10001101b,10001101b,10000000b,\ + 00011000b,11011000b,11011000b,11000000b,\ + 00000000b,01000000b,01000000b,01000000b,\ + 00011000b,11011000b,11011000b,11000000b,\ + 00001101b,10001101b,10001101b,10000000b,\ + 00000111b,00000111b,00000111b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b .snake_dots db 3,12, 4,12, 5,12 .snake_direction dd RIGHT .snake_direction_next dd RIGHT .number_of_stones dd 69 +.name dd stage_11_name stage_12: -.field db 0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,\ - 0,2,2,0,2,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,2,0,0,2,0,2,\ - 0,2,0,0,2,0,2,2,2,2,0,2,2,0,0,2,2,2,0,0,0,0,0,0,0,2,2,2,\ - 0,2,2,0,0,0,0,2,0,2,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,\ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,\ - 0,2,0,2,0,0,2,2,0,0,0,0,2,2,0,0,2,0,2,0,0,2,2,0,0,0,2,2,\ - 0,2,2,2,0,0,2,0,0,0,0,0,2,0,0,0,2,2,2,0,0,2,0,0,0,0,0,2,\ - 0,0,0,0,0,0,2,2,0,0,0,0,2,2,0,0,0,0,0,0,0,2,2,0,0,0,2,2,\ - 0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\ - 0,0,0,2,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,\ - 2,2,0,2,2,2,0,0,0,0,0,0,0,2,2,0,2,0,2,0,0,2,0,0,0,0,0,0,\ - 0,2,0,0,0,0,2,2,2,0,0,0,0,0,2,0,2,2,2,0,0,2,2,0,2,0,2,0,\ - 2,2,0,0,0,0,2,0,2,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,2,2,0 +.field db 00000000b,00011000b,00001110b,00000000b,\ + 01101110b,00010000b,00001010b,01010000b,\ + 01001011b,11011001b,11000000b,01110000b,\ + 01100001b,01000001b,01000000b,00000000b,\ + 00000000b,00000000b,00000011b,10000000b,\ + 00000000b,00000000b,00000010b,10000000b,\ + 01010011b,00001100b,10100110b,00110000b,\ + 01110010b,00001000b,11100100b,00010000b,\ + 00000011b,00001100b,00000110b,00110000b,\ + 00000000b,11100000b,00000000b,00000000b,\ + 00010100b,10100000b,00000110b,00000000b,\ + 11011100b,00000110b,10100100b,00000000b,\ + 01000011b,10000010b,11100110b,10100000b,\ + 11000010b,10000110b,00000000b,11100000b .snake_dots db 27,0, 26,0, 25,0 .snake_direction dd LEFT .snake_direction_next dd LEFT .number_of_stones dd 110 +.name dd stage_12_name + +stage_13: +.field db 00111000b,00100000b,00000000b,00000000b,\ + 01111100b,11110011b,11000011b,10000000b,\ + 11111100b,01110011b,10000001b,11000000b,\ + 11110000b,00000011b,11000000b,00000000b,\ + 00000000b,00000010b,00000000b,00000000b,\ + 00000000b,00000010b,00000001b,00000000b,\ + 00011110b,00000111b,00000111b,00000000b,\ + 00000111b,10001111b,11111110b,00000000b,\ + 00000011b,11111111b,11111100b,00000000b,\ + 00110001b,11111111b,11111001b,01100000b,\ + 00001110b,11101011b,00100111b,10000000b,\ + 01111000b,10000011b,10000010b,00000000b,\ + 00000011b,11100110b,00011010b,11000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 0,5, 0,6, 0,7 +.snake_direction dd DOWN +.snake_direction_next dd DOWN +.number_of_stones dd 141 +.name dd stage_13_name + +stage_14: +.field db 00000110b,00000000b,00000000b,00000000b,\ + 00001000b,00000000b,00011000b,00000000b,\ + 00010000b,00000000b,00000100b,00000000b,\ + 00100001b,10000000b,11000010b,00000000b,\ + 01000010b,01000001b,00100001b,00000000b,\ + 10000100b,00000010b,00010000b,10000000b,\ + 10001000b,00000100b,00001000b,01000000b,\ + 10010000b,00001000b,00000100b,01000000b,\ + 01001000b,00010000b,00001000b,10000000b,\ + 00100100b,00100000b,00010001b,00000000b,\ + 00010010b,01000001b,00100010b,00000000b,\ + 00001001b,10000000b,11000100b,00000000b,\ + 00000100b,00000000b,00001000b,00000000b,\ + 00000000b,00000000b,00110000b,00000000b + +.snake_dots db 8,0, 9,0, 10,0 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 60 +.name dd stage_14_name + +stage_15: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,01110000b,00110000b,00000000b,\ + 00000000b,10000000b,00001010b,00000000b,\ + 00100001b,00000000b,00110010b,00000000b,\ + 00010001b,00111111b,10011100b,00000000b,\ + 00001001b,00100000b,11000000b,00000000b,\ + 00010000b,00000010b,01000000b,00000000b,\ + 00100000b,00000010b,00100001b,10000000b,\ + 00010000b,00000010b,00110010b,01000000b,\ + 00001000b,01000100b,00011100b,01000000b,\ + 00010000b,00111000b,00010000b,01000000b,\ + 00100000b,00000000b,00010000b,01000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 13,3, 13,2, 14,2 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 60 +.name dd stage_15_name + +stage_16: +.field db 00000000b,10000010b,00000000b,00000000b,\ + 00000000b,01001010b,10000010b,10100000b,\ + 01111111b,11100111b,00000001b,11000000b,\ + 00000000b,01000010b,00000000b,10000000b,\ + 00000100b,10000000b,01000000b,00000001b,\ + 00000100b,00100000b,10000000b,00000010b,\ + 11000100b,00010001b,11111000b,00000111b,\ + 00010101b,00001000b,10000000b,00000010b,\ + 00001110b,00010000b,01000000b,00000001b,\ + 00000100b,00100010b,00000000b,10000000b,\ + 00000000b,00000010b,00000000b,01000000b,\ + 00111111b,11111111b,11111111b,11100000b,\ + 00000000b,00000010b,00000000b,01000000b,\ + 00000000b,00000010b,00000000b,10000000b + +.snake_dots db 11,7, 10,7, 9,7 +.snake_direction dd LEFT +.snake_direction_next dd LEFT +.number_of_stones dd 96 +.name dd stage_16_name + +stage_17: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000111b,10000001b,11100000b,00000000b,\ + 00001000b,01000010b,00010000b,00000000b,\ + 00010001b,00100100b,01001000b,00000000b,\ + 00010001b,00000000b,01001000b,00000000b,\ + 00001000b,01000010b,00010000b,00000000b,\ + 00000111b,10000001b,11100000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,01000000b,00000000b,00000000b,\ + 00000000b,00111110b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 11,7, 11,8, 12,8 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 40 +.name dd stage_17_name + +stage_18: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 01000100b,01000100b,01000100b,01000000b,\ + 00101010b,10101010b,10101010b,10100000b,\ + 00010001b,00010001b,00010001b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 01000100b,01000100b,01000100b,01000000b,\ + 00101010b,10101010b,10101010b,10100000b,\ + 00010001b,00010001b,00010001b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 01000100b,01000100b,01000100b,01000000b,\ + 00101010b,10101010b,10101010b,10100000b,\ + 00010001b,00010001b,00010001b,00000000b + +.snake_dots db 2,5, 3,5, 4,5 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 78 +.name dd stage_18_name + +stage_19: +.field db 01000010b,00100100b,10000101b,00000000b,\ + 00010000b,00010000b,00100000b,10000000b,\ + 00111001b,00000010b,00010000b,00100000b,\ + 01000100b,00001000b,00000010b,00000000b,\ + 01010101b,01000000b,01000000b,01000000b,\ + 01010100b,00010000b,00001000b,11100000b,\ + 00000100b,10001001b,00100001b,00000000b,\ + 01111100b,00100000b,00000001b,01010000b,\ + 00111001b,00000100b,00010001b,01010000b,\ + 00010000b,00000000b,10000001b,00010000b,\ + 11010111b,11100000b,00011101b,11110000b,\ + 00010000b,01000000b,00100000b,11100000b,\ + 00010000b,10000000b,00100000b,01000000b,\ + 00000001b,00000000b,00010000b,01000000b + +.snake_dots db 27,6, 0,6, 1,6 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 95 +.name dd stage_19_name + +stage_20: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,10001000b,00000000b,\ + 00000000b,00011100b,10000100b,00000000b,\ + 00000000b,01100100b,10000010b,00000000b,\ + 00000011b,10000100b,10000100b,00000000b,\ + 00000010b,00000100b,10001000b,00000000b,\ + 00000010b,00000100b,10000100b,00000000b,\ + 00000010b,00000100b,10000010b,00000000b,\ + 00000010b,00111100b,10010010b,00000000b,\ + 00011110b,00111100b,10010100b,00000000b,\ + 00011110b,00111100b,10001000b,00000000b,\ + 00011110b,00000000b,10000000b,00000000b,\ + 00000000b,00000000b,10000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 17,2, 17,3, 17,4 +.snake_direction dd DOWN +.snake_direction_next dd DOWN +.number_of_stones dd 65 +.name dd stage_20_name + +stage_21: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000011b,11111111b,11111110b,00000000b,\ + 00000001b,01000100b,01000100b,00000000b,\ + 00000010b,01000100b,01000100b,00000000b,\ + 00001100b,01000100b,01000100b,00000000b,\ + 01110000b,01000100b,01000100b,00000000b,\ + 01110000b,01000100b,01000100b,00000000b,\ + 01110000b,11101110b,11101110b,00000000b,\ + 00000000b,11101110b,11101110b,00000000b,\ + 00000000b,11101110b,11101110b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 10,1, 11,1, 12,1 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 86 +.name dd stage_21_name + +stage_22: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000011b,10000000b,00000000b,00000000b,\ + 00000111b,11100000b,00000000b,00000000b,\ + 00001111b,11110000b,00000000b,00000000b,\ + 00011111b,11100000b,00000000b,00000000b,\ + 00011111b,11000011b,00001100b,00110000b,\ + 00011111b,10000111b,10011110b,01110000b,\ + 00011111b,11000111b,10011110b,01110000b,\ + 00011111b,11100011b,00001100b,00110000b,\ + 00001111b,11110000b,00000000b,00000000b,\ + 00000111b,11100000b,00000000b,00000000b,\ + 00000011b,10000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 1,7, 1,6, 1,5 +.snake_direction dd UP +.snake_direction_next dd UP +.number_of_stones dd 104 +.name dd stage_22_name + +stage_23: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00100000b,01000101b,00010000b,00100000b,\ + 00011010b,00100101b,00100010b,11000000b,\ + 00000100b,10101000b,10101001b,00000000b,\ + 00000100b,10010010b,01001001b,00000000b,\ + 00001011b,00110000b,01100110b,10000000b,\ + 00000000b,11001010b,10011000b,00000000b,\ + 00000001b,00000111b,00000100b,00000000b,\ + 00001110b,01001010b,10010011b,10000000b,\ + 00000010b,00110000b,01100010b,00000000b,\ + 00000101b,00010010b,01000101b,00000000b,\ + 00001001b,00001000b,10000100b,10000000b,\ + 00000000b,00001000b,10000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 15,0, 14,0, 13,0 +.snake_direction dd LEFT +.snake_direction_next dd LEFT +.number_of_stones dd 85 +.name dd stage_23_name + +stage_24: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00111111b,11111111b,11111111b,10000000b,\ + 00100000b,00000000b,00000000b,10000000b,\ + 00100011b,11111111b,11111000b,10000000b,\ + 00100010b,00000000b,00001000b,10000000b,\ + 00100010b,00111111b,10001000b,10000000b,\ + 00100010b,00100000b,10001000b,10000000b,\ + 00101010b,10101010b,10101010b,10000000b,\ + 00001000b,10001110b,00100010b,00000000b,\ + 00001000b,10000000b,00100010b,00000000b,\ + 00001000b,11111111b,11100010b,00000000b,\ + 00001000b,00000000b,00000010b,00000000b,\ + 00001111b,11111111b,11111110b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 1,0, 0,0, 0,1 +.snake_direction dd DOWN +.snake_direction_next dd DOWN +.number_of_stones dd 120 +.name dd stage_24_name + +stage_25: +.field db 00000100b,11000000b,00000000b,00000000b,\ + 00000011b,10000000b,00110010b,00000000b,\ + 10011010b,10000000b,00011100b,00000000b,\ + 01110000b,00000000b,00010101b,10010000b,\ + 01010000b,00000111b,00000000b,11100000b,\ + 00000100b,00000101b,00000000b,10100000b,\ + 00000100b,00000100b,00000000b,00000000b,\ + 00000011b,11111100b,00011001b,00000000b,\ + 00000010b,10010100b,00001110b,00000000b,\ + 00000010b,10010100b,00001010b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000011b,00100001b,10010011b,00100000b,\ + 00000001b,11000000b,11100001b,11000000b,\ + 00000001b,01000000b,10100001b,01000000b + +.snake_dots db 11,2, 12,2, 13,2 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 88 +.name dd stage_25_name + +stage_26: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00111100b,01001111b,01111010b,01000000b,\ + 00100000b,01000001b,00001010b,01000000b,\ + 00100100b,01001111b,01111011b,11000000b,\ + 00000100b,01001000b,00001000b,01000000b,\ + 00111100b,01001111b,01111000b,01000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00111101b,11101111b,01111011b,11000000b,\ + 00100001b,00000001b,00000000b,00000000b,\ + 00111101b,11100001b,01111011b,11000000b,\ + 00000100b,00000001b,00000000b,01000000b,\ + 00111101b,11100001b,01111011b,11000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 1,5, 0,5, 0,6 +.snake_direction dd DOWN +.snake_direction_next dd DOWN +.number_of_stones dd 115 +.name dd stage_26_name + +stage_27: +.field db 00000000b,10000000b,00000000b,01000000b,\ + 00000000b,10000000b,01000000b,11100000b,\ + 00100011b,11100000b,01000000b,01000000b,\ + 01110000b,10000001b,11110000b,00000000b,\ + 00100000b,10000000b,01000000b,00000000b,\ + 00000000b,00000000b,01000010b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000010b,00000000b,00000000b,00000000b,\ + 00000111b,00000000b,00000000b,10000000b,\ + 00000010b,00001000b,00000001b,11000000b,\ + 00000000b,00000000b,10000000b,10000000b,\ + 00000000b,01000001b,11000000b,00000000b,\ + 01000000b,11100000b,10000000b,00000000b,\ + 00000000b,01000000b,00000000b,00000000b + +.snake_dots db 12,8, 12,7, 12,6 +.snake_direction dd UP +.snake_direction_next dd UP +.number_of_stones dd 51 +.name dd stage_27_name + +stage_28: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000100b,00000000b,00000010b,00000000b,\ + 00010100b,00000000b,00000010b,10000000b,\ + 01010100b,00000000b,00000010b,10100000b,\ + 01010101b,11111111b,11111010b,10100000b,\ + 01010100b,00000000b,00000010b,10100000b,\ + 00010100b,00000000b,00000010b,10000000b,\ + 00000100b,00000000b,00000010b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 13,8, 12,8, 11,8 +.snake_direction dd LEFT +.snake_direction_next dd LEFT +.number_of_stones dd 44 +.name dd stage_28_name + +stage_29: +.field db 00000000b,01110000b,00000000b,00000000b,\ + 00000100b,01000110b,00000001b,10000000b,\ + 01001110b,00001100b,01100000b,11000000b,\ + 01000000b,00000000b,01100000b,00000000b,\ + 01100000b,01111000b,00000001b,10010000b,\ + 00000000b,00000010b,10000101b,10110000b,\ + 00110000b,00110010b,10001100b,00100000b,\ + 00011011b,00110110b,10000100b,00000000b,\ + 00000001b,00000000b,10010000b,10000000b,\ + 00100001b,00000000b,00111000b,10000000b,\ + 00111001b,00110011b,00000011b,10000000b,\ + 01111111b,11111111b,00011011b,11010000b,\ + 11111111b,11111111b,00011111b,11110000b,\ + 11111111b,11111111b,00111111b,11110000b + +.snake_dots db 0,0, 1,0, 2,0 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 151 +.name dd stage_29_name + +stage_30: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000001b,01011100b,00000000b,\ + 00000000b,00000001b,11001000b,00000000b,\ + 00000100b,00000001b,01001000b,00000000b,\ + 00000100b,00000100b,00000000b,00000000b,\ + 00000100b,00000100b,00000100b,00000000b,\ + 00000100b,00000100b,00000100b,00000000b,\ + 00000100b,00000100b,00000100b,00000000b,\ + 01111111b,11000100b,11111111b,11100000b,\ + 00000100b,00000100b,00000100b,00000000b,\ + 00011111b,00111111b,10001110b,00000000b,\ + 00000100b,00000100b,00000100b,00000000b,\ + 00011111b,00011111b,00011111b,00000000b,\ + 11111111b,11111111b,11111111b,11110000b + +.snake_dots db 8,2, 9,2, 10,2 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 109 +.name dd stage_30_name + +stage_31: +.field db 00000101b,00010000b,00000100b,01000000b,\ + 01000100b,01010101b,00010100b,01000000b,\ + 01000101b,01010101b,01000101b,00010000b,\ + 01010000b,00010100b,01000000b,01010000b,\ + 00010101b,01000101b,01010100b,01000000b,\ + 01000001b,00010000b,01010101b,01000000b,\ + 01010101b,00010100b,00000101b,00010000b,\ + 00000101b,01010000b,01000101b,01010000b,\ + 01010000b,01000100b,00000000b,01010000b,\ + 00010101b,00000101b,00010100b,00010000b,\ + 01010001b,00010001b,01000001b,01000000b,\ + 01000100b,00000101b,01010100b,01010000b,\ + 00010001b,01010100b,00010001b,00010000b,\ + 00000100b,01000001b,00010001b,00000000b + +.snake_dots db 18,8, 17,8, 16,8 +.snake_direction dd LEFT +.snake_direction_next dd LEFT +.number_of_stones dd 112 +.name dd stage_31_name + +stage_32: +.field db 11111111b,11111111b,11111111b,11110000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010000b,01000001b,00000100b,00010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 10000010b,00001000b,00100000b,10010000b,\ + 10010010b,01001001b,00100100b,10010000b,\ + 11111111b,11111111b,11111111b,11110000b + +.snake_dots db 1,1, 1,2, 1,3 +.snake_direction dd DOWN +.snake_direction_next dd DOWN +.number_of_stones dd 168 +.name dd stage_32_name + +stage_33: +.field db 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 01111111b,11001111b,11111111b,11100000b,\ + 01000100b,01001000b,01000000b,00100000b,\ + 01000100b,01001000b,01000001b,10100000b,\ + 01000100b,01001000b,01001101b,10100000b,\ + 00000000b,00000000b,00000110b,00000000b,\ + 01000100b,01001000b,01000010b,00100000b,\ + 01000100b,01001000b,01001111b,00100000b,\ + 01000100b,01001000b,01001111b,00100000b,\ + 01000100b,01001000b,01000110b,00100000b,\ + 01111111b,11001111b,11111111b,11100000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 6,6, 7,6, 8,6 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 109 +.name dd stage_33_name + +stage_34: +.field db 01110000b,00000000b,00000011b,10000000b,\ + 00010010b,00010000b,01111100b,00000000b,\ + 00011110b,00010000b,00100100b,00000000b,\ + 00000100b,00011001b,00100111b,00000000b,\ + 00001111b,10001001b,00100000b,00110000b,\ + 00000001b,00001011b,00101000b,00100000b,\ + 00000001b,00011110b,01111000b,00100000b,\ + 00111000b,00000010b,00001100b,10100000b,\ + 00001110b,00100010b,00000000b,10100000b,\ + 01100011b,11111110b,01000011b,11100000b,\ + 00111110b,00100010b,01000000b,10000000b,\ + 00000000b,01100011b,11000010b,10000000b,\ + 00000000b,01000000b,01100111b,10000000b,\ + 00000000b,00000000b,00000010b,00000000b + +.snake_dots db 7,0, 8,0, 9,0 +.snake_direction dd RIGHT +.snake_direction_next dd RIGHT +.number_of_stones dd 113 +.name dd stage_34_name + +stage_35: +.field db 00000100b,00000000b,00001010b,00000000b,\ + 00010100b,01000000b,00101010b,00000000b,\ + 00010100b,10000010b,00010010b,10000000b,\ + 00010001b,00000000b,00010010b,10000000b,\ + 00010001b,00000010b,00001010b,10000000b,\ + 01010010b,00000010b,00001000b,10100000b,\ + 01000100b,00000000b,00001000b,10100000b,\ + 01000100b,00000010b,00000100b,10100000b,\ + 01001000b,00000010b,00000100b,00100000b,\ + 01001000b,00000000b,00000010b,00100000b,\ + 00010000b,00000010b,00000010b,00100000b,\ + 00110000b,00000010b,00000010b,00100000b,\ + 00100000b,00000010b,00000001b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b + +.snake_dots db 13,11, 13,10, 13,9 +.snake_direction dd UP +.snake_direction_next dd UP +.number_of_stones dd 66 +.name dd stage_35_name + +stage_36: +.field db 10101110b,10001110b,00110100b,11100000b,\ + 11101000b,10001110b,00101010b,10000000b,\ + 10101110b,11101000b,00101010b,11100000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00000000b,10110010b,01000100b,00000000b,\ + 00000001b,10100101b,01010100b,00000000b,\ + 00000001b,10100101b,00101000b,00000000b,\ + 00000000b,00000000b,00000000b,00000000b,\ + 00010001b,11010101b,11010001b,11000000b,\ + 00010001b,11010101b,11010001b,00000000b,\ + 00010001b,00010101b,00010000b,10000000b,\ + 00011101b,11001001b,11011100b,01000000b,\ + 00000000b,00000000b,00000001b,11010000b + +.snake_dots db 27,11, 27,10, 27,9 +.snake_direction dd UP +.snake_direction_next dd UP +.number_of_stones dd 112 +.name dd stage_36_name + + +stage_00_name db 'Classic mode',0 +stage_01_name db 'Begin',0 +stage_02_name db 'Frame',0 +stage_03_name db 'Sight',0 +stage_04_name db 'Dashed',0 +stage_05_name db 'Beams',0 +stage_06_name db 'Pipe',0 +stage_07_name db 'Labyrinth',0 +stage_08_name db 'Sea battle',0 +stage_09_name db 'Recursion',0 +stage_10_name db 'Narrow corridors',0 +stage_11_name db 'CCC',0 +stage_12_name db 'Deadlocks',0 +stage_13_name db 'Boat',0 +stage_14_name db 'Pattern',0 +stage_15_name db 'Guernica',0 +stage_16_name db 'Goto',0 +stage_17_name db 'Smiling face',0 +stage_18_name db 'Waves',0 +stage_19_name db 'First snow',0 +stage_20_name db 'Music and silence',0 +stage_21_name db 'Experiment',0 +stage_22_name db 'Pacman',0 +stage_23_name db 'Intricate pattern',0 +stage_24_name db 'Square arcs',0 +stage_25_name db 'In the animal world',0 +stage_26_name db 'Digits',0 +stage_27_name db 'Pluses',0 +stage_28_name db 'Rod',0 +stage_29_name db 'Tetris',0 +stage_30_name db 'Towers of Hanoi',0 +stage_31_name db 'Ruins',0 +stage_32_name db 'Walls of Akendora',0 +stage_33_name db 'Geranium in the window',0 +stage_34_name db 'Algae',0 +stage_35_name db 'The road ahead',0 +stage_36_name db 'Help me draw levels!',0 + background_color dd 0x000000 decorations_color dd 0x00000000 snake_color dd 0x000000 snake_head_color dd 0x000000 +lives_in_head_number_color dd 0x000000 snake_picture_color dd 0x000000 version_picture_color dd 0x000000 pause_picture_color dd 0x000000 @@ -1572,7 +2357,8 @@ import libini,\ ini.get_int , 'ini_get_int' ,\ ini.set_str , 'ini_set_str' ,\ ini.set_int , 'ini_set_int' ,\ - ini.get_color , 'ini_get_color' + ini.get_color , 'ini_get_color' ,\ + ini.get_shortcut, 'ini_get_shortcut' import box_lib,\ edit_box.draw , 'edit_box' ,\ @@ -1584,6 +2370,19 @@ bFirstDraw db 0 aPreferences db 'Preferences',0 aSpeed db 'Speed',0 aTheme db 'Theme',0 +aSmart_reverse db 'Smart_reverse',0 +aShow_lives_style db 'Show_lives_style',0 +aDraw_level_name_in_window_title db 'Draw_level_name_in_window_title',0 +aSeparating_symbol db 'Separating_symbol',0 + +aShortcuts db 'Shortcuts',0 +aMove_left db 'Move_left',0 +aMove_down db 'Move_down',0 +aMove_up db 'Move_up',0 +aMove_right db 'Move_right',0 +aReverse db 'Reverse',0 +aIncrease db 'Increase',0 +aDecrease db 'Decrease',0 aTheme_name db 32 dup (0) aDecorations db 'Decorations',0 @@ -1591,6 +2390,7 @@ aBackground_color db 'Background_color',0 aDecorations_color db 'Decorations_color',0 aSnake_color db 'Snake_color',0 aSnake_head_color db 'Snake_head_color',0 +aLives_in_head_number_color db 'Lives_in_head_number_color',0 aSnake_picture_color db 'Snake_picture_color',0 aVersion_picture_color db 'Version_picture_color',0 aPause_picture_color db 'Pause_picture_color',0 @@ -1632,6 +2432,8 @@ hed_end: rb 256 mouse_dd rd 1 +window_style rd 1 + cur_level rd 1 cur_level_number rd 1 hi_level rd 1 @@ -1691,6 +2493,27 @@ cur_dir_path rb 4096 field_map rb GRID_WIDTH*GRID_HEIGHT*2 +proc_info process_information + +smart_reverse rd 1 +show_lives_style rd 1 +draw_level_name_in_window_title rd 1 +separating_symbol rd 1 + +shortcut_move_left rb 1 +shortcut_move_down rb 1 +shortcut_move_up rb 1 +shortcut_move_right rb 1 +shortcut_reverse rb 1 +shortcut_increase rb 1 +shortcut_decrease rb 1 + +square_side_length rd 1 + +gbxm1 rd 1 +gbym1 rd 1 +speed_up_counter rw 1 + rb 4096 stacktop: -d_end: \ No newline at end of file +d_end: diff --git a/programs/games/snake/trunk/snake.ini b/programs/games/snake/trunk/snake.ini index aa520dacee..d147abe0c8 100644 --- a/programs/games/snake/trunk/snake.ini +++ b/programs/games/snake/trunk/snake.ini @@ -1,17 +1,53 @@ ;;===Common_preferences================================================= [Preferences] Speed=80 +; Delay between moves in ms (1/100 second) ; SLOW == 0 <= Speed <= 100 == FAST Theme=Theme_standard ; Theme name to use ; See [Theme_*] sections below for available themes ; Name of any theme must be shorter than 30 chars +Smart_reverse=0 +; 0 - disabled, 1 - eabled +; If this option is enabled, the snake may be reversed only by pressing Reverse key (see [Shortcuts] section) +; For example, if the snake is moving to the left and you press RIGHT key the snake will not move to the right +Show_lives_style=2 +; 0 - do not show remaining lives +; 1 - show as a number in window title +; 2 - draw the number in snake head +; 3 - both 1 & 2 +Draw_level_name_in_window_title=1 +; 1 - yes, draw +; 0 - no +; This option includes drawing 'Classic mode' string in window title for classic mode (without levels) +Separating_symbol=/ +; Symbol that separates 'Snake', '3 lives' and level name in window title +; 'Snake | 3 lives | Towers of Hanoi' +; 'Snake - 3 lives +; 'Snake / Towers of Hanoi' +; or smth like these ones ;;---Common_preferences------------------------------------------------- +;;===Shortcuts========================================================== +[Shortcuts] +; Keys of moving. These ones are in addition to the standard combination of arrows. +; VIM-like navigation is used by default. +Move_left = h +Move_down = j +Move_up = k +Move_right = l +; Snake reverse key +Reverse = Tab +; Increare/decrease field keys +Increase = u +Decrease = i + +;;---Shortcuts---------------------------------------------------------- + ;;===Visual_themes====================================================== [Theme_standard] ; all these keys are optional -Decorations = 2 +Decorations = 3 ; 0 = nothing ; 1 = grid_lines ; 2 = grid_lines_with_ends @@ -29,6 +65,8 @@ Decorations_color = 170,170,0 Snake_color = 17,17,255 Snake_head_color = 107,107,255 ; by default Snake_head_color is equal to Snake_color, so the snake has no head +Lives_in_head_number_color= 255,136,0 +; color of the number in snake head which represents remaining lives Snake_picture_color = 68,136,255 ; color of big 'SNAKE' label at start menu Version_picture_color = 85,255,85 @@ -75,6 +113,7 @@ Background_color = 245,245,245 Decorations_color = 55,55,55 Snake_color = 225,125,225 Snake_head_color = 255,125,55 +Lives_in_head_number_color= 255,255,255 Snake_picture_color = 105,155,205 Version_picture_color = 155,255,0 Pause_picture_color = 75,255,75 @@ -106,6 +145,7 @@ Background_color = 255,255,255 Decorations_color = 0,0,0 Snake_color = 30,30,30 Snake_head_color = 30,30,30 +Lives_in_head_number_color= 255,255,255 Snake_picture_color = 30,30,30 Version_picture_color = 70,70,70 Pause_picture_color = 30,30,30 @@ -137,6 +177,7 @@ Background_color = 0,0,0 Decorations_color = 255,255,255 Snake_color = 255,255,255 Snake_head_color = 255,255,255 +Lives_in_head_number_color= 30,30,30 Snake_picture_color = 255,255,255 Version_picture_color = 225,225,225 Pause_picture_color = 225,225,225 @@ -172,4 +213,5 @@ Square_side_length=19 Champion_name_classic= Hiscore_classic=777 Champion_name_levels= -Hiscore_levels=222 \ No newline at end of file +Hiscore_levels=222 +;;---Reserved_Section--------------------------------------------------- \ No newline at end of file