Subversion Repositories Kolibri OS

Rev

Rev 1677 | Rev 1861 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1677 Rev 1760
1
;;===HEADER====================================================================================================================
1
;;===HEADER====================================================================================================================
2
 
2
 
3
use32
3
use32
4
    org 0x0
4
    org 0x0
5
    db  'MENUET01'
5
    db  'MENUET01'
6
    dd  0x01,start,i_end,d_end,stacktop,0x0,cur_dir_path
6
    dd  0x01,start,i_end,d_end,stacktop,0x0,cur_dir_path
7
 
7
 
8
;;---HEADER--------------------------------------------------------------------------------------------------------------------
8
;;---HEADER--------------------------------------------------------------------------------------------------------------------
9
 
9
 
10
include '../../../proc32.inc'
10
include '../../../proc32.inc'
11
include '../../../macros.inc'
11
include '../../../macros.inc'
12
include '../../../system/launch/trunk/mem.inc'
12
include '../../../system/launch/trunk/mem.inc'
13
include '../../../develop/libraries/libs-dev/.test/dll.inc'
13
include '../../../develop/libraries/libs-dev/.test/dll.inc'
14
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
14
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
15
include '../../../system/board/trunk/debug.inc'
15
include '../../../system/board/trunk/debug.inc'
16
 
16
 
17
;;===Define_chapter============================================================================================================
17
;;===Define_chapter============================================================================================================
18
 
18
 
19
WINDOW_MODE_WINDOWED        equ     0
19
WINDOW_MODE_WINDOWED        equ     0
20
WINDOW_MODE_FULLSCREEN      equ     1
20
WINDOW_MODE_FULLSCREEN      equ     1
21
 
21
 
22
GRID_WIDTH                  equ     28
22
GRID_WIDTH                  equ     28
23
GRID_HEIGHT                 equ     14
23
GRID_HEIGHT                 equ     14
24
 
24
 
25
MIN_SQUARE_SIDE_LENGTH      equ     9
25
MIN_SQUARE_SIDE_LENGTH      equ     9
26
 
26
 
27
SCORE_EAT                   equ     100
27
SCORE_EAT                   equ     100
28
 
28
 
29
LEFT                        equ     0
29
LEFT                        equ     0
30
DOWN                        equ     1
30
DOWN                        equ     1
31
UP                          equ     2
31
UP                          equ     2
32
RIGHT                       equ     3
32
RIGHT                       equ     3
33
 
33
 
34
struct  LEVEL
34
struct  LEVEL
35
    field                   db      4*GRID_HEIGHT  dup (?)
35
    field                   db      4*GRID_HEIGHT  dup (?)
36
    snake_dots              db      6   dup (?)
36
    snake_dots              db      6   dup (?)
37
    snake_direction         dd      ?
37
    snake_direction         dd      ?
38
    snake_direction_next    dd      ?
38
    snake_direction_next    dd      ?
39
    number_of_stones        dd      ?
39
    number_of_stones        dd      ?
40
    name                    dd      ?
40
    name                    dd      ?
41
ends
41
ends
42
 
42
 
43
CLASSIC_MODE                equ     0
43
CLASSIC_MODE                equ     0
44
LEVELS_MODE                 equ     1
44
LEVELS_MODE                 equ     1
45
 
45
 
46
CLASSIC_MODE_FIRST_LEVEL    equ     0
46
CLASSIC_MODE_FIRST_LEVEL    equ     0
47
LEVELS_MODE_FIRST_LEVEL     equ     1
47
LEVELS_MODE_FIRST_LEVEL     equ     1
48
 
48
 
49
EAT_TO_END_LEVEL            equ     7
49
EAT_TO_END_LEVEL            equ     7
50
PAUSE_BETWEEN_LEVELS        equ     200
50
PAUSE_BETWEEN_LEVELS        equ     200
51
PAUSE_WHILE_DRAWING_SPLASH  equ     3
51
PAUSE_WHILE_DRAWING_SPLASH  equ     3
52
 
52
 
53
CHAMPION_NAME_LENGTH        equ     15
53
CHAMPION_NAME_LENGTH        equ     15
54
LAST_LEVEL_NUMBER           equ     36
54
LAST_LEVEL_NUMBER           equ     36
55
 
55
 
56
START_LIVES                 equ     3
56
START_LIVES                 equ     3
57
 
57
 
58
;;---Define_chapter------------------------------------------------------------------------------------------------------------
58
;;---Define_chapter------------------------------------------------------------------------------------------------------------
59
 
59
 
60
start:
60
start:
61
 
61
 
62
stdcall dll.Load,@IMPORT
62
stdcall dll.Load,@IMPORT
63
    or   eax, eax
63
    or   eax, eax
64
    jnz  Exit
64
    jnz  Exit
65
    
65
    
66
align 4
66
align 4
67
 
67
 
68
    mov  edi, cur_dir_path
68
    mov  edi, cur_dir_path
69
    mov  al,  0
69
    mov  al,  0
70
    mov  ecx, 4096
70
    mov  ecx, 4096
71
    repne scasb
71
    repne scasb
72
    mov  dword[edi-1],    '.ini'
72
    mov  dword[edi-1],    '.ini'
73
 
73
 
74
      invoke  ini.get_int, cur_dir_path, aPreferences, aSpeed, 80
74
      invoke  ini.get_int, cur_dir_path, aPreferences, aSpeed, 80
75
    neg  eax
75
    neg  eax
76
    add  [time_wait_limit],    eax
76
    add  [time_wait_limit],    eax
77
    mov  ebx, [time_wait_limit]
77
    mov  ebx, [time_wait_limit]
78
    mov  [time_wait_limit_const],  ebx
78
    mov  [time_wait_limit_const],  ebx
79
    sub  ebx, 4
79
    sub  ebx, 4
80
    mov  eax, 200
80
    mov  eax, 200
81
    div  bl
81
    div  bl
82
    mov  byte[speed_up_counter],    al
82
    mov  byte[speed_up_counter],    al
83
    mov  byte[speed_up_counter+1],  al
83
    mov  byte[speed_up_counter+1],  al
84
      invoke  ini.get_str, cur_dir_path, aPreferences, aTheme, aTheme_name, 31, aTheme_name
84
      invoke  ini.get_str, cur_dir_path, aPreferences, aTheme, aTheme_name, 31, aTheme_name
85
      invoke  ini.get_int, cur_dir_path, aPreferences, aSmart_reverse, 0
85
      invoke  ini.get_int, cur_dir_path, aPreferences, aSmart_reverse, 0
86
    mov  [smart_reverse],   eax
86
    mov  [smart_reverse],   eax
87
      invoke  ini.get_int, cur_dir_path, aPreferences, aShow_lives_style, 2
87
      invoke  ini.get_int, cur_dir_path, aPreferences, aShow_lives_style, 2
88
    mov  [show_lives_style],    eax
88
    mov  [show_lives_style],    eax
89
      invoke  ini.get_int, cur_dir_path, aPreferences, aDraw_level_name_in_window_title, 1
89
      invoke  ini.get_int, cur_dir_path, aPreferences, aDraw_level_name_in_window_title, 1
90
    mov  [draw_level_name_in_window_title], eax
90
    mov  [draw_level_name_in_window_title], eax
91
      invoke  ini.get_str, cur_dir_path, aPreferences, aSeparating_symbol, separating_symbol, 3, default_separating_symbol
91
      invoke  ini.get_str, cur_dir_path, aPreferences, aSeparating_symbol, separating_symbol, 3, default_separating_symbol
92
 
92
 
93
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_left, 0x23, 0
93
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_left, 0x23, 0
94
    mov  [shortcut_move_left],  al
94
    mov  [shortcut_move_left],  al
95
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_down, 0x24, 0
95
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_down, 0x24, 0
96
    mov  [shortcut_move_down],  al
96
    mov  [shortcut_move_down],  al
97
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_up, 0x25, 0
97
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_up, 0x25, 0
98
    mov  [shortcut_move_up],    al
98
    mov  [shortcut_move_up],    al
99
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_right, 0x26, 0
99
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aMove_right, 0x26, 0
100
    mov  [shortcut_move_right], al
100
    mov  [shortcut_move_right], al
101
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aReverse, 0x0F, 0
101
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aReverse, 0x0F, 0
102
    mov  [shortcut_reverse], al
102
    mov  [shortcut_reverse], al
103
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aIncrease, 0x16, 0
103
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aIncrease, 0x16, 0
104
    mov  [shortcut_increase],   al
104
    mov  [shortcut_increase],   al
105
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aDecrease, 0x17, 0
105
      invoke  ini.get_shortcut, cur_dir_path, aShortcuts, aDecrease, 0x17, 0
106
    mov  [shortcut_decrease],   al
106
    mov  [shortcut_decrease],   al
107
 
107
 
108
      invoke  ini.get_int, cur_dir_path, aTheme_name, aDecorations, 3
108
      invoke  ini.get_int, cur_dir_path, aTheme_name, aDecorations, 3
109
    mov  [decorations], eax
109
    mov  [decorations], eax
110
      invoke  ini.get_color, cur_dir_path, aTheme_name, aBackground_color, 0x000000
110
      invoke  ini.get_color, cur_dir_path, aTheme_name, aBackground_color, 0x000000
111
    or   [background_color],    eax
111
    or   [background_color],    eax
112
    or   [window_style_windowed],   eax
112
    or   [window_style_windowed],   eax
113
      invoke  ini.get_color, cur_dir_path, aTheme_name, aDecorations_color, 0xAAAA00
113
      invoke  ini.get_color, cur_dir_path, aTheme_name, aDecorations_color, 0xAAAA00
114
    or   [decorations_color],  eax
114
    or   [decorations_color],  eax
115
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSnake_color, 0x1111ff
115
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSnake_color, 0x1111ff
116
    or   [snake_color], eax
116
    or   [snake_color], eax
117
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSnake_head_color, 0x6B6Bff
117
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSnake_head_color, 0x6B6Bff
118
    or   [snake_head_color], eax
118
    or   [snake_head_color], eax
119
      invoke  ini.get_color, cur_dir_path, aTheme_name, aLives_in_head_number_color, 0xff8800
119
      invoke  ini.get_color, cur_dir_path, aTheme_name, aLives_in_head_number_color, 0xff8800
120
    or   [lives_in_head_number_color],  eax
120
    or   [lives_in_head_number_color],  eax
121
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSnake_picture_color, 0x4488ff
121
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSnake_picture_color, 0x4488ff
122
    or   [snake_picture_color], eax
122
    or   [snake_picture_color], eax
123
      invoke  ini.get_color, cur_dir_path, aTheme_name, aVersion_picture_color, 0x55ff55
123
      invoke  ini.get_color, cur_dir_path, aTheme_name, aVersion_picture_color, 0x55ff55
124
    or   [version_picture_color],   eax
124
    or   [version_picture_color],   eax
125
      invoke  ini.get_color, cur_dir_path, aTheme_name, aPause_picture_color, 0x11ff11
125
      invoke  ini.get_color, cur_dir_path, aTheme_name, aPause_picture_color, 0x11ff11
126
    or   [pause_picture_color], eax
126
    or   [pause_picture_color], eax
127
      invoke  ini.get_color, cur_dir_path, aTheme_name, aGame_over_picture_color, 0xff1111
127
      invoke  ini.get_color, cur_dir_path, aTheme_name, aGame_over_picture_color, 0xff1111
128
    or   [game_over_picture_color], eax
128
    or   [game_over_picture_color], eax
129
      invoke  ini.get_color, cur_dir_path, aTheme_name, aYou_win_picture_color, 0xffff11
129
      invoke  ini.get_color, cur_dir_path, aTheme_name, aYou_win_picture_color, 0xffff11
130
    or   [you_win_picture_color],   eax
130
    or   [you_win_picture_color],   eax
131
      invoke  ini.get_color, cur_dir_path, aTheme_name, aEat_color, 0xffff11
131
      invoke  ini.get_color, cur_dir_path, aTheme_name, aEat_color, 0xffff11
132
    or   [eat_color],   eax
132
    or   [eat_color],   eax
133
      invoke  ini.get_color, cur_dir_path, aTheme_name, aNavigation_strings_color, 0x80ff7777
133
      invoke  ini.get_color, cur_dir_path, aTheme_name, aNavigation_strings_color, 0x80ff7777
134
    or   [navigation_strings_color], eax
134
    or   [navigation_strings_color], eax
135
      invoke  ini.get_color, cur_dir_path, aTheme_name, aGame_over_strings_color, 0x80ff9900
135
      invoke  ini.get_color, cur_dir_path, aTheme_name, aGame_over_strings_color, 0x80ff9900
136
    or   [game_over_strings_color],  eax
136
    or   [game_over_strings_color],  eax
137
      invoke  ini.get_color, cur_dir_path, aTheme_name, aScore_string_color, 0x80ffffff
137
      invoke  ini.get_color, cur_dir_path, aTheme_name, aScore_string_color, 0x80ffffff
138
    or   [score_string_color],   eax
138
    or   [score_string_color],   eax
139
      invoke  ini.get_color, cur_dir_path, aTheme_name, aLevel_string_color, 0xffffff
139
      invoke  ini.get_color, cur_dir_path, aTheme_name, aLevel_string_color, 0xffffff
140
    or   [level_string_color],  eax
140
    or   [level_string_color],  eax
141
      invoke  ini.get_color, cur_dir_path, aTheme_name, aHiscore_string_color, 0x80ffffff
141
      invoke  ini.get_color, cur_dir_path, aTheme_name, aHiscore_string_color, 0x80ffffff
142
    or   [hiscore_string_color],   eax
142
    or   [hiscore_string_color],   eax
143
      invoke  ini.get_color, cur_dir_path, aTheme_name, aChampion_string_color, 0x80ffffff
143
      invoke  ini.get_color, cur_dir_path, aTheme_name, aChampion_string_color, 0x80ffffff
144
    or   [champion_string_color],   eax
144
    or   [champion_string_color],   eax
145
      invoke  ini.get_color, cur_dir_path, aTheme_name, aGame_over_hiscore_color, 0x80ffdd44
145
      invoke  ini.get_color, cur_dir_path, aTheme_name, aGame_over_hiscore_color, 0x80ffdd44
146
    or   [game_over_hiscore_color], eax
146
    or   [game_over_hiscore_color], eax
147
      invoke  ini.get_color, cur_dir_path, aTheme_name, aScore_number_color, 0xffffff
147
      invoke  ini.get_color, cur_dir_path, aTheme_name, aScore_number_color, 0xffffff
148
    or   [score_number_color],   eax
148
    or   [score_number_color],   eax
149
      invoke  ini.get_color, cur_dir_path, aTheme_name, aLevel_number_color, 0xffffff
149
      invoke  ini.get_color, cur_dir_path, aTheme_name, aLevel_number_color, 0xffffff
150
    or   [level_number_color],  eax
150
    or   [level_number_color],  eax
151
      invoke  ini.get_color, cur_dir_path, aTheme_name, aHiscore_number_color, 0x00ffffff
151
      invoke  ini.get_color, cur_dir_path, aTheme_name, aHiscore_number_color, 0x00ffffff
152
    or   [hiscore_number_color],   eax
152
    or   [hiscore_number_color],   eax
153
      invoke  ini.get_color, cur_dir_path, aTheme_name, aChampion_name_color, 0x80ffffff
153
      invoke  ini.get_color, cur_dir_path, aTheme_name, aChampion_name_color, 0x80ffffff
154
    or   [champion_name_color],   eax
154
    or   [champion_name_color],   eax
155
      invoke  ini.get_color, cur_dir_path, aTheme_name, aEdit_box_selection_color, 0x00aa00
155
      invoke  ini.get_color, cur_dir_path, aTheme_name, aEdit_box_selection_color, 0x00aa00
156
    or   [edit1.shift_color],   eax
156
    or   [edit1.shift_color],   eax
157
      invoke  ini.get_color, cur_dir_path, aTheme_name, aButton_color, 0xDDDDDD
157
      invoke  ini.get_color, cur_dir_path, aTheme_name, aButton_color, 0xDDDDDD
158
    or   [button_color],    eax
158
    or   [button_color],    eax
159
      invoke  ini.get_color, cur_dir_path, aTheme_name, aButton_text_color, 0x000000
159
      invoke  ini.get_color, cur_dir_path, aTheme_name, aButton_text_color, 0x000000
160
    or   [button_text_color],   eax
160
    or   [button_text_color],   eax
161
      invoke  ini.get_color, cur_dir_path, aTheme_name, aStone_color, 0x5f8700
161
      invoke  ini.get_color, cur_dir_path, aTheme_name, aStone_color, 0x5f8700
162
    or   [stone_color], eax
162
    or   [stone_color], eax
163
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSplash_background_color, 0xAAAA00
163
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSplash_background_color, 0xAAAA00
164
    or   [splash_background_color],    eax
164
    or   [splash_background_color],    eax
165
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSplash_level_number_color, 0x000000
165
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSplash_level_number_color, 0x000000
166
    or   [splash_level_number_color],   eax
166
    or   [splash_level_number_color],   eax
167
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSplash_level_string_color, 0x000000
167
      invoke  ini.get_color, cur_dir_path, aTheme_name, aSplash_level_string_color, 0x000000
168
    or   [splash_level_string_color],   eax
168
    or   [splash_level_string_color],   eax
169
 
169
 
170
      invoke  ini.get_int, cur_dir_path, aReserved, aSquare_side_length, 19
170
      invoke  ini.get_int, cur_dir_path, aReserved, aSquare_side_length, 19
171
    mov  [square_side_length],  eax
171
    mov  [square_side_length],  eax
172
      invoke  ini.get_str, cur_dir_path, aReserved, aChampion_name_classic, champion_name_classic, CHAMPION_NAME_LENGTH, champion_name_classic
172
      invoke  ini.get_str, cur_dir_path, aReserved, aChampion_name_classic, champion_name_classic, CHAMPION_NAME_LENGTH, champion_name_classic
173
      invoke  ini.get_int, cur_dir_path, aReserved, aHiscore_classic, 777
173
      invoke  ini.get_int, cur_dir_path, aReserved, aHiscore_classic, 777
174
    or   [hi_score_classic],    eax
174
    or   [hi_score_classic],    eax
175
      invoke  ini.get_str, cur_dir_path, aReserved, aChampion_name_levels, champion_name_levels, CHAMPION_NAME_LENGTH, champion_name_levels
175
      invoke  ini.get_str, cur_dir_path, aReserved, aChampion_name_levels, champion_name_levels, CHAMPION_NAME_LENGTH, champion_name_levels
176
      invoke  ini.get_int, cur_dir_path, aReserved, aHiscore_levels, 777
176
      invoke  ini.get_int, cur_dir_path, aReserved, aHiscore_levels, 777
177
    or   [hi_score_levels], eax
177
    or   [hi_score_levels], eax
178
 
178
 
179
    mov  eax, [background_color]
179
    mov  eax, [background_color]
180
    mov  [edit1.color], eax
180
    mov  [edit1.color], eax
181
    mov  [edit1.focus_border_color],    eax
181
    mov  [edit1.focus_border_color],    eax
182
    mov  [edit1.blur_border_color], eax
182
    mov  [edit1.blur_border_color], eax
183
    mov  eax, [game_over_hiscore_color]
183
    mov  eax, [game_over_hiscore_color]
184
    mov  [edit1.text_color],    eax
184
    mov  [edit1.text_color],    eax
185
 
185
 
186
      mcall     37,4,cursor_data,2                  ; load empty cursor (for "hiding" cursor while level_mode)
186
      mcall     37,4,cursor_data,2                  ; load empty cursor (for "hiding" cursor while level_mode)
187
    mov  [cursor_handle],   eax
187
    mov  [cursor_handle],   eax
188
 
188
 
189
    mov  eax, WINDOW_MODE_WINDOWED
189
    mov  eax, WINDOW_MODE_WINDOWED
190
      call      Set_window_mode
190
      call      Set_window_mode
191
      mcall     0,0,0,0x51000000                    ; create empty window. Set_geometry will set all parameters
191
      mcall     0,0,0,0x51000000                    ; create empty window. Set_geometry will set all parameters
192
      call      Set_geometry.by_hotkey
192
      call      Set_geometry.by_hotkey
193
      mcall     71,1,window_title
193
      mcall     71,1,window_title
194
 
194
 
195
include 'first_menu.asm'            ; First menu body and functions
195
include 'first_menu.asm'            ; First menu body and functions
196
include 'level.asm'                 ; Level body and functions (game process)
196
include 'level.asm'                 ; Level body and functions (game process)
197
include 'pause.asm'                 ; Pause body and functions
197
include 'pause.asm'                 ; Pause body and functions
198
include 'game_over.asm'             ; Game_over body and functions
198
include 'game_over.asm'             ; Game_over body and functions
199
 
199
 
200
;;===Some_functions============================================================================================================
200
;;===Some_functions============================================================================================================
201
 
201
 
202
 
202
 
203
Save_do_smth_else_and_exit:
203
Save_do_smth_else_and_exit:
204
    ;;===Save_do_smth_else_and_exit============================================================================================
204
    ;;===Save_do_smth_else_and_exit============================================================================================
205
 
205
 
206
      mcall     37,6,[cursor_handle]                ; delete cursor
206
      mcall     37,6,[cursor_handle]                ; delete cursor
207
 
207
 
208
      invoke    ini.set_int, cur_dir_path, aReserved, aSquare_side_length, [square_side_length]
208
      invoke    ini.set_int, cur_dir_path, aReserved, aSquare_side_length, [square_side_length]
209
 
209
 
210
    mov  edi, champion_name_classic
210
    mov  edi, champion_name_classic
211
    xor  al,  al
211
    xor  al,  al
212
    mov  ecx, CHAMPION_NAME_LENGTH+1
212
    mov  ecx, CHAMPION_NAME_LENGTH+1
213
    cld
213
    cld
214
    repne scasb
214
    repne scasb
215
    neg  ecx
215
    neg  ecx
216
    add  ecx, CHAMPION_NAME_LENGTH
216
    add  ecx, CHAMPION_NAME_LENGTH
217
      invoke    ini.set_str, cur_dir_path, aReserved, aChampion_name_classic, champion_name_classic, ecx
217
      invoke    ini.set_str, cur_dir_path, aReserved, aChampion_name_classic, champion_name_classic, ecx
218
      invoke    ini.set_int, cur_dir_path, aReserved, aHiscore_classic, [hi_score_classic]
218
      invoke    ini.set_int, cur_dir_path, aReserved, aHiscore_classic, [hi_score_classic]
219
 
219
 
220
    mov  edi, champion_name_levels
220
    mov  edi, champion_name_levels
221
    xor  al,  al
221
    xor  al,  al
222
    mov  ecx, CHAMPION_NAME_LENGTH+1
222
    mov  ecx, CHAMPION_NAME_LENGTH+1
223
    cld
223
    cld
224
    repne scasb
224
    repne scasb
225
    neg  ecx
225
    neg  ecx
226
    add  ecx, CHAMPION_NAME_LENGTH
226
    add  ecx, CHAMPION_NAME_LENGTH
227
      invoke    ini.set_str, cur_dir_path, aReserved, aChampion_name_levels, champion_name_levels, ecx
227
      invoke    ini.set_str, cur_dir_path, aReserved, aChampion_name_levels, champion_name_levels, ecx
228
      invoke    ini.set_int, cur_dir_path, aReserved, aHiscore_levels, [hi_score_levels]
228
      invoke    ini.set_int, cur_dir_path, aReserved, aHiscore_levels, [hi_score_levels]
229
 
229
 
230
    ;;---Save_do_smth_else_and_exit--------------------------------------------------------------------------------------------
230
    ;;---Save_do_smth_else_and_exit--------------------------------------------------------------------------------------------
231
 
231
 
232
 
232
 
233
Exit:
233
Exit:
234
    ;;===Exit==================================================================================================================
234
    ;;===Exit==================================================================================================================
235
 
235
 
236
    or  eax,    -1
236
    or  eax,    -1
237
    int 0x40
237
    int 0x40
238
    
238
    
239
    ;;---Exit------------------------------------------------------------------------------------------------------------------
239
    ;;---Exit------------------------------------------------------------------------------------------------------------------
240
 
240
 
241
 
241
 
242
Set_geometry:
242
Set_geometry:
243
    ;;===Set_geometry==========================================================================================================
243
    ;;===Set_geometry==========================================================================================================
244
 
244
 
245
    cmp  [resized_by_hotkey],   1
245
    cmp  [resized_by_hotkey],   1
246
     je  .by_hotkey
246
     je  .by_hotkey
247
 
247
 
248
    test [proc_info.wnd_state], 0x01
248
    test [proc_info.wnd_state], 0x01
249
     jnz .by_hotkey
249
     jnz .by_hotkey
250
 
250
 
251
      mcall     9,proc_info,-1
251
      mcall     9,proc_info,-1
252
    mov  eax, [proc_info.box.width]
252
    mov  eax, [proc_info.box.width]
253
    cmp  eax, [window_width]
253
    cmp  eax, [window_width]
254
     jne @f
254
     jne @f
255
    mov  eax, [proc_info.box.height]
255
    mov  eax, [proc_info.box.height]
256
    cmp  eax, [window_height]
256
    cmp  eax, [window_height]
257
     jne @f
257
     jne @f
258
     jmp .quit
258
     jmp .quit
259
  @@:
259
  @@:
260
    mov  eax, [proc_info.box.width]
260
    mov  eax, [proc_info.box.width]
261
    mov  [window_width],    eax
261
    mov  [window_width],    eax
262
    mov  eax, [proc_info.box.height]
262
    mov  eax, [proc_info.box.height]
263
    mov  [window_height],   eax
263
    mov  [window_height],   eax
264
 
264
 
265
  .by_mouse:                                    ; or any other kind of resizing. for example, double click on window title
265
  .by_mouse:                                    ; or any other kind of resizing. for example, double click on window title
266
 
266
 
267
    test [proc_info.wnd_state], 0x01
267
    test [proc_info.wnd_state], 0x01
268
     jnz .by_hotkey
268
     jnz .by_hotkey
269
    
269
    
270
 
270
 
271
    cmp  [window_width],    250
271
    cmp  [window_width],    250
272
     jnl @f
272
     jnl @f
273
    mov  [window_width],    250
273
    mov  [window_width],    250
274
  @@:
274
  @@:
275
    cmp  [window_height],   150
275
    cmp  [window_height],   150
276
     jnl @f
276
     jnl @f
277
    mov  [window_height],   150
277
    mov  [window_height],   150
278
  @@:
278
  @@:
279
 
279
 
280
      mcall     48,4
280
      mcall     48,4
281
    mov  ecx, [window_height]
281
    mov  ecx, [window_height]
282
    sub  ecx, eax
282
    sub  ecx, eax
283
    sub  ecx, 5
283
    sub  ecx, 5
284
    sub  ecx, [g_e]
284
    sub  ecx, [g_e]
285
    sub  ecx, [g_e]
285
    sub  ecx, [g_e]
286
    sub  ecx, 25+30
286
    sub  ecx, 25+30
287
    mov  esi, ecx
287
    mov  esi, ecx
288
 
288
 
289
    mov  eax, [window_width]
289
    mov  eax, [window_width]
290
    sub  eax, 5+5
290
    sub  eax, 5+5
291
    sub  eax, [g_e]
291
    sub  eax, [g_e]
292
    sub  eax, [g_e]
292
    sub  eax, [g_e]
293
    sub  eax, [g_s]
293
    sub  eax, [g_s]
294
    sub  eax, [g_s]
294
    sub  eax, [g_s]
295
    mov  edi, eax
295
    mov  edi, eax
296
 
296
 
297
    mov  dx,  0
297
    mov  dx,  0
298
    div  cx
298
    div  cx
299
    cmp  ax,  2
299
    cmp  ax,  2
300
     jl  .fit_to_width
300
     jl  .fit_to_width
301
 
301
 
302
  .fit_to_height:
302
  .fit_to_height:
303
    mov  eax, esi
303
    mov  eax, esi
304
    mov  ebx, GRID_HEIGHT
304
    mov  ebx, GRID_HEIGHT
305
    div  bl
305
    div  bl
306
    cmp  al,  MIN_SQUARE_SIDE_LENGTH
306
    cmp  al,  MIN_SQUARE_SIDE_LENGTH
307
     jnl @f
307
     jnl @f
308
    mov  al,  MIN_SQUARE_SIDE_LENGTH
308
    mov  al,  MIN_SQUARE_SIDE_LENGTH
309
  @@:
309
  @@:
310
    dec al
310
    dec al
311
    mov byte[square_side_length],   al
311
    mov byte[square_side_length],   al
312
     jmp .by_hotkey
312
     jmp .by_hotkey
313
 
313
 
314
  .fit_to_width:
314
  .fit_to_width:
315
    mov  eax, edi
315
    mov  eax, edi
316
    mov  ebx, GRID_WIDTH
316
    mov  ebx, GRID_WIDTH
317
    div  bl
317
    div  bl
318
    cmp  al,  MIN_SQUARE_SIDE_LENGTH
318
    cmp  al,  MIN_SQUARE_SIDE_LENGTH
319
     jnl @f
319
     jnl @f
320
    mov  al,  MIN_SQUARE_SIDE_LENGTH
320
    mov  al,  MIN_SQUARE_SIDE_LENGTH
321
  @@:
321
  @@:
322
    dec al
322
    dec al
323
    mov byte[square_side_length],   al
323
    mov byte[square_side_length],   al
324
     jmp .by_hotkey
324
     jmp .by_hotkey
325
 
325
 
326
;     jmp .done
326
;     jmp .done
327
 
327
 
328
  .by_hotkey:
328
  .by_hotkey:
329
      mcall     9,proc_info,-1
329
      mcall     9,proc_info,-1
330
    mov  [resized_by_hotkey],   0
330
    mov  [resized_by_hotkey],   0
331
 
331
 
332
    mov  eax, [square_side_length]
332
    mov  eax, [square_side_length]
333
    inc  eax                                            ; space between squares
333
    inc  eax                                            ; space between squares
334
    mov  [g_s],   eax
334
    mov  [g_s],   eax
335
 
335
 
336
    mov  eax, [g_s]
336
    mov  eax, [g_s]
337
    shr  eax, 1
337
    shr  eax, 1
338
    mov  ebx, eax
338
    mov  ebx, eax
339
    shr  ebx, 1
339
    shr  ebx, 1
340
    add  eax, ebx
340
    add  eax, ebx
341
    mov  [g_e], eax
341
    mov  [g_e], eax
342
 
342
 
343
    mov  edx, GRID_WIDTH
343
    mov  edx, GRID_WIDTH
344
    mov  eax, [g_s]
344
    mov  eax, [g_s]
345
    mul  dx
345
    mul  dx
346
    mov  [gw_mul_gs],   eax
346
    mov  [gw_mul_gs],   eax
347
 
347
 
348
    mov  edx, GRID_HEIGHT
348
    mov  edx, GRID_HEIGHT
349
    mov  eax, [g_s]
349
    mov  eax, [g_s]
350
    mul  dx
350
    mul  dx
351
    mov  [gh_mul_gs],   eax
351
    mov  [gh_mul_gs],   eax
352
 
352
 
353
    mov  eax, [gw_mul_gs]
353
    mov  eax, [gw_mul_gs]
354
    add  eax, [g_s]
354
    add  eax, [g_s]
355
    add  eax, [g_s]
355
    add  eax, [g_s]
356
    add  eax, [g_e]
356
    add  eax, [g_e]
357
    add  eax, [g_e]
357
    add  eax, [g_e]
358
    add  eax, 5*2                                   ; skin width
358
    add  eax, 5*2                                   ; skin width
359
    mov  esi, eax
359
    mov  esi, eax
360
    test [proc_info.wnd_state], 0x01
360
    test [proc_info.wnd_state], 0x01
361
    cmovnz  eax, [proc_info.box.width]
361
    cmovnz  eax, [proc_info.box.width]
362
    mov  [window_width],    eax
362
    mov  [window_width],    eax
363
 
363
 
364
    sub  eax, [gw_mul_gs]
364
    sub  eax, [gw_mul_gs]
365
    sub  eax, 5*2
365
    sub  eax, 5*2
366
    shr  eax, 1
366
    shr  eax, 1
367
    mov  [gbxm1],   eax
367
    mov  [gbxm1],   eax
368
 
368
 
369
      mcall     48,4                                ; get skin header height
369
      mcall     48,4                                ; get skin header height
370
    mov  ebx, eax
370
    mov  ebx, eax
371
    add  eax, [gh_mul_gs]
371
    add  eax, [gh_mul_gs]
372
    add  eax, [g_e]
372
    add  eax, [g_e]
373
    add  eax, 25
373
    add  eax, 25
374
    add  eax, [g_e]
374
    add  eax, [g_e]
375
    add  eax, 30
375
    add  eax, 30
376
    add  eax, 5                                      ; skin height (bottom part)
376
    add  eax, 5                                      ; skin height (bottom part)
377
    mov  edi, eax
377
    mov  edi, eax
378
    test [proc_info.wnd_state], 0x01
378
    test [proc_info.wnd_state], 0x01
379
    cmovnz  eax, [proc_info.box.height]
379
    cmovnz  eax, [proc_info.box.height]
380
    mov  [window_height],   eax
380
    mov  [window_height],   eax
381
 
381
 
382
    sub  eax, [gh_mul_gs]
382
    sub  eax, [gh_mul_gs]
383
    sub  eax, ebx
383
    sub  eax, ebx
384
    sub  eax, 5
384
    sub  eax, 5
385
    sub  eax, 5
385
    sub  eax, 5
386
    
386
    
387
    shr  eax, 1
387
    shr  eax, 1
388
    mov  [gbym1],   eax
388
    mov  [gbym1],   eax
389
 
389
 
390
    mov  eax, [g_s]
390
    mov  eax, [g_s]
391
    shl  eax, 16
391
    shl  eax, 16
392
    add  eax, [g_s]
392
    add  eax, [g_s]
393
    mov  [gs_shl16_gs], eax
393
    mov  [gs_shl16_gs], eax
394
 
394
 
395
    mov  eax, [gbxm1]
395
    mov  eax, [gbxm1]
396
    shl  eax, 16
396
    shl  eax, 16
397
    add  eax, [gbxm1]
397
    add  eax, [gbxm1]
398
    mov  [gbxm1_shl16_gbxm1],   eax
398
    mov  [gbxm1_shl16_gbxm1],   eax
399
 
399
 
400
    mov  eax, [gbym1]
400
    mov  eax, [gbym1]
401
    shl  eax, 16
401
    shl  eax, 16
402
    add  eax, [gbym1]
402
    add  eax, [gbym1]
403
    mov  [gbym1_shl16_gbym1],   eax
403
    mov  [gbym1_shl16_gbym1],   eax
404
 
404
 
405
    mov  eax, [gbxm1]
405
    mov  eax, [gbxm1]
406
    add  eax, [gw_mul_gs]
406
    add  eax, [gw_mul_gs]
407
    mov  [gbxm1_plus_gw_mul_gs],    eax
407
    mov  [gbxm1_plus_gw_mul_gs],    eax
408
 
408
 
409
    mov  eax, [gbym1]
409
    mov  eax, [gbym1]
410
    add  eax, [gh_mul_gs]
410
    add  eax, [gh_mul_gs]
411
    mov  [gbym1_plus_gh_mul_gs],    eax
411
    mov  [gbym1_plus_gh_mul_gs],    eax
412
 
412
 
413
      mcall     48, 5
413
      mcall     48, 5
414
    mov  dx,  ax
414
    mov  dx,  ax
415
    shr  eax, 16
415
    shr  eax, 16
416
    sub  dx,  ax
416
    sub  dx,  ax
417
    cmp  dx,  si                                    ; does window fit to work area width?
417
    cmp  dx,  si                                    ; does window fit to work area width?
418
     jnl @f
418
     jnl @f
419
    dec  [square_side_length]
419
    dec  [square_side_length]
420
     jmp Set_geometry.by_hotkey
420
     jmp Set_geometry.by_hotkey
421
  @@:
421
  @@:
422
 
422
 
423
    mov  cx,  bx
423
    mov  cx,  bx
424
    shr  ebx, 16
424
    shr  ebx, 16
425
    sub  cx,  bx
425
    sub  cx,  bx
426
    cmp  cx,  di                                    ; does window fit to work area height?
426
    cmp  cx,  di                                    ; does window fit to work area height?
427
     jnl @f
427
     jnl @f
428
    dec  [square_side_length]
428
    dec  [square_side_length]
429
     jmp Set_geometry.by_hotkey
429
     jmp Set_geometry.by_hotkey
430
  @@:
430
  @@:
431
 
431
 
432
    sub  dx,  si
432
    sub  dx,  si
433
    shr  dx,  1
433
    shr  dx,  1
434
    mov  word[wp_x],    dx
434
    mov  word[wp_x],    dx
435
    sub  cx,  word[window_height]
435
    sub  cx,  word[window_height]
436
    shr  cx,  1
436
    shr  cx,  1
437
    mov  dx,  cx
437
    mov  dx,  cx
438
    shr  cx,  1
438
    shr  cx,  1
439
    add  cx,  dx
439
    add  cx,  dx
440
    mov  word[wp_y],    cx
440
    mov  word[wp_y],    cx
441
 
441
 
442
    mov  [top_strings], 8
442
    mov  [top_strings], 8
443
    mov  eax, [window_height]
443
    mov  eax, [window_height]
444
    sub  eax, 50
444
    sub  eax, 50
445
    mov  [bottom_top_strings],  eax
445
    mov  [bottom_top_strings],  eax
446
    add  eax, 6
446
    add  eax, 6
447
    mov  [bottom_middle_strings],  eax
447
    mov  [bottom_middle_strings],  eax
448
    add  eax, 6
448
    add  eax, 6
449
    mov  [bottom_bottom_strings],  eax
449
    mov  [bottom_bottom_strings],  eax
450
 
450
 
451
    sub  eax, 4
451
    sub  eax, 4
452
    mov  [edit1.top],   eax
452
    mov  [edit1.top],   eax
453
 
453
 
454
 
454
 
455
    mov  eax, [g_s]
455
    mov  eax, [g_s]
456
    shl  eax, 2
456
    shl  eax, 2
457
    sub  eax, 2
457
    sub  eax, 2
458
    mov  [button_width_short],  eax
458
    mov  [button_width_short],  eax
459
    mov  eax, [g_s]
459
    mov  eax, [g_s]
460
    shl  eax, 3
460
    shl  eax, 3
461
    add  eax, [g_s]
461
    add  eax, [g_s]
462
    sub  eax, 2
462
    sub  eax, 2
463
    mov  [button_width_long],   eax
463
    mov  [button_width_long],   eax
464
    mov  eax, [g_s]
464
    mov  eax, [g_s]
465
    sub  eax, 2
465
    sub  eax, 2
466
    mov  [button_height],   eax
466
    mov  [button_height],   eax
467
 
467
 
468
    mov  bl,  0x10
468
    mov  bl,  0x10
469
    mov  cl,  0x08
469
    mov  cl,  0x08
470
 
470
 
471
    mov  al,  byte[g_s]
471
    mov  al,  byte[g_s]
472
    mul  bl
472
    mul  bl
473
    mov  bx,  ax
473
    mov  bx,  ax
474
    add  bx,  word[gbxm1]
474
    add  bx,  word[gbxm1]
475
    inc  bx
475
    inc  bx
476
 
476
 
477
    mov  al,  byte[g_s]
477
    mov  al,  byte[g_s]
478
    mul  cl
478
    mul  cl
479
    mov  cx,  ax
479
    mov  cx,  ax
480
    add  cx,  word[gbym1]
480
    add  cx,  word[gbym1]
481
    inc  cx
481
    inc  cx
482
    
482
    
483
    mov  [button_x_left],   ebx
483
    mov  [button_x_left],   ebx
484
    mov  [button_y_top],    ecx
484
    mov  [button_y_top],    ecx
485
    
485
    
486
    add  ebx, [g_s]
486
    add  ebx, [g_s]
487
    add  ebx, [g_s]
487
    add  ebx, [g_s]
488
    add  ebx, [g_s]
488
    add  ebx, [g_s]
489
    add  ebx, [g_s]
489
    add  ebx, [g_s]
490
    add  ebx, [g_s]
490
    add  ebx, [g_s]
491
    
491
    
492
    mov  [button_x_right],  ebx
492
    mov  [button_x_right],  ebx
493
    
493
    
494
    add  ecx,  [g_s]
494
    add  ecx,  [g_s]
495
    add  ecx,  [g_s]
495
    add  ecx,  [g_s]
496
    
496
    
497
    mov  [button_y_middle], ecx
497
    mov  [button_y_middle], ecx
498
    
498
    
499
    add  ecx,  [g_s]
499
    add  ecx,  [g_s]
500
    add  ecx,  [g_s]
500
    add  ecx,  [g_s]
501
    
501
    
502
    mov  [button_y_bottom], ecx
502
    mov  [button_y_bottom], ecx
503
 
503
 
504
  .done:
504
  .done:
505
      mcall     67,[wp_x],[wp_y],[window_width],[window_height]
505
      mcall     67,[wp_x],[wp_y],[window_width],[window_height]
506
 
506
 
507
  .quit:
507
  .quit:
508
    ret
508
    ret
509
 
509
 
510
    ;;---Set_geometry------------------------------------------------------------------------------------------------------
510
    ;;---Set_geometry------------------------------------------------------------------------------------------------------
511
 
511
 
512
 
512
 
513
Increase_geometry:
513
Increase_geometry:
514
    ;;===Increase_geometry=================================================================================================
514
    ;;===Increase_geometry=================================================================================================
515
 
515
 
516
    inc  [square_side_length]
516
    inc  [square_side_length]
517
    mov  [resized_by_hotkey],   1
517
    mov  [resized_by_hotkey],   1
518
 
518
 
519
    ret
519
    ret
520
 
520
 
521
    ;;---Increase_geometry-------------------------------------------------------------------------------------------------
521
    ;;---Increase_geometry-------------------------------------------------------------------------------------------------
522
 
522
 
523
 
523
 
524
Decrease_geometry:
524
Decrease_geometry:
525
    ;;===Decrease_geometry=================================================================================================
525
    ;;===Decrease_geometry=================================================================================================
526
 
526
 
527
    cmp  [square_side_length],  MIN_SQUARE_SIDE_LENGTH
527
    cmp  [square_side_length],  MIN_SQUARE_SIDE_LENGTH
528
     je  @f
528
     je  @f
529
    dec  [square_side_length]
529
    dec  [square_side_length]
530
    mov  [resized_by_hotkey],   1
530
    mov  [resized_by_hotkey],   1
531
 
531
 
532
  @@:
532
  @@:
533
    ret
533
    ret
534
 
534
 
535
    ;;---Decrease_geometry-------------------------------------------------------------------------------------------------
535
    ;;---Decrease_geometry-------------------------------------------------------------------------------------------------
536
 
536
 
537
 
537
 
538
Draw_decorations:
538
Draw_decorations:
539
    ;;===Draw_decorations==================================================================================================
539
    ;;===Draw_decorations==================================================================================================
540
 
540
 
541
    mov  al, byte[decorations]
541
    mov  al, byte[decorations]
542
    dec  al
542
    dec  al
543
     jz  grid_lines
543
     jz  grid_lines
544
    dec  al
544
    dec  al
545
     jz  grid_lines_with_ends
545
     jz  grid_lines_with_ends
546
    dec  al
546
    dec  al
547
     jz  grid_lines_with_corners
547
     jz  grid_lines_with_corners
548
    dec  al
548
    dec  al
549
     jz  grid_dots
549
     jz  grid_dots
550
    dec  al
550
    dec  al
551
     jz  borders_lines
551
     jz  borders_lines
552
    dec  al
552
    dec  al
553
     jz  borders_lines_with_corners
553
     jz  borders_lines_with_corners
554
    dec  al
554
    dec  al
555
     jz  borders_dots
555
     jz  borders_dots
556
    dec  al
556
    dec  al
557
     jz  corners_dots
557
     jz  corners_dots
558
    dec  al
558
    dec  al
559
     jz  corners_inner
559
     jz  corners_inner
560
    dec  al
560
    dec  al
561
     jz  corners_outer
561
     jz  corners_outer
562
    dec  al
562
    dec  al
563
     jz  corners_crosses
563
     jz  corners_crosses
564
    ret
564
    ret
565
 
565
 
566
 
566
 
567
  grid_lines:
567
  grid_lines:
568
 
568
 
569
    mov  eax, 38
569
    mov  eax, 38
570
;mov  ebx, (GRID_BEGIN_X-1)*65536+(GRID_BEGIN_X-1)
570
;mov  ebx, (GRID_BEGIN_X-1)*65536+(GRID_BEGIN_X-1)
571
    mov  ebx, [gbxm1_shl16_gbxm1]
571
    mov  ebx, [gbxm1_shl16_gbxm1]
572
;mov  ecx, (GRID_BEGIN_Y-1)*65536+(GRID_BEGIN_Y-1+GRID_HEIGHT*GRID_STEP)
572
;mov  ecx, (GRID_BEGIN_Y-1)*65536+(GRID_BEGIN_Y-1+GRID_HEIGHT*GRID_STEP)
573
    mov  ecx, [gbym1_shl16_gbym1]
573
    mov  ecx, [gbym1_shl16_gbym1]
574
    add  ecx, [gh_mul_gs]
574
    add  ecx, [gh_mul_gs]
575
    mov  edx, [decorations_color]
575
    mov  edx, [decorations_color]
576
    mov  esi, GRID_WIDTH
576
    mov  esi, GRID_WIDTH
577
    add  esi, 1
577
    add  esi, 1
578
 
578
 
579
  @@:
579
  @@:
580
      mcall
580
      mcall
581
    add  ebx, [gs_shl16_gs]
581
    add  ebx, [gs_shl16_gs]
582
    dec  esi
582
    dec  esi
583
     jnz @b
583
     jnz @b
584
 
584
 
585
;mov  ebx, (GRID_BEGIN_X-1)*65536+(GRID_BEGIN_X-1+GRID_WIDTH*GRID_STEP)
585
;mov  ebx, (GRID_BEGIN_X-1)*65536+(GRID_BEGIN_X-1+GRID_WIDTH*GRID_STEP)
586
    mov  ebx, [gbxm1_shl16_gbxm1]
586
    mov  ebx, [gbxm1_shl16_gbxm1]
587
    add  ebx, [gw_mul_gs]
587
    add  ebx, [gw_mul_gs]
588
    mov  ecx, [gbym1_shl16_gbym1]
588
    mov  ecx, [gbym1_shl16_gbym1]
589
    mov  esi, GRID_HEIGHT
589
    mov  esi, GRID_HEIGHT
590
    add  esi, 1
590
    add  esi, 1
591
    
591
    
592
  @@:
592
  @@:
593
      mcall
593
      mcall
594
    add  ecx, [gs_shl16_gs]
594
    add  ecx, [gs_shl16_gs]
595
    dec  esi
595
    dec  esi
596
     jnz @b
596
     jnz @b
597
 
597
 
598
    ret
598
    ret
599
 
599
 
600
 
600
 
601
  grid_lines_with_ends:
601
  grid_lines_with_ends:
602
 
602
 
603
    mov  eax, 38
603
    mov  eax, 38
604
    mov  ebx, [gbxm1_shl16_gbxm1]
604
    mov  ebx, [gbxm1_shl16_gbxm1]
605
    mov  ecx, [gbym1]
605
    mov  ecx, [gbym1]
606
    sub  ecx, [g_e]
606
    sub  ecx, [g_e]
607
    shl  ecx, 16
607
    shl  ecx, 16
608
    add  ecx, [gbym1_plus_gh_mul_gs]
608
    add  ecx, [gbym1_plus_gh_mul_gs]
609
    add  ecx, [g_e]
609
    add  ecx, [g_e]
610
    mov  edx, [decorations_color]
610
    mov  edx, [decorations_color]
611
    mov  esi, GRID_WIDTH
611
    mov  esi, GRID_WIDTH
612
    add  esi, 1
612
    add  esi, 1
613
 
613
 
614
  @@:
614
  @@:
615
      mcall
615
      mcall
616
    add  ebx, [gs_shl16_gs]
616
    add  ebx, [gs_shl16_gs]
617
    dec  esi
617
    dec  esi
618
     jnz @b
618
     jnz @b
619
 
619
 
620
    mov  ebx, [gbxm1]
620
    mov  ebx, [gbxm1]
621
    sub  ebx, [g_e]
621
    sub  ebx, [g_e]
622
    shl  ebx, 16
622
    shl  ebx, 16
623
    add  ebx, [gbxm1_plus_gw_mul_gs]
623
    add  ebx, [gbxm1_plus_gw_mul_gs]
624
    add  ebx, [g_e]
624
    add  ebx, [g_e]
625
    mov  ecx, [gbym1_shl16_gbym1]
625
    mov  ecx, [gbym1_shl16_gbym1]
626
    mov  esi, GRID_HEIGHT
626
    mov  esi, GRID_HEIGHT
627
    add  esi, 1
627
    add  esi, 1
628
    
628
    
629
  @@:
629
  @@:
630
      mcall
630
      mcall
631
    add  ecx, [gs_shl16_gs]
631
    add  ecx, [gs_shl16_gs]
632
    dec  esi
632
    dec  esi
633
     jnz @b
633
     jnz @b
634
 
634
 
635
    ret
635
    ret
636
 
636
 
637
 
637
 
638
  grid_lines_with_corners:
638
  grid_lines_with_corners:
639
 
639
 
640
      call      grid_lines
640
      call      grid_lines
641
      call      corners_outer
641
      call      corners_outer
642
 
642
 
643
    ret
643
    ret
644
 
644
 
645
 
645
 
646
  grid_dots:
646
  grid_dots:
647
 
647
 
648
    mov  eax, 1
648
    mov  eax, 1
649
    mov  ebx, [gbxm1]
649
    mov  ebx, [gbxm1]
650
    mov  ecx, [gbym1]
650
    mov  ecx, [gbym1]
651
    mov  edx, [decorations_color]
651
    mov  edx, [decorations_color]
652
 
652
 
653
  @@:
653
  @@:
654
      mcall
654
      mcall
655
    add  ebx, [g_s]
655
    add  ebx, [g_s]
656
    cmp  ebx, [gbxm1_plus_gw_mul_gs]
656
    cmp  ebx, [gbxm1_plus_gw_mul_gs]
657
     jng @b
657
     jng @b
658
    add  ecx, [g_s]
658
    add  ecx, [g_s]
659
    cmp  ecx, [gbym1_plus_gh_mul_gs]
659
    cmp  ecx, [gbym1_plus_gh_mul_gs]
660
     jg  @f
660
     jg  @f
661
    mov  ebx, [gbxm1]
661
    mov  ebx, [gbxm1]
662
     jmp @b
662
     jmp @b
663
 
663
 
664
  @@:
664
  @@:
665
    ret
665
    ret
666
 
666
 
667
 
667
 
668
  borders_lines:
668
  borders_lines:
669
 
669
 
670
    mov  eax, 38
670
    mov  eax, 38
671
    mov  ebx, [gbxm1_shl16_gbxm1]
671
    mov  ebx, [gbxm1_shl16_gbxm1]
672
    mov  ecx, [gbym1_shl16_gbym1]
672
    mov  ecx, [gbym1_shl16_gbym1]
673
    add  ecx, [gh_mul_gs]
673
    add  ecx, [gh_mul_gs]
674
    mov  edx, [decorations_color]
674
    mov  edx, [decorations_color]
675
      mcall
675
      mcall
676
 
676
 
677
    mov  ebx, [gbxm1_plus_gw_mul_gs]
677
    mov  ebx, [gbxm1_plus_gw_mul_gs]
678
    shl  ebx, 16
678
    shl  ebx, 16
679
    add  ebx, [gbxm1_plus_gw_mul_gs]
679
    add  ebx, [gbxm1_plus_gw_mul_gs]
680
      mcall
680
      mcall
681
 
681
 
682
    mov  ebx, [gbxm1_shl16_gbxm1]
682
    mov  ebx, [gbxm1_shl16_gbxm1]
683
    add  ebx, [gw_mul_gs]
683
    add  ebx, [gw_mul_gs]
684
    mov  ecx, [gbym1_shl16_gbym1]
684
    mov  ecx, [gbym1_shl16_gbym1]
685
      mcall
685
      mcall
686
 
686
 
687
    mov  ecx, [gbym1_plus_gh_mul_gs]
687
    mov  ecx, [gbym1_plus_gh_mul_gs]
688
    shl  ecx, 16
688
    shl  ecx, 16
689
    add  ecx, [gbym1_plus_gh_mul_gs]
689
    add  ecx, [gbym1_plus_gh_mul_gs]
690
      mcall
690
      mcall
691
 
691
 
692
    ret
692
    ret
693
 
693
 
694
 
694
 
695
  borders_lines_with_corners:
695
  borders_lines_with_corners:
696
 
696
 
697
      call      borders_lines
697
      call      borders_lines
698
      call      corners_outer
698
      call      corners_outer
699
 
699
 
700
    ret
700
    ret
701
 
701
 
702
 
702
 
703
  borders_dots:
703
  borders_dots:
704
 
704
 
705
    mov  eax, 1
705
    mov  eax, 1
706
    mov  ebx, [gbxm1]
706
    mov  ebx, [gbxm1]
707
    mov  ecx, [gbym1]
707
    mov  ecx, [gbym1]
708
    mov  edx, [decorations_color]
708
    mov  edx, [decorations_color]
709
  @@:
709
  @@:
710
      mcall
710
      mcall
711
    add  ebx, [g_s]
711
    add  ebx, [g_s]
712
    cmp  ebx, [gbxm1_plus_gw_mul_gs]
712
    cmp  ebx, [gbxm1_plus_gw_mul_gs]
713
     jng @b
713
     jng @b
714
 
714
 
715
    mov  ebx, [gbxm1]
715
    mov  ebx, [gbxm1]
716
    mov  ecx, [gbym1_plus_gh_mul_gs]
716
    mov  ecx, [gbym1_plus_gh_mul_gs]
717
  @@:
717
  @@:
718
      mcall
718
      mcall
719
    add  ebx, [g_s]
719
    add  ebx, [g_s]
720
    cmp  ebx, [gbxm1_plus_gw_mul_gs]
720
    cmp  ebx, [gbxm1_plus_gw_mul_gs]
721
     jng @b
721
     jng @b
722
 
722
 
723
    mov  ebx, [gbxm1]
723
    mov  ebx, [gbxm1]
724
    mov  ecx, [gbym1]
724
    mov  ecx, [gbym1]
725
  @@:
725
  @@:
726
      mcall
726
      mcall
727
    add  ecx, [g_s]
727
    add  ecx, [g_s]
728
    cmp  ecx, [gbym1_plus_gh_mul_gs]
728
    cmp  ecx, [gbym1_plus_gh_mul_gs]
729
     jng @b
729
     jng @b
730
 
730
 
731
    mov  ebx, [gbxm1_plus_gw_mul_gs]
731
    mov  ebx, [gbxm1_plus_gw_mul_gs]
732
    mov  ecx, [gbym1]
732
    mov  ecx, [gbym1]
733
  @@:
733
  @@:
734
      mcall
734
      mcall
735
    add  ecx, [g_s]
735
    add  ecx, [g_s]
736
    cmp  ecx, [gbym1_plus_gh_mul_gs]
736
    cmp  ecx, [gbym1_plus_gh_mul_gs]
737
     jng @b
737
     jng @b
738
 
738
 
739
    ret
739
    ret
740
 
740
 
741
 
741
 
742
  corners_dots:
742
  corners_dots:
743
 
743
 
744
    mov  eax, 13
744
    mov  eax, 13
745
    mov  ebx, [gbxm1]
745
    mov  ebx, [gbxm1]
746
    dec  ebx
746
    dec  ebx
747
    shl  ebx, 16
747
    shl  ebx, 16
748
    add  ebx, 2
748
    add  ebx, 2
749
    mov  ecx, [gbym1]
749
    mov  ecx, [gbym1]
750
    dec  ecx
750
    dec  ecx
751
    shl  ecx, 16
751
    shl  ecx, 16
752
    add  ecx, 2
752
    add  ecx, 2
753
    mov  edx, [decorations_color]
753
    mov  edx, [decorations_color]
754
      mcall
754
      mcall
755
 
755
 
756
    mov  ebx, [gbxm1_plus_gw_mul_gs]
756
    mov  ebx, [gbxm1_plus_gw_mul_gs]
757
    shl  ebx, 16
757
    shl  ebx, 16
758
    add  ebx, 2
758
    add  ebx, 2
759
      mcall
759
      mcall
760
 
760
 
761
    mov  ebx, [gbxm1]
761
    mov  ebx, [gbxm1]
762
    dec  ebx
762
    dec  ebx
763
    shl  ebx, 16
763
    shl  ebx, 16
764
    add  ebx, 2
764
    add  ebx, 2
765
    mov  ecx, [gbym1_plus_gh_mul_gs]
765
    mov  ecx, [gbym1_plus_gh_mul_gs]
766
    shl  ecx, 16
766
    shl  ecx, 16
767
    add  ecx, 2
767
    add  ecx, 2
768
      mcall
768
      mcall
769
 
769
 
770
    mov  ebx, [gbxm1_plus_gw_mul_gs]
770
    mov  ebx, [gbxm1_plus_gw_mul_gs]
771
    shl  ebx, 16
771
    shl  ebx, 16
772
    add  ebx, 2
772
    add  ebx, 2
773
      mcall
773
      mcall
774
 
774
 
775
    ret
775
    ret
776
 
776
 
777
 
777
 
778
  corners_inner:
778
  corners_inner:
779
 
779
 
780
    mov  eax, 38
780
    mov  eax, 38
781
    mov  ebx, [gbxm1_shl16_gbxm1]
781
    mov  ebx, [gbxm1_shl16_gbxm1]
782
    add  ebx, [g_e]
782
    add  ebx, [g_e]
783
    mov  ecx, [gbym1_shl16_gbym1]
783
    mov  ecx, [gbym1_shl16_gbym1]
784
    mov  edx, [decorations_color]
784
    mov  edx, [decorations_color]
785
      mcall
785
      mcall
786
 
786
 
787
    mov  ecx, [gbym1_plus_gh_mul_gs]
787
    mov  ecx, [gbym1_plus_gh_mul_gs]
788
    shl  ecx, 16
788
    shl  ecx, 16
789
    add  ecx, [gbym1_plus_gh_mul_gs]
789
    add  ecx, [gbym1_plus_gh_mul_gs]
790
      mcall
790
      mcall
791
 
791
 
792
    mov  ebx, [gbxm1_plus_gw_mul_gs]
792
    mov  ebx, [gbxm1_plus_gw_mul_gs]
793
    sub  ebx, [g_e]
793
    sub  ebx, [g_e]
794
    shl  ebx, 16
794
    shl  ebx, 16
795
    add  ebx, [gbxm1_plus_gw_mul_gs]
795
    add  ebx, [gbxm1_plus_gw_mul_gs]
796
      mcall
796
      mcall
797
 
797
 
798
    mov  ecx, [gbym1_shl16_gbym1]
798
    mov  ecx, [gbym1_shl16_gbym1]
799
      mcall
799
      mcall
800
 
800
 
801
    mov  ebx, [gbxm1_shl16_gbxm1]
801
    mov  ebx, [gbxm1_shl16_gbxm1]
802
    mov  ecx, [gbym1_shl16_gbym1]
802
    mov  ecx, [gbym1_shl16_gbym1]
803
    add  ecx, [g_e]
803
    add  ecx, [g_e]
804
      mcall
804
      mcall
805
 
805
 
806
    mov  ebx, [gbxm1_plus_gw_mul_gs]
806
    mov  ebx, [gbxm1_plus_gw_mul_gs]
807
    shl  ebx, 16
807
    shl  ebx, 16
808
    add  ebx, [gbxm1_plus_gw_mul_gs]
808
    add  ebx, [gbxm1_plus_gw_mul_gs]
809
      mcall
809
      mcall
810
 
810
 
811
    mov  ecx, [gbym1_plus_gh_mul_gs]
811
    mov  ecx, [gbym1_plus_gh_mul_gs]
812
    sub  ecx, [g_e]
812
    sub  ecx, [g_e]
813
    shl  ecx, 16
813
    shl  ecx, 16
814
    add  ecx, [gbym1_plus_gh_mul_gs]
814
    add  ecx, [gbym1_plus_gh_mul_gs]
815
      mcall
815
      mcall
816
 
816
 
817
    mov  ebx, [gbxm1_shl16_gbxm1]
817
    mov  ebx, [gbxm1_shl16_gbxm1]
818
      mcall
818
      mcall
819
 
819
 
820
    ret
820
    ret
821
 
821
 
822
 
822
 
823
  corners_outer:
823
  corners_outer:
824
 
824
 
825
    mov  eax, 38
825
    mov  eax, 38
826
    mov  ebx, [gbxm1_shl16_gbxm1]
826
    mov  ebx, [gbxm1_shl16_gbxm1]
827
    sub  ebx, [g_e]
827
    sub  ebx, [g_e]
828
    mov  ecx, [gbym1_shl16_gbym1]
828
    mov  ecx, [gbym1_shl16_gbym1]
829
    mov  edx, [decorations_color]
829
    mov  edx, [decorations_color]
830
      mcall
830
      mcall
831
 
831
 
832
    mov  ecx, [gbym1_plus_gh_mul_gs]
832
    mov  ecx, [gbym1_plus_gh_mul_gs]
833
    shl  ecx, 16
833
    shl  ecx, 16
834
    add  ecx, [gbym1_plus_gh_mul_gs]
834
    add  ecx, [gbym1_plus_gh_mul_gs]
835
      mcall
835
      mcall
836
 
836
 
837
    mov  ebx, [gbxm1_plus_gw_mul_gs]
837
    mov  ebx, [gbxm1_plus_gw_mul_gs]
838
    shl  ebx, 16
838
    shl  ebx, 16
839
    add  ebx, [gbxm1_plus_gw_mul_gs]
839
    add  ebx, [gbxm1_plus_gw_mul_gs]
840
    add  ebx, [g_e]
840
    add  ebx, [g_e]
841
      mcall
841
      mcall
842
 
842
 
843
    mov  ecx, [gbym1_shl16_gbym1]
843
    mov  ecx, [gbym1_shl16_gbym1]
844
      mcall
844
      mcall
845
 
845
 
846
    mov  ebx, [gbxm1_shl16_gbxm1]
846
    mov  ebx, [gbxm1_shl16_gbxm1]
847
    mov  ecx, [gbym1_shl16_gbym1]
847
    mov  ecx, [gbym1_shl16_gbym1]
848
    sub  ecx, [g_e]
848
    sub  ecx, [g_e]
849
      mcall
849
      mcall
850
 
850
 
851
    mov  ebx, [gbxm1_plus_gw_mul_gs]
851
    mov  ebx, [gbxm1_plus_gw_mul_gs]
852
    shl  ebx, 16
852
    shl  ebx, 16
853
    add  ebx, [gbxm1_plus_gw_mul_gs]
853
    add  ebx, [gbxm1_plus_gw_mul_gs]
854
      mcall
854
      mcall
855
 
855
 
856
    mov  ecx, [gbym1_plus_gh_mul_gs]
856
    mov  ecx, [gbym1_plus_gh_mul_gs]
857
    shl  ecx, 16
857
    shl  ecx, 16
858
    add  ecx, [gbym1_plus_gh_mul_gs]
858
    add  ecx, [gbym1_plus_gh_mul_gs]
859
    add  ecx, [g_e]
859
    add  ecx, [g_e]
860
      mcall
860
      mcall
861
 
861
 
862
    mov  ebx, [gbxm1_shl16_gbxm1]
862
    mov  ebx, [gbxm1_shl16_gbxm1]
863
      mcall
863
      mcall
864
 
864
 
865
    ret
865
    ret
866
 
866
 
867
 
867
 
868
  corners_crosses:
868
  corners_crosses:
869
 
869
 
870
      call      corners_inner
870
      call      corners_inner
871
      call      corners_outer
871
      call      corners_outer
872
 
872
 
873
    ret
873
    ret
874
 
874
 
875
 
875
 
876
    ;;---Draw_decorations--------------------------------------------------------------------------------------------------
876
    ;;---Draw_decorations--------------------------------------------------------------------------------------------------
877
 
877
 
878
 
878
 
879
Draw_square:
879
Draw_square:
880
    ;;===Draw_square=======================================================================================================
880
    ;;===Draw_square=======================================================================================================
881
    ;; bl   -   x_coord
881
    ;; bl   -   x_coord
882
    ;; bh   -   y_coord
882
    ;; bh   -   y_coord
883
    ;; edx  -   color
883
    ;; edx  -   color
884
 
884
 
885
    push eax ebx ecx edx
885
    push eax ebx ecx edx
886
 
886
 
887
    mov  cl,  bh
887
    mov  cl,  bh
888
 
888
 
889
    mov  al,  byte[g_s]
889
    mov  al,  byte[g_s]
890
    mul  bl
890
    mul  bl
891
    mov  bx,  ax
891
    mov  bx,  ax
892
    add  bx,  word[gbxm1]
892
    add  bx,  word[gbxm1]
893
    inc  bx
893
    inc  bx
894
    shl  ebx, 16
894
    shl  ebx, 16
895
    add  ebx, [g_s]
895
    add  ebx, [g_s]
896
    dec  ebx
896
    dec  ebx
897
 
897
 
898
    mov  al,  byte[g_s]
898
    mov  al,  byte[g_s]
899
    mul  cl
899
    mul  cl
900
    mov  cx,  ax
900
    mov  cx,  ax
901
    add  cx,  word[gbym1]
901
    add  cx,  word[gbym1]
902
    inc  cx
902
    inc  cx
903
    shl  ecx, 16
903
    shl  ecx, 16
904
    add  ecx, [g_s]
904
    add  ecx, [g_s]
905
    dec  ecx
905
    dec  ecx
906
 
906
 
907
      mcall     13
907
      mcall     13
908
 
908
 
909
    pop  edx ecx ebx eax
909
    pop  edx ecx ebx eax
910
 
910
 
911
    ret
911
    ret
912
 
912
 
913
    ;;---Draw_square-------------------------------------------------------------------------------------------------------
913
    ;;---Draw_square-------------------------------------------------------------------------------------------------------
914
    
914
    
915
    
915
    
916
Draw_menu_esc:
916
Draw_menu_esc:
917
    ;;===Draw_menu_esc=====================================================================================================
917
    ;;===Draw_menu_esc=====================================================================================================
918
 
918
 
919
    mov  ebx, [window_width]
919
    mov  ebx, [window_width]
920
    shr  ebx, 1
920
    shr  ebx, 1
921
    sub  ebx, string_menu_esc.size*3+6
921
    sub  ebx, string_menu_esc.size*3+6
922
    shl  ebx, 16
922
    shl  ebx, 16
923
    add  ebx, dword[top_strings]
923
    add  ebx, dword[top_strings]
924
      mcall     4, ,[navigation_strings_color],string_menu_esc
924
      mcall     4, ,[navigation_strings_color],string_menu_esc
925
    
925
    
926
    ret
926
    ret
927
    
927
    
928
    ;;---Draw_menu_esc-----------------------------------------------------------------------------------------------------
928
    ;;---Draw_menu_esc-----------------------------------------------------------------------------------------------------
929
 
929
 
930
 
930
 
931
Draw_score_string:
931
Draw_score_string:
932
    ;;===Draw_score_string=================================================================================================
932
    ;;===Draw_score_string=================================================================================================
933
 
933
 
934
    mov  ebx, [window_width]
934
    mov  ebx, [window_width]
935
    shr  ebx, 3
935
    shr  ebx, 3
936
    sub  ebx, 5
936
    sub  ebx, 5
937
    shl  ebx, 16
937
    shl  ebx, 16
938
    add  ebx, dword[bottom_top_strings]
938
    add  ebx, dword[bottom_top_strings]
939
      mcall     4, ,[score_string_color],string_score
939
      mcall     4, ,[score_string_color],string_score
940
 
940
 
941
    ret
941
    ret
942
 
942
 
943
    ;;---Draw_score_string-------------------------------------------------------------------------------------------------
943
    ;;---Draw_score_string-------------------------------------------------------------------------------------------------
944
    
944
    
945
    
945
    
946
Draw_score_number:
946
Draw_score_number:
947
    ;;===Draw_score_number================================================================================================= 
947
    ;;===Draw_score_number================================================================================================= 
948
 
948
 
949
    mov  edx, [window_width]
949
    mov  edx, [window_width]
950
    shr  edx, 3
950
    shr  edx, 3
951
    sub  edx, 5+1
951
    sub  edx, 5+1
952
    add  edx, string_score.size*6
952
    add  edx, string_score.size*6
953
    shl  edx, 16
953
    shl  edx, 16
954
    add  edx, dword[bottom_top_strings]
954
    add  edx, dword[bottom_top_strings]
955
      mcall     47,0x00070000,[score], ,[score_number_color],[background_color]
955
      mcall     47,0x00070000,[score], ,[score_number_color],[background_color]
956
 
956
 
957
    ret
957
    ret
958
 
958
 
959
    ;;---Draw_score_number-------------------------------------------------------------------------------------------------
959
    ;;---Draw_score_number-------------------------------------------------------------------------------------------------
960
 
960
 
961
 
961
 
962
Draw_hiscore_string:
962
Draw_hiscore_string:
963
    ;;===Draw_hiscore_string===============================================================================================
963
    ;;===Draw_hiscore_string===============================================================================================
964
 
964
 
965
    mov  ebx, [window_width]
965
    mov  ebx, [window_width]
966
    shr  ebx, 3
966
    shr  ebx, 3
967
    neg  ebx
967
    neg  ebx
968
    add  ebx, [window_width]
968
    add  ebx, [window_width]
969
    sub  ebx, string_hi_score.size*6+7*6+5
969
    sub  ebx, string_hi_score.size*6+7*6+5
970
    shl  ebx, 16
970
    shl  ebx, 16
971
    add  ebx, dword[bottom_top_strings]
971
    add  ebx, dword[bottom_top_strings]
972
      mcall     4, ,[hiscore_string_color],string_hi_score
972
      mcall     4, ,[hiscore_string_color],string_hi_score
973
    
973
    
974
    ret
974
    ret
975
    
975
    
976
    ;;---Draw_hiscore_string-----------------------------------------------------------------------------------------------
976
    ;;---Draw_hiscore_string-----------------------------------------------------------------------------------------------
977
 
977
 
978
 
978
 
979
Draw_hiscore_number:
979
Draw_hiscore_number:
980
    ;;===Draw_hiscore_number===================================================================================================
980
    ;;===Draw_hiscore_number===================================================================================================
981
 
981
 
982
    mov  edx, [window_width]
982
    mov  edx, [window_width]
983
    shr  edx, 3
983
    shr  edx, 3
984
    neg  edx
984
    neg  edx
985
    add  edx, [window_width]
985
    add  edx, [window_width]
986
    sub  edx, 7*6+6
986
    sub  edx, 7*6+6
987
    shl  edx, 16
987
    shl  edx, 16
988
    add  edx, dword[bottom_top_strings]
988
    add  edx, dword[bottom_top_strings]
989
    
989
    
990
    cmp  [play_mode],   CLASSIC_MODE
990
    cmp  [play_mode],   CLASSIC_MODE
991
     jne @f
991
     jne @f
992
    mov  ecx, [hi_score_classic]
992
    mov  ecx, [hi_score_classic]
993
     jmp .done
993
     jmp .done
994
  @@:
994
  @@:
995
    mov  ecx, [hi_score_levels]
995
    mov  ecx, [hi_score_levels]
996
 
996
 
997
  .done:
997
  .done:
998
      mcall     47,0x00070000, , ,[hiscore_number_color]
998
      mcall     47,0x00070000, , ,[hiscore_number_color]
999
    
999
    
1000
    ret
1000
    ret
1001
    
1001
    
1002
    ;;---Draw_hiscore_number---------------------------------------------------------------------------------------------------
1002
    ;;---Draw_hiscore_number---------------------------------------------------------------------------------------------------
1003
 
1003
 
1004
 
1004
 
1005
Draw_champion_string:
1005
Draw_champion_string:
1006
    ;;===Draw_champion_string==================================================================================================
1006
    ;;===Draw_champion_string==================================================================================================
1007
 
1007
 
1008
    mov  ebx, [window_width]
1008
    mov  ebx, [window_width]
1009
    shr  ebx, 3
1009
    shr  ebx, 3
1010
    neg  ebx
1010
    neg  ebx
1011
    add  ebx, [window_width]
1011
    add  ebx, [window_width]
1012
    sub  ebx, string_champion.size*6+7*6+5
1012
    sub  ebx, string_champion.size*6+7*6+5
1013
    shl  ebx, 16
1013
    shl  ebx, 16
1014
    add  ebx, dword[bottom_bottom_strings]
1014
    add  ebx, dword[bottom_bottom_strings]
1015
      mcall     4, ,[champion_string_color],string_champion
1015
      mcall     4, ,[champion_string_color],string_champion
1016
 
1016
 
1017
    ret
1017
    ret
1018
 
1018
 
1019
    ;;---Draw_champion_string----------------------------------------------------------------------------------------------
1019
    ;;---Draw_champion_string----------------------------------------------------------------------------------------------
1020
 
1020
 
1021
 
1021
 
1022
Draw_champion_name:
1022
Draw_champion_name:
1023
    ;;===Draw_champion_name================================================================================================
1023
    ;;===Draw_champion_name================================================================================================
1024
 
1024
 
1025
    mov  ebx, [window_width]
1025
    mov  ebx, [window_width]
1026
    shr  ebx, 3
1026
    shr  ebx, 3
1027
    neg  ebx
1027
    neg  ebx
1028
    add  ebx, [window_width]
1028
    add  ebx, [window_width]
1029
    sub  ebx, CHAMPION_NAME_LENGTH/2*6+7*6+6                ; there is no difference between length of champion names for other play_modes
1029
    sub  ebx, CHAMPION_NAME_LENGTH/2*6+7*6+6                ; there is no difference between length of champion names for other play_modes
1030
    add  ebx, CHAMPION_NAME_LENGTH/2*6
1030
    add  ebx, CHAMPION_NAME_LENGTH/2*6
1031
    shl  ebx, 16
1031
    shl  ebx, 16
1032
    add  ebx, dword[bottom_bottom_strings]
1032
    add  ebx, dword[bottom_bottom_strings]
1033
 
1033
 
1034
    cmp  [play_mode],   CLASSIC_MODE
1034
    cmp  [play_mode],   CLASSIC_MODE
1035
     jne @f
1035
     jne @f
1036
    mov  edx, champion_name_classic
1036
    mov  edx, champion_name_classic
1037
     jmp .done
1037
     jmp .done
1038
  @@:
1038
  @@:
1039
    mov  edx, champion_name_levels
1039
    mov  edx, champion_name_levels
1040
 
1040
 
1041
  .done:
1041
  .done:
1042
      mcall     4, ,[champion_name_color],
1042
      mcall     4, ,[champion_name_color],
1043
 
1043
 
1044
    ret
1044
    ret
1045
 
1045
 
1046
    ;;---Draw_champion_name------------------------------------------------------------------------------------------------
1046
    ;;---Draw_champion_name------------------------------------------------------------------------------------------------
1047
 
1047
 
1048
 
1048
 
1049
Draw_picture:
1049
Draw_picture:
1050
    ;;===Draw_picture======================================================================================================
1050
    ;;===Draw_picture======================================================================================================
1051
    ;;  in  :
1051
    ;;  in  :
1052
    ;;           ax =   number of left square *0x100+ picture width (in squares)
1052
    ;;           ax =   number of left square *0x100+ picture width (in squares)
1053
    ;;           cx =   number of top square *0x100+ picture height (in squares)
1053
    ;;           cx =   number of top square *0x100+ picture height (in squares)
1054
    ;;          edx =   picture color
1054
    ;;          edx =   picture color
1055
    ;;          esi =   pointer to picture data
1055
    ;;          esi =   pointer to picture data
1056
    ;;
1056
    ;;
1057
 
1057
 
1058
    add  al,  ah
1058
    add  al,  ah
1059
    add  cl,  ch
1059
    add  cl,  ch
1060
    mov  bh,  ch
1060
    mov  bh,  ch
1061
 
1061
 
1062
  .draw:
1062
  .draw:
1063
    mov  bl,  ah
1063
    mov  bl,  ah
1064
    mov  di,  7
1064
    mov  di,  7
1065
    
1065
    
1066
  .loop:
1066
  .loop:
1067
    bt  word[esi],  di
1067
    bt  word[esi],  di
1068
     jnc @f
1068
     jnc @f
1069
    push eax ebx ecx esi edi
1069
    push eax ebx ecx esi edi
1070
      call      Draw_square
1070
      call      Draw_square
1071
    pop  edi esi ecx ebx eax
1071
    pop  edi esi ecx ebx eax
1072
    
1072
    
1073
  @@:
1073
  @@:
1074
    dec  di
1074
    dec  di
1075
     jns @f
1075
     jns @f
1076
    mov  di,  7
1076
    mov  di,  7
1077
    inc  esi
1077
    inc  esi
1078
  @@:
1078
  @@:
1079
    inc  bl
1079
    inc  bl
1080
    cmp  bl,  al
1080
    cmp  bl,  al
1081
     jne .loop
1081
     jne .loop
1082
    
1082
    
1083
    inc  bh
1083
    inc  bh
1084
    cmp  di,  7
1084
    cmp  di,  7
1085
     jz  @f
1085
     jz  @f
1086
    inc  esi
1086
    inc  esi
1087
  @@:
1087
  @@:
1088
    cmp  bh,  cl
1088
    cmp  bh,  cl
1089
     jne .draw
1089
     jne .draw
1090
 
1090
 
1091
    ret
1091
    ret
1092
 
1092
 
1093
    ;;---Draw_picture------------------------------------------------------------------------------------------------------
1093
    ;;---Draw_picture------------------------------------------------------------------------------------------------------
1094
 
1094
 
1095
 
1095
 
1096
Draw_on_map:
1096
Draw_on_map:
1097
    ;;===Draw_on_map=======================================================================================================
1097
    ;;===Draw_on_map=======================================================================================================
1098
    ;;  in  :
1098
    ;;  in  :
1099
    ;;           al =   x coord
1099
    ;;           al =   x coord
1100
    ;;           ah =   y coord
1100
    ;;           ah =   y coord
1101
    ;;           cl =   value to draw
1101
    ;;           cl =   value to draw
1102
    ;;
1102
    ;;
1103
 
1103
 
1104
    and  eax, 0x0000ffff
1104
    and  eax, 0x0000ffff
1105
    xor  bx,  bx
1105
    xor  bx,  bx
1106
    mov  bl,  al
1106
    mov  bl,  al
1107
    shr  ax,  8
1107
    shr  ax,  8
1108
    mov  dx,  GRID_WIDTH
1108
    mov  dx,  GRID_WIDTH
1109
    mul  dx
1109
    mul  dx
1110
    add  ax,  bx
1110
    add  ax,  bx
1111
    mov  edi, field_map
1111
    mov  edi, field_map
1112
    add  edi, eax
1112
    add  edi, eax
1113
    mov  [edi], cl
1113
    mov  [edi], cl
1114
 
1114
 
1115
    ret
1115
    ret
1116
 
1116
 
1117
    ;;---Draw_on_map-------------------------------------------------------------------------------------------------------
1117
    ;;---Draw_on_map-------------------------------------------------------------------------------------------------------
1118
 
1118
 
1119
 
1119
 
1120
Get_from_map:
1120
Get_from_map:
1121
    ;;===Get_from_map======================================================================================================
1121
    ;;===Get_from_map======================================================================================================
1122
    ;;  in  :
1122
    ;;  in  :
1123
    ;;           al =   x coord
1123
    ;;           al =   x coord
1124
    ;;           ah =   y coord
1124
    ;;           ah =   y coord
1125
    ;;  out :
1125
    ;;  out :
1126
    ;;           bl =   value on map
1126
    ;;           bl =   value on map
1127
    ;;
1127
    ;;
1128
 
1128
 
1129
    push eax
1129
    push eax
1130
    
1130
    
1131
    and  eax, 0x0000ffff
1131
    and  eax, 0x0000ffff
1132
    xor  bx,  bx
1132
    xor  bx,  bx
1133
    mov  bl,  al
1133
    mov  bl,  al
1134
    shr  ax,  8
1134
    shr  ax,  8
1135
    mov  dx,  GRID_WIDTH
1135
    mov  dx,  GRID_WIDTH
1136
    mul  dx
1136
    mul  dx
1137
    add  ax,  bx
1137
    add  ax,  bx
1138
    mov  edi, field_map
1138
    mov  edi, field_map
1139
    add  edi, eax
1139
    add  edi, eax
1140
    mov  bl,  [edi]
1140
    mov  bl,  [edi]
1141
 
1141
 
1142
    pop  eax
1142
    pop  eax
1143
 
1143
 
1144
    ret
1144
    ret
1145
 
1145
 
1146
    ;;---Get_from_map-----------------------------------------------------------------------------------------------------------
1146
    ;;---Get_from_map-----------------------------------------------------------------------------------------------------------
1147
 
1147
 
1148
 
1148
 
1149
Load_level:
1149
Load_level:
1150
    ;;===Load_level=============================================================================================================
1150
    ;;===Load_level=============================================================================================================
1151
    ;;  in  :
1151
    ;;  in  :
1152
    ;;          cur_level_number    =   level number to load
1152
    ;;          cur_level_number    =   level number to load
1153
    ;;
1153
    ;;
1154
 
1154
 
1155
    mov  eax, [cur_level_number]
1155
    mov  eax, [cur_level_number]
1156
    mov  edx, stage_00
1156
    mov  edx, stage_00
1157
  @@:
1157
  @@:
1158
    test al,  al
1158
    test al,  al
1159
     jz  @f
1159
     jz  @f
1160
    add  edx, stage_01-stage_00
1160
    add  edx, stage_01-stage_00
1161
    dec  al
1161
    dec  al
1162
     jmp @b
1162
     jmp @b
1163
  @@:
1163
  @@:
1164
 
1164
 
1165
    mov  esi, window_title_with_lives
1165
    mov  esi, window_title_with_lives
1166
    mov  edi, window_title+5
1166
    mov  edi, window_title+5
1167
 
1167
 
1168
  .lives_in_title:
1168
  .lives_in_title:
1169
    cmp  [play_mode],   LEVELS_MODE
1169
    cmp  [play_mode],   LEVELS_MODE
1170
     jne .level_name_in_title
1170
     jne .level_name_in_title
1171
    test [show_lives_style],    1
1171
    test [show_lives_style],    1
1172
     jz  .level_name_in_title
1172
     jz  .level_name_in_title
1173
    mov  [edi], byte ' '
1173
    mov  [edi], byte ' '
1174
    mov  al,  byte[separating_symbol]
1174
    mov  al,  byte[separating_symbol]
1175
    mov  [edi+1], byte al
1175
    mov  [edi+1], byte al
1176
    mov  [edi+2], byte ' '
1176
    mov  [edi+2], byte ' '
1177
    add  edi, 3
1177
    add  edi, 3
1178
    mov  eax, [lives]
1178
    mov  eax, [lives]
1179
    add  al,  0x30
1179
    add  al,  0x30
1180
    mov  [window_title_with_lives],   al
1180
    mov  [window_title_with_lives],   al
1181
    mov  ecx, 10
1181
    mov  ecx, 10
1182
    rep  movsb
1182
    rep  movsb
1183
    dec  edi
1183
    dec  edi
1184
 
1184
 
1185
  .level_name_in_title:
1185
  .level_name_in_title:
1186
    cmp  [draw_level_name_in_window_title], 1
1186
    cmp  [draw_level_name_in_window_title], 1
1187
     jne @f
1187
     jne @f
1188
    mov  [edi], byte ' '
1188
    mov  [edi], byte ' '
1189
    mov  al,  byte[separating_symbol]
1189
    mov  al,  byte[separating_symbol]
1190
    mov  [edi+1], byte al
1190
    mov  [edi+1], byte al
1191
    mov  [edi+2], byte ' '
1191
    mov  [edi+2], byte ' '
1192
    add  edi, 3
1192
    add  edi, 3
1193
    mov  esi, edx
1193
    mov  esi, edx
1194
    add  esi, LEVEL.name
1194
    add  esi, LEVEL.name
1195
    mov  esi, [esi]
1195
    mov  esi, [esi]
1196
    mov  ecx, 16
1196
    mov  ecx, 16
1197
    rep  movsd
1197
    rep  movsd
1198
 
1198
 
1199
  @@:
1199
  @@:
1200
      mcall     71,1,window_title
1200
      mcall     71,1,window_title
1201
 
1201
 
1202
    mov  [cur_level],   edx
1202
    mov  [cur_level],   edx
1203
 
1203
 
1204
    mov  esi, edx
1204
    mov  esi, edx
1205
    add  esi, LEVEL.field
1205
    add  esi, LEVEL.field
1206
    mov  edi, field_map
1206
    mov  edi, field_map
1207
    mov  ecx, 2
1207
    mov  ecx, 2
1208
    mov  ah,  GRID_HEIGHT
1208
    mov  ah,  GRID_HEIGHT
1209
  .begin:
1209
  .begin:
1210
    mov  ebx, 7
1210
    mov  ebx, 7
1211
    mov  al,  GRID_WIDTH
1211
    mov  al,  GRID_WIDTH
1212
  .loop:
1212
  .loop:
1213
    bt   [esi], ebx
1213
    bt   [esi], ebx
1214
     jnc @f
1214
     jnc @f
1215
    mov  byte[edi], cl
1215
    mov  byte[edi], cl
1216
     jmp .skip
1216
     jmp .skip
1217
  @@:
1217
  @@:
1218
    mov  byte[edi], 0
1218
    mov  byte[edi], 0
1219
  .skip:
1219
  .skip:
1220
    dec  ebx
1220
    dec  ebx
1221
     jns @f
1221
     jns @f
1222
    mov  ebx, 7
1222
    mov  ebx, 7
1223
    inc  esi
1223
    inc  esi
1224
  @@:
1224
  @@:
1225
    inc  edi
1225
    inc  edi
1226
    dec  al
1226
    dec  al
1227
     jnz .loop
1227
     jnz .loop
1228
    inc  esi
1228
    inc  esi
1229
    dec  ah
1229
    dec  ah
1230
     jnz .begin
1230
     jnz .begin
1231
 
1231
 
1232
 
1232
 
1233
    mov  esi, edx
1233
    mov  esi, edx
1234
    add  esi, LEVEL.snake_dots
1234
    add  esi, LEVEL.snake_dots
1235
    mov  edi, snake_dots
1235
    mov  edi, snake_dots
1236
    mov  ecx, 3
1236
    mov  ecx, 3
1237
    rep  movsw
1237
    rep  movsw
1238
    
1238
    
1239
    mov  esi, edx
1239
    mov  esi, edx
1240
    add  esi, LEVEL.snake_direction
1240
    add  esi, LEVEL.snake_direction
1241
    mov  eax, [esi]
1241
    mov  eax, [esi]
1242
    mov  [snake_direction], eax
1242
    mov  [snake_direction], eax
1243
    
1243
    
1244
    mov  esi, edx
1244
    mov  esi, edx
1245
    add  esi, LEVEL.snake_direction_next
1245
    add  esi, LEVEL.snake_direction_next
1246
    mov  eax, [esi]
1246
    mov  eax, [esi]
1247
    mov  [snake_direction_next],    eax
1247
    mov  [snake_direction_next],    eax
1248
 
1248
 
1249
    mov  esi, edx
1249
    mov  esi, edx
1250
    add  esi, LEVEL.number_of_stones
1250
    add  esi, LEVEL.number_of_stones
1251
    mov  eax, [esi]
1251
    mov  eax, [esi]
1252
    mov  [number_of_free_dots], GRID_WIDTH*GRID_HEIGHT-3
1252
    mov  [number_of_free_dots], GRID_WIDTH*GRID_HEIGHT-3
1253
    sub  [number_of_free_dots], eax
1253
    sub  [number_of_free_dots], eax
1254
    
1254
    
1255
    mov  ax,  word[snake_dots]
1255
    mov  ax,  word[snake_dots]
1256
    mov  cl,  1
1256
    mov  cl,  1
1257
      call      Draw_on_map
1257
      call      Draw_on_map
1258
    mov  ax,  word[snake_dots+2]
1258
    mov  ax,  word[snake_dots+2]
1259
    mov  cl,  1
1259
    mov  cl,  1
1260
      call      Draw_on_map
1260
      call      Draw_on_map
1261
    mov  ax,  word[snake_dots+4]
1261
    mov  ax,  word[snake_dots+4]
1262
    mov  cl,  1
1262
    mov  cl,  1
1263
      call      Draw_on_map
1263
      call      Draw_on_map
1264
 
1264
 
1265
    mov  [action],  0
1265
    mov  [action],  0
1266
    mov  [snake_length_x2], 6
1266
    mov  [snake_length_x2], 6
1267
 
1267
 
1268
    ret
1268
    ret
1269
 
1269
 
1270
    ;;---Load_level-------------------------------------------------------------------------------------------------------------
1270
    ;;---Load_level-------------------------------------------------------------------------------------------------------------
1271
 
1271
 
1272
 
1272
 
1273
Draw_stones:
1273
Draw_stones:
1274
    ;;===Draw_stones============================================================================================================
1274
    ;;===Draw_stones============================================================================================================
1275
 
1275
 
1276
    mov  ax,  0*0x100+GRID_WIDTH
1276
    mov  ax,  0*0x100+GRID_WIDTH
1277
    mov  cx,  0*0x100+GRID_HEIGHT
1277
    mov  cx,  0*0x100+GRID_HEIGHT
1278
    mov  edx, [stone_color]
1278
    mov  edx, [stone_color]
1279
    mov  esi, [cur_level]
1279
    mov  esi, [cur_level]
1280
    add  esi, LEVEL.field
1280
    add  esi, LEVEL.field
1281
      call      Draw_picture
1281
      call      Draw_picture
1282
 
1282
 
1283
    ret
1283
    ret
1284
 
1284
 
1285
    ;;---Draw_stones------------------------------------------------------------------------------------------------------------
1285
    ;;---Draw_stones------------------------------------------------------------------------------------------------------------
1286
 
1286
 
1287
 
1287
 
1288
Hide_cursor:
1288
Hide_cursor:
1289
    ;;===Hide_cursor===========================================================================================================
1289
    ;;===Hide_cursor===========================================================================================================
1290
 
1290
 
1291
      mcall     37,5,[cursor_handle]
1291
      mcall     37,5,[cursor_handle]
1292
 
1292
 
1293
    ret
1293
    ret
1294
 
1294
 
1295
    ;;---Show_cursor-----------------------------------------------------------------------------------------------------------
1295
    ;;---Show_cursor-----------------------------------------------------------------------------------------------------------
1296
 
1296
 
1297
 
1297
 
1298
Show_cursor:
1298
Show_cursor:
1299
    ;;===Hide_cursor===========================================================================================================
1299
    ;;===Hide_cursor===========================================================================================================
1300
 
1300
 
1301
      mcall     37,5,0
1301
      mcall     37,5,0
1302
 
1302
 
1303
    ret
1303
    ret
1304
 
1304
 
1305
    ;;---Show_cursor-----------------------------------------------------------------------------------------------------------
1305
    ;;---Show_cursor-----------------------------------------------------------------------------------------------------------
1306
 
1306
 
1307
 
1307
 
1308
Set_window_mode:
1308
Set_window_mode:
1309
    ;;===Set_window_mode=======================================================================================================
1309
    ;;===Set_window_mode=======================================================================================================
1310
 
1310
 
1311
    test al,  al
1311
    test al,  al
1312
     jnz .fullscreen
1312
     jnz .fullscreen
1313
    mov  eax, [window_style_windowed]
1313
    mov  eax, [window_style_windowed]
1314
     jmp .quit
1314
     jmp .quit
1315
 
1315
 
1316
  .fullscreen:
1316
  .fullscreen:
1317
    mov  eax, [window_style_fullscreen]
1317
    mov  eax, [window_style_fullscreen]
1318
 
1318
 
1319
  .quit:
1319
  .quit:
1320
    mov [window_style], eax
1320
    mov [window_style], eax
1321
    ret
1321
    ret
1322
 
1322
 
1323
;;---Some_functions------------------------------------------------------------------------------------------------------------
1323
;;---Some_functions------------------------------------------------------------------------------------------------------------
1324
 
1324
 
1325
 
1325
 
1326
Reverse_snake:
1326
Reverse_snake:
1327
    ;;===Reverse_snake=========================================================================================================
1327
    ;;===Reverse_snake=========================================================================================================
1328
 
1328
 
1329
    cmp  [snake_direction], LEFT
1329
    cmp  [snake_direction], LEFT
1330
     jne @f
1330
     jne @f
1331
    mov  [snake_direction_next],    RIGHT
1331
    mov  [snake_direction_next],    RIGHT
1332
     jmp .quit
1332
     jmp .quit
1333
  @@:
1333
  @@:
1334
    cmp  [snake_direction], RIGHT
1334
    cmp  [snake_direction], RIGHT
1335
     jne @f
1335
     jne @f
1336
    mov  [snake_direction_next],    LEFT
1336
    mov  [snake_direction_next],    LEFT
1337
     jmp .quit
1337
     jmp .quit
1338
  @@:
1338
  @@:
1339
    cmp  [snake_direction], UP
1339
    cmp  [snake_direction], UP
1340
     jne @f
1340
     jne @f
1341
    mov  [snake_direction_next],    DOWN
1341
    mov  [snake_direction_next],    DOWN
1342
     jmp .quit
1342
     jmp .quit
1343
  @@:
1343
  @@:
1344
   cmp  [snake_direction], DOWN
1344
   cmp  [snake_direction], DOWN
1345
     jne @f
1345
     jne @f
1346
    mov  [snake_direction_next],    UP
1346
    mov  [snake_direction_next],    UP
1347
;     jmp .quit
1347
;     jmp .quit
1348
  @@:
1348
  @@:
1349
 
1349
 
1350
  .quit:
1350
  .quit:
1351
    ret
1351
    ret
1352
 
1352
 
1353
    ;;---Reverse_snake---------------------------------------------------------------------------------------------------------
1353
    ;;---Reverse_snake---------------------------------------------------------------------------------------------------------
1354
 
1354
 
1355
 
1355
 
1356
;;===Variables==================================================================================================================
1356
;;===Variables==================================================================================================================
1357
 
1357
 
1358
window_title                db      'Snake',64+15 dup (0)
1358
window_title                db      'Snake',64+15 dup (0)
1359
window_title_with_lives     db      '_ live(s)',0
1359
window_title_with_lives     db      '_ live(s)',0
1360
default_separating_symbol   db      '|',0
1360
default_separating_symbol   db      '|',0
1361
window_style_windowed       dd      0x33000000              ; scalable skinned window
1361
window_style_windowed       dd      0x33000000              ; scalable skinned window
1362
window_style_fullscreen     dd      0x00000000
1362
window_style_fullscreen     dd      0x00000000
1363
time_before_waiting         dd      0x0
1363
time_before_waiting         dd      0x0
1364
time_to_wait                dd      0x0
1364
time_to_wait                dd      0x0
1365
time_wait_limit             dd      101
1365
time_wait_limit             dd      101
1366
time_wait_limit_const       dd      0x0
1366
time_wait_limit_const       dd      0x0
1367
 
1367
 
1368
play_mode                   dd      0x0
1368
play_mode                   dd      0x0
1369
lives                       dd      START_LIVES
1369
lives                       dd      START_LIVES
1370
acceleration_mask           dd      0x0
1370
acceleration_mask           dd      0x0
1371
 
1371
 
1372
resized_by_hotkey           dd      0x0
1372
resized_by_hotkey           dd      0x0
1373
fullscreen                  dd      0x0
1373
fullscreen                  dd      0x0
1374
 
1374
 
1375
szZ string_score            ,'SCORE : '
1375
szZ string_score            ,'SCORE : '
1376
szZ string_hi_score         ,'HI-SCORE : '
1376
szZ string_hi_score         ,'HI-SCORE : '
1377
szZ string_champion         ,'CHAMPION : '
1377
szZ string_champion         ,'CHAMPION : '
1378
szZ string_level            ,'LEVEL : '
1378
szZ string_level            ,'LEVEL : '
1379
szZ string_pause_space      ,'PAUSE - ',0x27,'SPACE',0x27
1379
szZ string_pause_space      ,'PAUSE - ',0x27,'SPACE',0x27
1380
szZ string_resume_space     ,'RESUME - ',0x27,'SPACE',0x27
1380
szZ string_resume_space     ,'RESUME - ',0x27,'SPACE',0x27
1381
szZ string_menu_esc         ,'MENU - ',0x27,'ESC',0x27
1381
szZ string_menu_esc         ,'MENU - ',0x27,'ESC',0x27
1382
szZ string_apply_name_enter ,'APPLY NAME - ',0x27,'ENTER',0x27
1382
szZ string_apply_name_enter ,'APPLY NAME - ',0x27,'ENTER',0x27
1383
szZ press_to_start          ,'PRESS ',0x27,'ENTER',0x27,' TO START'
1383
szZ press_to_start          ,'PRESS ',0x27,'ENTER',0x27,' TO START'
1384
szZ press_esc_to_exit       ,'PRESS ',0x27,'ESC',0x27,' TO EXIT'
1384
szZ press_esc_to_exit       ,'PRESS ',0x27,'ESC',0x27,' TO EXIT'
1385
;press_F2_to_options         db      'PRESS ',0x27,'F2',0x27,' TO OPTIONS',0
1385
;press_F2_to_options         db      'PRESS ',0x27,'F2',0x27,' TO OPTIONS',0
1386
 
1386
 
1387
szZ string_congratulations  ,'   Congratulations!!! New hi-score is : '
1387
szZ string_congratulations  ,'   Congratulations!!! New hi-score is : '
1388
szZ string_enter_your_name  ,'You are the champion! Enter your name : '
1388
szZ string_enter_your_name  ,'You are the champion! Enter your name : '
1389
 
1389
 
1390
szZ string_button_play      ,'PLAY'
1390
szZ string_button_play      ,'PLAY'
1391
szZ string_button_exit      ,'EXIT'
1391
szZ string_button_exit      ,'EXIT'
1392
szZ string_button_inc       ,'+INC+'
1392
szZ string_button_inc       ,'+INC+'
1393
szZ string_button_dec       ,'-dec-'
1393
szZ string_button_dec       ,'-dec-'
1394
szZ string_button_pm_classic,'CLASSIC mode'
1394
szZ string_button_pm_classic,'CLASSIC mode'
1395
szZ string_button_pm_levels ,'LEVELS mode'
1395
szZ string_button_pm_levels ,'LEVELS mode'
1396
 
1396
 
1397
is_new_record               dd      0
1397
is_new_record               dd      0
1398
 
1398
 
1399
action                      dd      0
1399
action                      dd      0
1400
 
1400
 
1401
picture_first_menu_snake    db      0xf4,0x99,0x2f,\
1401
picture_first_menu_snake    db      0xf4,0x99,0x2f,\
1402
                                    0x86,0xa5,0x49,\
1402
                                    0x86,0xa5,0x49,\
1403
                                    0xf5,0xa5,0x8f,\
1403
                                    0xf5,0xa5,0x8f,\
1404
                                    0x15,0xbd,0x48,\
1404
                                    0x15,0xbd,0x48,\
1405
                                    0xf4,0xa5,0x2f
1405
                                    0xf4,0xa5,0x2f
1406
 
1406
 
1407
picture_first_menu_version  db      0xf1,0xe0,\
1407
picture_first_menu_version  db      0xf1,0xe0,\
1408
                                    0x90,0x20,\
1408
                                    0x90,0x20,\
1409
                                    0x90,0x20,\
1409
                                    0x90,0x20,\
1410
                                    0x90,0x20,\
1410
                                    0x90,0x20,\
1411
                                    0xf4,0x20
1411
                                    0xf4,0x20
1412
 
1412
 
1413
picture_pause               db      11100011b,00100101b,11101111b,\
1413
picture_pause               db      11100011b,00100101b,11101111b,\
1414
                                    10010100b,10100101b,00001000b,\
1414
                                    10010100b,10100101b,00001000b,\
1415
                                    10010100b,10100101b,00001000b,\
1415
                                    10010100b,10100101b,00001000b,\
1416
                                    11100111b,10100101b,11101111b,\
1416
                                    11100111b,10100101b,11101111b,\
1417
                                    10000100b,10100100b,00101000b,\
1417
                                    10000100b,10100100b,00101000b,\
1418
                                    10000100b,10011001b,11101111b
1418
                                    10000100b,10011001b,11101111b
1419
 
1419
 
1420
picture_game_over           db      00110000b,00000000b,00000000b,00000000b,\
1420
picture_game_over           db      00110000b,00000000b,00000000b,00000000b,\
1421
                                    01001001b,11001000b,10111100b,00000000b,\
1421
                                    01001001b,11001000b,10111100b,00000000b,\
1422
                                    10000010b,00101101b,10100000b,00000000b,\
1422
                                    10000010b,00101101b,10100000b,00000000b,\
1423
                                    10011010b,00101010b,10111000b,00000000b,\
1423
                                    10011010b,00101010b,10111000b,00000000b,\
1424
                                    10001011b,11101000b,10100000b,00000000b,\
1424
                                    10001011b,11101000b,10100000b,00000000b,\
1425
                                    01110010b,00101000b,10111100b,00000000b,\
1425
                                    01110010b,00101000b,10111100b,00000000b,\
1426
                                    00000000b,00000000b,00000000b,00000000b,\
1426
                                    00000000b,00000000b,00000000b,00000000b,\
1427
                                    00000111b,00000000b,00000000b,00000000b,\
1427
                                    00000111b,00000000b,00000000b,00000000b,\
1428
                                    00001000b,10100010b,11110111b,10000000b,\
1428
                                    00001000b,10100010b,11110111b,10000000b,\
1429
                                    00001000b,10100010b,10000100b,01000000b,\
1429
                                    00001000b,10100010b,10000100b,01000000b,\
1430
                                    00001000b,10100010b,11100100b,01000000b,\
1430
                                    00001000b,10100010b,11100100b,01000000b,\
1431
                                    00001000b,10010100b,10000111b,10000000b,\
1431
                                    00001000b,10010100b,10000111b,10000000b,\
1432
                                    00000111b,00001000b,11110100b,01000000b
1432
                                    00000111b,00001000b,11110100b,01000000b
1433
 
1433
 
1434
picture_you_win             db      10001001b,11001000b,10000000b,\
1434
;picture_you_win             db      10001001b,11001000b,10000000b,\
1435
                                    10001010b,00101000b,10000000b,\
1435
;                                    10001010b,00101000b,10000000b,\
1436
                                    01010010b,00101000b,10000000b,\
1436
;                                    01010010b,00101000b,10000000b,\
1437
                                    00100010b,00101000b,10000000b,\
1437
;                                    00100010b,00101000b,10000000b,\
1438
                                    00100001b,11000111b,00000000b,\
1438
;                                    00100001b,11000111b,00000000b,\
1439
                                    00000000b,00000000b,00000000b,\
1439
;                                    00000000b,00000000b,00000000b,\
1440
                                    00000000b,00000000b,00000000b,\
1440
;                                    00000000b,00000000b,00000000b,\
1441
                                    01000100b,10010001b,00000000b,\
1441
;                                    01000100b,10010001b,00000000b,\
1442
                                    01010100b,10011001b,00000000b,\
1442
;                                    01010100b,10011001b,00000000b,\
1443
                                    01010100b,10010101b,00000000b,\
1443
;                                    01010100b,10010101b,00000000b,\
1444
                                    01010100b,10010011b,00000000b,\
1444
;                                    01010100b,10010011b,00000000b,\
-
 
1445
;                                    00101000b,10010001b,00000000b
-
 
1446
 
-
 
1447
picture_you_win             db      01000100b,01000011b,10001000b,10000000b,\
-
 
1448
                                    01000100b,01000100b,01001000b,10000000b,\
-
 
1449
                                    01000100b,01000100b,00001000b,10000000b,\
-
 
1450
                                    01111100b,01000100b,11001111b,10000000b,\
-
 
1451
                                    01000100b,01000100b,01001000b,10000000b,\
-
 
1452
                                    01000100b,01000011b,10001000b,10000000b,\
-
 
1453
                                    00000000b,00000000b,00000000b,00000000b,\
-
 
1454
                                    11110011b,10011100b,11110011b,11000000b,\
-
 
1455
                                    10000100b,00100010b,10001010b,00000000b,\
-
 
1456
                                    11110100b,00100010b,10001011b,10000000b,\
-
 
1457
                                    00010100b,00100010b,11110010b,00000000b,\
1445
                                    00101000b,10010001b,00000000b
1458
                                    11110011b,10011100b,10001011b,11000000b
1446
 
1459
 
1447
picture_level               db      10000111b,10100101b,11101000b,\
1460
picture_level               db      10000111b,10100101b,11101000b,\
1448
                                    10000100b,00100101b,00001000b,\
1461
                                    10000100b,00100101b,00001000b,\
1449
                                    10000111b,00100101b,11001000b,\
1462
                                    10000111b,00100101b,11001000b,\
1450
                                    10000100b,00101001b,00001000b,\
1463
                                    10000100b,00101001b,00001000b,\
1451
                                    11110111b,10110001b,11101111b
1464
                                    11110111b,10110001b,11101111b
1452
 
1465
 
1453
digits_font                 db      0xf0,0x90,0x90,0x90,0xf0,\
1466
digits_font                 db      0xf0,0x90,0x90,0x90,0xf0,\
1454
                                    0x20,0x60,0x20,0x20,0x20,\
1467
                                    0x20,0x60,0x20,0x20,0x20,\
1455
                                    0xf0,0x10,0xf0,0x80,0xf0,\
1468
                                    0xf0,0x10,0xf0,0x80,0xf0,\
1456
                                    0xf0,0x10,0x70,0x10,0xf0,\
1469
                                    0xf0,0x10,0x70,0x10,0xf0,\
1457
                                    0x90,0x90,0xf0,0x10,0x10,\
1470
                                    0x90,0x90,0xf0,0x10,0x10,\
1458
                                    0xf0,0x80,0xf0,0x10,0xf0,\
1471
                                    0xf0,0x80,0xf0,0x10,0xf0,\
1459
                                    0xf0,0x80,0xf0,0x90,0xf0,\
1472
                                    0xf0,0x80,0xf0,0x90,0xf0,\
1460
                                    0xf0,0x10,0x10,0x10,0x10,\
1473
                                    0xf0,0x10,0x10,0x10,0x10,\
1461
                                    0xf0,0x90,0xf0,0x90,0xf0,\
1474
                                    0xf0,0x90,0xf0,0x90,0xf0,\
1462
                                    0xf0,0x90,0xf0,0x10,0xf0
1475
                                    0xf0,0x90,0xf0,0x10,0xf0
1463
 
1476
 
1464
stage_00:
1477
stage_00:
1465
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1478
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1466
                                    00000000b,00000000b,00000000b,00000000b,\
1479
                                    00000000b,00000000b,00000000b,00000000b,\
1467
                                    00000000b,00000000b,00000000b,00000000b,\
1480
                                    00000000b,00000000b,00000000b,00000000b,\
1468
                                    00000000b,00000000b,00000000b,00000000b,\
1481
                                    00000000b,00000000b,00000000b,00000000b,\
1469
                                    00000000b,00000000b,00000000b,00000000b,\
1482
                                    00000000b,00000000b,00000000b,00000000b,\
1470
                                    00000000b,00000000b,00000000b,00000000b,\
1483
                                    00000000b,00000000b,00000000b,00000000b,\
1471
                                    00000000b,00000000b,00000000b,00000000b,\
1484
                                    00000000b,00000000b,00000000b,00000000b,\
1472
                                    00000000b,00000000b,00000000b,00000000b,\
1485
                                    00000000b,00000000b,00000000b,00000000b,\
1473
                                    00000000b,00000000b,00000000b,00000000b,\
1486
                                    00000000b,00000000b,00000000b,00000000b,\
1474
                                    00000000b,00000000b,00000000b,00000000b,\
1487
                                    00000000b,00000000b,00000000b,00000000b,\
1475
                                    00000000b,00000000b,00000000b,00000000b,\
1488
                                    00000000b,00000000b,00000000b,00000000b,\
1476
                                    00000000b,00000000b,00000000b,00000000b,\
1489
                                    00000000b,00000000b,00000000b,00000000b,\
1477
                                    00000000b,00000000b,00000000b,00000000b,\
1490
                                    00000000b,00000000b,00000000b,00000000b,\
1478
                                    00000000b,00000000b,00000000b,00000000b
1491
                                    00000000b,00000000b,00000000b,00000000b
1479
 
1492
 
1480
.snake_dots                 db      3,3, 4,3, 5,3
1493
.snake_dots                 db      3,3, 4,3, 5,3
1481
.snake_direction            dd      RIGHT
1494
.snake_direction            dd      RIGHT
1482
.snake_direction_next       dd      RIGHT
1495
.snake_direction_next       dd      RIGHT
1483
.number_of_stones           dd      0
1496
.number_of_stones           dd      0
1484
.name                       dd      stage_00_name
1497
.name                       dd      stage_00_name
1485
 
1498
 
1486
stage_01:
1499
stage_01:
1487
.field                      db      11111000b,00000000b,00000001b,11110000b,\
1500
.field                      db      11111000b,00000000b,00000001b,11110000b,\
1488
                                    10000000b,00000000b,00000000b,00010000b,\
1501
                                    10000000b,00000000b,00000000b,00010000b,\
1489
                                    10000000b,00000000b,00000000b,00010000b,\
1502
                                    10000000b,00000000b,00000000b,00010000b,\
1490
                                    10000000b,00000000b,00000000b,00010000b,\
1503
                                    10000000b,00000000b,00000000b,00010000b,\
1491
                                    10000000b,00000000b,00000000b,00010000b,\
1504
                                    10000000b,00000000b,00000000b,00010000b,\
1492
                                    00000000b,00000000b,00000000b,00000000b,\
1505
                                    00000000b,00000000b,00000000b,00000000b,\
1493
                                    00000000b,00000000b,00000000b,00000000b,\
1506
                                    00000000b,00000000b,00000000b,00000000b,\
1494
                                    00000000b,00000000b,00000000b,00000000b,\
1507
                                    00000000b,00000000b,00000000b,00000000b,\
1495
                                    00000000b,00000000b,00000000b,00000000b,\
1508
                                    00000000b,00000000b,00000000b,00000000b,\
1496
                                    10000000b,00000000b,00000000b,00010000b,\
1509
                                    10000000b,00000000b,00000000b,00010000b,\
1497
                                    10000000b,00000000b,00000000b,00010000b,\
1510
                                    10000000b,00000000b,00000000b,00010000b,\
1498
                                    10000000b,00000000b,00000000b,00010000b,\
1511
                                    10000000b,00000000b,00000000b,00010000b,\
1499
                                    10000000b,00000000b,00000000b,00010000b,\
1512
                                    10000000b,00000000b,00000000b,00010000b,\
1500
                                    11111000b,00000000b,00000001b,11110000b
1513
                                    11111000b,00000000b,00000001b,11110000b
1501
 
1514
 
1502
.snake_dots                 db      3,3, 4,3, 5,3
1515
.snake_dots                 db      3,3, 4,3, 5,3
1503
.snake_direction            dd      RIGHT
1516
.snake_direction            dd      RIGHT
1504
.snake_direction_next       dd      RIGHT
1517
.snake_direction_next       dd      RIGHT
1505
.number_of_stones           dd      36
1518
.number_of_stones           dd      36
1506
.name                       dd      stage_01_name
1519
.name                       dd      stage_01_name
1507
 
1520
 
1508
stage_02:
1521
stage_02:
1509
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1522
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1510
                                    00000000b,00000000b,00000000b,00000000b,\
1523
                                    00000000b,00000000b,00000000b,00000000b,\
1511
                                    00011111b,11000000b,00111111b,10000000b,\
1524
                                    00011111b,11000000b,00111111b,10000000b,\
1512
                                    00010000b,00000000b,00000000b,10000000b,\
1525
                                    00010000b,00000000b,00000000b,10000000b,\
1513
                                    00010000b,00000000b,00000000b,10000000b,\
1526
                                    00010000b,00000000b,00000000b,10000000b,\
1514
                                    00010000b,00000000b,00000000b,10000000b,\
1527
                                    00010000b,00000000b,00000000b,10000000b,\
1515
                                    00000000b,00000000b,00000000b,00000000b,\
1528
                                    00000000b,00000000b,00000000b,00000000b,\
1516
                                    00000000b,00000000b,00000000b,00000000b,\
1529
                                    00000000b,00000000b,00000000b,00000000b,\
1517
                                    00010000b,00000000b,00000000b,10000000b,\
1530
                                    00010000b,00000000b,00000000b,10000000b,\
1518
                                    00010000b,00000000b,00000000b,10000000b,\
1531
                                    00010000b,00000000b,00000000b,10000000b,\
1519
                                    00010000b,00000000b,00000000b,10000000b,\
1532
                                    00010000b,00000000b,00000000b,10000000b,\
1520
                                    00011111b,11000000b,00111111b,10000000b,\
1533
                                    00011111b,11000000b,00111111b,10000000b,\
1521
                                    00000000b,00000000b,00000000b,00000000b,\
1534
                                    00000000b,00000000b,00000000b,00000000b,\
1522
                                    00000000b,00000000b,00000000b,00000000b
1535
                                    00000000b,00000000b,00000000b,00000000b
1523
 
1536
 
1524
.snake_dots                 db      7,5, 8,5, 9,5
1537
.snake_dots                 db      7,5, 8,5, 9,5
1525
.snake_direction            dd      RIGHT
1538
.snake_direction            dd      RIGHT
1526
.snake_direction_next       dd      RIGHT
1539
.snake_direction_next       dd      RIGHT
1527
.number_of_stones           dd      40
1540
.number_of_stones           dd      40
1528
.name                       dd      stage_02_name
1541
.name                       dd      stage_02_name
1529
 
1542
 
1530
stage_03:
1543
stage_03:
1531
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1544
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1532
                                    00000000b,00000000b,00000000b,00000000b,\
1545
                                    00000000b,00000000b,00000000b,00000000b,\
1533
                                    00000000b,00001001b,00000000b,00000000b,\
1546
                                    00000000b,00001001b,00000000b,00000000b,\
1534
                                    00000000b,00001001b,00000000b,00000000b,\
1547
                                    00000000b,00001001b,00000000b,00000000b,\
1535
                                    00000000b,00001001b,00000000b,00000000b,\
1548
                                    00000000b,00001001b,00000000b,00000000b,\
1536
                                    00001111b,11111001b,11111111b,00000000b,\
1549
                                    00001111b,11111001b,11111111b,00000000b,\
1537
                                    00000000b,00000000b,00000000b,00000000b,\
1550
                                    00000000b,00000000b,00000000b,00000000b,\
1538
                                    00000000b,00000000b,00000000b,00000000b,\
1551
                                    00000000b,00000000b,00000000b,00000000b,\
1539
                                    00001111b,11111001b,11111111b,00000000b,\
1552
                                    00001111b,11111001b,11111111b,00000000b,\
1540
                                    00000000b,00001001b,00000000b,00000000b,\
1553
                                    00000000b,00001001b,00000000b,00000000b,\
1541
                                    00000000b,00001001b,00000000b,00000000b,\
1554
                                    00000000b,00001001b,00000000b,00000000b,\
1542
                                    00000000b,00001001b,00000000b,00000000b,\
1555
                                    00000000b,00001001b,00000000b,00000000b,\
1543
                                    00000000b,00000000b,00000000b,00000000b,\
1556
                                    00000000b,00000000b,00000000b,00000000b,\
1544
                                    00000000b,00000000b,00000000b,00000000b
1557
                                    00000000b,00000000b,00000000b,00000000b
1545
 
1558
 
1546
.snake_dots                 db      23,0, 22,0, 21,0
1559
.snake_dots                 db      23,0, 22,0, 21,0
1547
.snake_direction            dd      LEFT
1560
.snake_direction            dd      LEFT
1548
.snake_direction_next       dd      LEFT
1561
.snake_direction_next       dd      LEFT
1549
.number_of_stones           dd      48
1562
.number_of_stones           dd      48
1550
.name                       dd      stage_03_name
1563
.name                       dd      stage_03_name
1551
 
1564
 
1552
stage_04:
1565
stage_04:
1553
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1566
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1554
                                    00000000b,00100000b,01000000b,00000000b,\
1567
                                    00000000b,00100000b,01000000b,00000000b,\
1555
                                    00000010b,00100000b,01000100b,00000000b,\
1568
                                    00000010b,00100000b,01000100b,00000000b,\
1556
                                    00000010b,00000000b,00000100b,00000000b,\
1569
                                    00000010b,00000000b,00000100b,00000000b,\
1557
                                    00010000b,00100000b,01000000b,10000000b,\
1570
                                    00010000b,00100000b,01000000b,10000000b,\
1558
                                    00000010b,00100000b,01000100b,00000000b,\
1571
                                    00000010b,00100000b,01000100b,00000000b,\
1559
                                    00010010b,00000000b,00000100b,10000000b,\
1572
                                    00010010b,00000000b,00000100b,10000000b,\
1560
                                    00010010b,00000000b,00000100b,10000000b,\
1573
                                    00010010b,00000000b,00000100b,10000000b,\
1561
                                    00000010b,00100000b,01000000b,00000000b,\
1574
                                    00000010b,00100000b,01000000b,00000000b,\
1562
                                    00010000b,00100000b,01000000b,10000000b,\
1575
                                    00010000b,00100000b,01000000b,10000000b,\
1563
                                    00000010b,00000000b,00000100b,00000000b,\
1576
                                    00000010b,00000000b,00000100b,00000000b,\
1564
                                    00000010b,00100000b,01000100b,00000000b,\
1577
                                    00000010b,00100000b,01000100b,00000000b,\
1565
                                    00000000b,00100000b,01000000b,00000000b,\
1578
                                    00000000b,00100000b,01000000b,00000000b,\
1566
                                    00000000b,00000000b,00000000b,00000000b
1579
                                    00000000b,00000000b,00000000b,00000000b
1567
 
1580
 
1568
.snake_dots                 db      19,6, 19,7, 19,8
1581
.snake_dots                 db      19,6, 19,7, 19,8
1569
.snake_napravlenie          dd      DOWN
1582
.snake_napravlenie          dd      DOWN
1570
.snake_napravlenie_next     dd      DOWN
1583
.snake_napravlenie_next     dd      DOWN
1571
.number_of_stones           dd      39
1584
.number_of_stones           dd      39
1572
.name                       dd      stage_04_name
1585
.name                       dd      stage_04_name
1573
 
1586
 
1574
stage_05:
1587
stage_05:
1575
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1588
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1576
                                    00000000b,00000000b,00000000b,00000000b,\
1589
                                    00000000b,00000000b,00000000b,00000000b,\
1577
                                    00000001b,11111111b,11111000b,00000000b,\
1590
                                    00000001b,11111111b,11111000b,00000000b,\
1578
                                    00000001b,11111111b,11111000b,00000000b,\
1591
                                    00000001b,11111111b,11111000b,00000000b,\
1579
                                    00000000b,00000000b,00000000b,00000000b,\
1592
                                    00000000b,00000000b,00000000b,00000000b,\
1580
                                    00000000b,00000000b,00000000b,00000000b,\
1593
                                    00000000b,00000000b,00000000b,00000000b,\
1581
                                    00000111b,11111111b,11111110b,00000000b,\
1594
                                    00000111b,11111111b,11111110b,00000000b,\
1582
                                    00000111b,11111111b,11111110b,00000000b,\
1595
                                    00000111b,11111111b,11111110b,00000000b,\
1583
                                    00000000b,00000000b,00000000b,00000000b,\
1596
                                    00000000b,00000000b,00000000b,00000000b,\
1584
                                    00000000b,00000000b,00000000b,00000000b,\
1597
                                    00000000b,00000000b,00000000b,00000000b,\
1585
                                    00111111b,11111111b,11111111b,11000000b,\
1598
                                    00111111b,11111111b,11111111b,11000000b,\
1586
                                    00111111b,11111111b,11111111b,11000000b,\
1599
                                    00111111b,11111111b,11111111b,11000000b,\
1587
                                    00000000b,00000000b,00000000b,00000000b,\
1600
                                    00000000b,00000000b,00000000b,00000000b,\
1588
                                    00000000b,00000000b,00000000b,00000000b
1601
                                    00000000b,00000000b,00000000b,00000000b
1589
 
1602
 
1590
.snake_dots                 db      0,0, 0,1, 1,1
1603
.snake_dots                 db      0,0, 0,1, 1,1
1591
.snake_direction            dd      RIGHT
1604
.snake_direction            dd      RIGHT
1592
.snake_direction_next       dd      RIGHT
1605
.snake_direction_next       dd      RIGHT
1593
.number_of_stones           dd      112
1606
.number_of_stones           dd      112
1594
.name                       dd      stage_05_name
1607
.name                       dd      stage_05_name
1595
 
1608
 
1596
stage_06:
1609
stage_06:
1597
.field                      db      00000001b,10000000b,00000000b,00000000b,\
1610
.field                      db      00000001b,10000000b,00000000b,00000000b,\
1598
                                    00000001b,11111111b,11111000b,00000000b,\
1611
                                    00000001b,11111111b,11111000b,00000000b,\
1599
                                    00000001b,11111111b,11111000b,00000000b,\
1612
                                    00000001b,11111111b,11111000b,00000000b,\
1600
                                    00000000b,00000000b,00011000b,00000000b,\
1613
                                    00000000b,00000000b,00011000b,00000000b,\
1601
                                    00000000b,00000000b,00011000b,00000000b,\
1614
                                    00000000b,00000000b,00011000b,00000000b,\
1602
                                    00011111b,11111111b,11111000b,00000000b,\
1615
                                    00011111b,11111111b,11111000b,00000000b,\
1603
                                    00011111b,11111111b,11111000b,00000000b,\
1616
                                    00011111b,11111111b,11111000b,00000000b,\
1604
                                    00011000b,00000000b,00000000b,00000000b,\
1617
                                    00011000b,00000000b,00000000b,00000000b,\
1605
                                    00011000b,00000000b,00000000b,00000000b,\
1618
                                    00011000b,00000000b,00000000b,00000000b,\
1606
                                    00011111b,11111111b,11111111b,11100000b,\
1619
                                    00011111b,11111111b,11111111b,11100000b,\
1607
                                    00011111b,11111111b,11111111b,11100000b,\
1620
                                    00011111b,11111111b,11111111b,11100000b,\
1608
                                    00000000b,00000000b,00000000b,01100000b,\
1621
                                    00000000b,00000000b,00000000b,01100000b,\
1609
                                    00000000b,00000000b,00000000b,01100000b,\
1622
                                    00000000b,00000000b,00000000b,01100000b,\
1610
                                    00000000b,00000000b,00000000b,01100000b
1623
                                    00000000b,00000000b,00000000b,01100000b
1611
 
1624
 
1612
.snake_dots                 db      0,0, 0,1, 1,1
1625
.snake_dots                 db      0,0, 0,1, 1,1
1613
.snake_direction            dd      RIGHT
1626
.snake_direction            dd      RIGHT
1614
.snake_direction_next       dd      RIGHT
1627
.snake_direction_next       dd      RIGHT
1615
.number_of_stones           dd      128
1628
.number_of_stones           dd      128
1616
.name                       dd      stage_06_name
1629
.name                       dd      stage_06_name
1617
 
1630
 
1618
stage_07:
1631
stage_07:
1619
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1632
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1620
                                    00000000b,00000000b,00000000b,00000000b,\
1633
                                    00000000b,00000000b,00000000b,00000000b,\
1621
                                    00000000b,00000000b,00000000b,00000000b,\
1634
                                    00000000b,00000000b,00000000b,00000000b,\
1622
                                    00000011b,11111111b,11111100b,00000000b,\
1635
                                    00000011b,11111111b,11111100b,00000000b,\
1623
                                    00000000b,00000000b,00000100b,00000000b,\
1636
                                    00000000b,00000000b,00000100b,00000000b,\
1624
                                    00000011b,11111111b,11110100b,00000000b,\
1637
                                    00000011b,11111111b,11110100b,00000000b,\
1625
                                    00000010b,00000000b,00010100b,00000000b,\
1638
                                    00000010b,00000000b,00010100b,00000000b,\
1626
                                    00000010b,11111111b,11010100b,00000000b,\
1639
                                    00000010b,11111111b,11010100b,00000000b,\
1627
                                    00000010b,00000000b,00010100b,00000000b,\
1640
                                    00000010b,00000000b,00010100b,00000000b,\
1628
                                    00000010b,11111111b,11110100b,00000000b,\
1641
                                    00000010b,11111111b,11110100b,00000000b,\
1629
                                    00000010b,00000000b,00000100b,00000000b,\
1642
                                    00000010b,00000000b,00000100b,00000000b,\
1630
                                    00000011b,11111111b,11111100b,00000000b,\
1643
                                    00000011b,11111111b,11111100b,00000000b,\
1631
                                    00000000b,00000000b,00000000b,00000000b,\
1644
                                    00000000b,00000000b,00000000b,00000000b,\
1632
                                    00000000b,00000000b,00000000b,00000000b
1645
                                    00000000b,00000000b,00000000b,00000000b
1633
 
1646
 
1634
.snake_dots                 db      8,1, 9,1, 10,1
1647
.snake_dots                 db      8,1, 9,1, 10,1
1635
.snake_direction            dd      RIGHT
1648
.snake_direction            dd      RIGHT
1636
.snake_direction_next       dd      RIGHT
1649
.snake_direction_next       dd      RIGHT
1637
.number_of_stones           dd      83
1650
.number_of_stones           dd      83
1638
.name                       dd      stage_07_name
1651
.name                       dd      stage_07_name
1639
 
1652
 
1640
stage_08:
1653
stage_08:
1641
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1654
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1642
                                    00000000b,00000000b,00000000b,00000000b,\
1655
                                    00000000b,00000000b,00000000b,00000000b,\
1643
                                    00000000b,00000000b,00010000b,00000000b,\
1656
                                    00000000b,00000000b,00010000b,00000000b,\
1644
                                    00001001b,00000001b,00000000b,00000000b,\
1657
                                    00001001b,00000001b,00000000b,00000000b,\
1645
                                    00000001b,01001001b,00000101b,00000000b,\
1658
                                    00000001b,01001001b,00000101b,00000000b,\
1646
                                    00000000b,01000000b,00000100b,00000000b,\
1659
                                    00000000b,01000000b,00000100b,00000000b,\
1647
                                    00001111b,00000000b,11100000b,00000000b,\
1660
                                    00001111b,00000000b,11100000b,00000000b,\
1648
                                    00000000b,00000000b,00001000b,10000000b,\
1661
                                    00000000b,00000000b,00001000b,10000000b,\
1649
                                    00000111b,00100000b,10000010b,10000000b,\
1662
                                    00000111b,00100000b,10000010b,10000000b,\
1650
                                    00010000b,00000000b,00000010b,00000000b,\
1663
                                    00010000b,00000000b,00000010b,00000000b,\
1651
                                    00010000b,11000000b,01110010b,00000000b,\
1664
                                    00010000b,11000000b,01110010b,00000000b,\
1652
                                    00010010b,00000000b,00000010b,00000000b,\
1665
                                    00010010b,00000000b,00000010b,00000000b,\
1653
                                    00000000b,00000000b,00000000b,00000000b,\
1666
                                    00000000b,00000000b,00000000b,00000000b,\
1654
                                    00000000b,00000000b,00000000b,00000000b
1667
                                    00000000b,00000000b,00000000b,00000000b
1655
 
1668
 
1656
.snake_dots                 db      0,0, 1,0, 2,0
1669
.snake_dots                 db      0,0, 1,0, 2,0
1657
.snake_direction            dd      RIGHT
1670
.snake_direction            dd      RIGHT
1658
.snake_direction_next       dd      RIGHT
1671
.snake_direction_next       dd      RIGHT
1659
.number_of_stones           dd      40
1672
.number_of_stones           dd      40
1660
.name                       dd      stage_08_name
1673
.name                       dd      stage_08_name
1661
 
1674
 
1662
stage_09:
1675
stage_09:
1663
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1676
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1664
                                    00000000b,00000000b,00000000b,00000000b,\
1677
                                    00000000b,00000000b,00000000b,00000000b,\
1665
                                    00000000b,00000000b,00000000b,00000000b,\
1678
                                    00000000b,00000000b,00000000b,00000000b,\
1666
                                    00000000b,00000000b,00000000b,00000000b,\
1679
                                    00000000b,00000000b,00000000b,00000000b,\
1667
                                    00111101b,00100110b,01001011b,11000000b,\
1680
                                    00111101b,00100110b,01001011b,11000000b,\
1668
                                    00100001b,10101001b,01010010b,00000000b,\
1681
                                    00100001b,10101001b,01010010b,00000000b,\
1669
                                    00111101b,01100001b,01100011b,10000000b,\
1682
                                    00111101b,01100001b,01100011b,10000000b,\
1670
                                    00000101b,01100111b,01010010b,00000000b,\
1683
                                    00000101b,01100111b,01010010b,00000000b,\
1671
                                    00111101b,00100001b,01001011b,11000000b,\
1684
                                    00111101b,00100001b,01001011b,11000000b,\
1672
                                    00000000b,00000000b,00000000b,00000000b,\
1685
                                    00000000b,00000000b,00000000b,00000000b,\
1673
                                    00000000b,00000000b,00000000b,00000000b,\
1686
                                    00000000b,00000000b,00000000b,00000000b,\
1674
                                    00000000b,00000000b,00000000b,00000000b,\
1687
                                    00000000b,00000000b,00000000b,00000000b,\
1675
                                    00000000b,00000000b,00000000b,00000000b,\
1688
                                    00000000b,00000000b,00000000b,00000000b,\
1676
                                    00000000b,00000000b,00000000b,00000000b
1689
                                    00000000b,00000000b,00000000b,00000000b
1677
 
1690
 
1678
.snake_dots                 db      12,6, 12,7, 12,8
1691
.snake_dots                 db      12,6, 12,7, 12,8
1679
.snake_direction            dd      DOWN
1692
.snake_direction            dd      DOWN
1680
.snake_direction_next       dd      DOWN
1693
.snake_direction_next       dd      DOWN
1681
.number_of_stones           dd      59
1694
.number_of_stones           dd      59
1682
.name                       dd      stage_09_name
1695
.name                       dd      stage_09_name
1683
 
1696
 
1684
stage_10:
1697
stage_10:
1685
.field                      db      11101110b,11101110b,11101110b,11100000b,\
1698
.field                      db      11101110b,11101110b,11101110b,11100000b,\
1686
                                    11101110b,11101110b,11101110b,11100000b,\
1699
                                    11101110b,11101110b,11101110b,11100000b,\
1687
                                    11101110b,11101110b,11101110b,11100000b,\
1700
                                    11101110b,11101110b,11101110b,11100000b,\
1688
                                    00000000b,00000000b,00000000b,00000000b,\
1701
                                    00000000b,00000000b,00000000b,00000000b,\
1689
                                    11101110b,11101110b,11101110b,11100000b,\
1702
                                    11101110b,11101110b,11101110b,11100000b,\
1690
                                    11101110b,11101110b,11101110b,11100000b,\
1703
                                    11101110b,11101110b,11101110b,11100000b,\
1691
                                    11101110b,11101110b,11101110b,11100000b,\
1704
                                    11101110b,11101110b,11101110b,11100000b,\
1692
                                    00000000b,00000000b,00000000b,00000000b,\
1705
                                    00000000b,00000000b,00000000b,00000000b,\
1693
                                    11101110b,11101110b,11101110b,11100000b,\
1706
                                    11101110b,11101110b,11101110b,11100000b,\
1694
                                    11101110b,11101110b,11101110b,11100000b,\
1707
                                    11101110b,11101110b,11101110b,11100000b,\
1695
                                    11101110b,11101110b,11101110b,11100000b,\
1708
                                    11101110b,11101110b,11101110b,11100000b,\
1696
                                    00000000b,00000000b,00000000b,00000000b,\
1709
                                    00000000b,00000000b,00000000b,00000000b,\
1697
                                    11101110b,11101110b,11101110b,11100000b,\
1710
                                    11101110b,11101110b,11101110b,11100000b,\
1698
                                    11101110b,11101110b,11101110b,11100000b
1711
                                    11101110b,11101110b,11101110b,11100000b
1699
 
1712
 
1700
.snake_dots                 db      3,2, 3,3, 4,3
1713
.snake_dots                 db      3,2, 3,3, 4,3
1701
.snake_direction            dd      RIGHT
1714
.snake_direction            dd      RIGHT
1702
.snake_direction_next       dd      RIGHT
1715
.snake_direction_next       dd      RIGHT
1703
.number_of_stones           dd      231
1716
.number_of_stones           dd      231
1704
.name                       dd      stage_10_name
1717
.name                       dd      stage_10_name
1705
 
1718
 
1706
stage_11:
1719
stage_11:
1707
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1720
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1708
                                    00000000b,00000000b,00000000b,00000000b,\
1721
                                    00000000b,00000000b,00000000b,00000000b,\
1709
                                    00000000b,00000000b,00000000b,00000000b,\
1722
                                    00000000b,00000000b,00000000b,00000000b,\
1710
                                    00000111b,00000111b,00000111b,00000000b,\
1723
                                    00000111b,00000111b,00000111b,00000000b,\
1711
                                    00001101b,10001101b,10001101b,10000000b,\
1724
                                    00001101b,10001101b,10001101b,10000000b,\
1712
                                    00011000b,11011000b,11011000b,11000000b,\
1725
                                    00011000b,11011000b,11011000b,11000000b,\
1713
                                    00000000b,01000000b,01000000b,01000000b,\
1726
                                    00000000b,01000000b,01000000b,01000000b,\
1714
                                    00011000b,11011000b,11011000b,11000000b,\
1727
                                    00011000b,11011000b,11011000b,11000000b,\
1715
                                    00001101b,10001101b,10001101b,10000000b,\
1728
                                    00001101b,10001101b,10001101b,10000000b,\
1716
                                    00000111b,00000111b,00000111b,00000000b,\
1729
                                    00000111b,00000111b,00000111b,00000000b,\
1717
                                    00000000b,00000000b,00000000b,00000000b,\
1730
                                    00000000b,00000000b,00000000b,00000000b,\
1718
                                    00000000b,00000000b,00000000b,00000000b,\
1731
                                    00000000b,00000000b,00000000b,00000000b,\
1719
                                    00000000b,00000000b,00000000b,00000000b,\
1732
                                    00000000b,00000000b,00000000b,00000000b,\
1720
                                    00000000b,00000000b,00000000b,00000000b
1733
                                    00000000b,00000000b,00000000b,00000000b
1721
 
1734
 
1722
.snake_dots                 db      3,12, 4,12, 5,12
1735
.snake_dots                 db      3,12, 4,12, 5,12
1723
.snake_direction            dd      RIGHT
1736
.snake_direction            dd      RIGHT
1724
.snake_direction_next       dd      RIGHT
1737
.snake_direction_next       dd      RIGHT
1725
.number_of_stones           dd      69
1738
.number_of_stones           dd      69
1726
.name                       dd      stage_11_name
1739
.name                       dd      stage_11_name
1727
 
1740
 
1728
stage_12:
1741
stage_12:
1729
.field                      db      00000000b,00011000b,00001110b,00000000b,\
1742
.field                      db      00000000b,00011000b,00001110b,00000000b,\
1730
                                    01101110b,00010000b,00001010b,01010000b,\
1743
                                    01101110b,00010000b,00001010b,01010000b,\
1731
                                    01001011b,11011001b,11000000b,01110000b,\
1744
                                    01001011b,11011001b,11000000b,01110000b,\
1732
                                    01100001b,01000001b,01000000b,00000000b,\
1745
                                    01100001b,01000001b,01000000b,00000000b,\
1733
                                    00000000b,00000000b,00000011b,10000000b,\
1746
                                    00000000b,00000000b,00000011b,10000000b,\
1734
                                    00000000b,00000000b,00000010b,10000000b,\
1747
                                    00000000b,00000000b,00000010b,10000000b,\
1735
                                    01010011b,00001100b,10100110b,00110000b,\
1748
                                    01010011b,00001100b,10100110b,00110000b,\
1736
                                    01110010b,00001000b,11100100b,00010000b,\
1749
                                    01110010b,00001000b,11100100b,00010000b,\
1737
                                    00000011b,00001100b,00000110b,00110000b,\
1750
                                    00000011b,00001100b,00000110b,00110000b,\
1738
                                    00000000b,11100000b,00000000b,00000000b,\
1751
                                    00000000b,11100000b,00000000b,00000000b,\
1739
                                    00010100b,10100000b,00000110b,00000000b,\
1752
                                    00010100b,10100000b,00000110b,00000000b,\
1740
                                    11011100b,00000110b,10100100b,00000000b,\
1753
                                    11011100b,00000110b,10100100b,00000000b,\
1741
                                    01000011b,10000010b,11100110b,10100000b,\
1754
                                    01000011b,10000010b,11100110b,10100000b,\
1742
                                    11000010b,10000110b,00000000b,11100000b
1755
                                    11000010b,10000110b,00000000b,11100000b
1743
 
1756
 
1744
.snake_dots                 db      27,0, 26,0, 25,0
1757
.snake_dots                 db      27,0, 26,0, 25,0
1745
.snake_direction            dd      LEFT
1758
.snake_direction            dd      LEFT
1746
.snake_direction_next       dd      LEFT
1759
.snake_direction_next       dd      LEFT
1747
.number_of_stones           dd      110
1760
.number_of_stones           dd      110
1748
.name                       dd      stage_12_name
1761
.name                       dd      stage_12_name
1749
 
1762
 
1750
stage_13:
1763
stage_13:
1751
.field                      db      00111000b,00100000b,00000000b,00000000b,\
1764
.field                      db      00111000b,00100000b,00000000b,00000000b,\
1752
                                    01111100b,11110011b,11000011b,10000000b,\
1765
                                    01111100b,11110011b,11000011b,10000000b,\
1753
                                    11111100b,01110011b,10000001b,11000000b,\
1766
                                    11111100b,01110011b,10000001b,11000000b,\
1754
                                    11110000b,00000011b,11000000b,00000000b,\
1767
                                    11110000b,00000011b,11000000b,00000000b,\
1755
                                    00000000b,00000010b,00000000b,00000000b,\
1768
                                    00000000b,00000010b,00000000b,00000000b,\
1756
                                    00000000b,00000010b,00000001b,00000000b,\
1769
                                    00000000b,00000010b,00000001b,00000000b,\
1757
                                    00011110b,00000111b,00000111b,00000000b,\
1770
                                    00011110b,00000111b,00000111b,00000000b,\
1758
                                    00000111b,10001111b,11111110b,00000000b,\
1771
                                    00000111b,10001111b,11111110b,00000000b,\
1759
                                    00000011b,11111111b,11111100b,00000000b,\
1772
                                    00000011b,11111111b,11111100b,00000000b,\
1760
                                    00110001b,11111111b,11111001b,01100000b,\
1773
                                    00110001b,11111111b,11111001b,01100000b,\
1761
                                    00001110b,11101011b,00100111b,10000000b,\
1774
                                    00001110b,11101011b,00100111b,10000000b,\
1762
                                    01111000b,10000011b,10000010b,00000000b,\
1775
                                    01111000b,10000011b,10000010b,00000000b,\
1763
                                    00000011b,11100110b,00011010b,11000000b,\
1776
                                    00000011b,11100110b,00011010b,11000000b,\
1764
                                    00000000b,00000000b,00000000b,00000000b
1777
                                    00000000b,00000000b,00000000b,00000000b
1765
 
1778
 
1766
.snake_dots                 db      0,5, 0,6, 0,7
1779
.snake_dots                 db      0,5, 0,6, 0,7
1767
.snake_direction            dd      DOWN
1780
.snake_direction            dd      DOWN
1768
.snake_direction_next       dd      DOWN
1781
.snake_direction_next       dd      DOWN
1769
.number_of_stones           dd      141
1782
.number_of_stones           dd      141
1770
.name                       dd      stage_13_name
1783
.name                       dd      stage_13_name
1771
 
1784
 
1772
stage_14:
1785
stage_14:
1773
.field                      db      00000110b,00000000b,00000000b,00000000b,\
1786
.field                      db      00000110b,00000000b,00000000b,00000000b,\
1774
                                    00001000b,00000000b,00011000b,00000000b,\
1787
                                    00001000b,00000000b,00011000b,00000000b,\
1775
                                    00010000b,00000000b,00000100b,00000000b,\
1788
                                    00010000b,00000000b,00000100b,00000000b,\
1776
                                    00100001b,10000000b,11000010b,00000000b,\
1789
                                    00100001b,10000000b,11000010b,00000000b,\
1777
                                    01000010b,01000001b,00100001b,00000000b,\
1790
                                    01000010b,01000001b,00100001b,00000000b,\
1778
                                    10000100b,00000010b,00010000b,10000000b,\
1791
                                    10000100b,00000010b,00010000b,10000000b,\
1779
                                    10001000b,00000100b,00001000b,01000000b,\
1792
                                    10001000b,00000100b,00001000b,01000000b,\
1780
                                    10010000b,00001000b,00000100b,01000000b,\
1793
                                    10010000b,00001000b,00000100b,01000000b,\
1781
                                    01001000b,00010000b,00001000b,10000000b,\
1794
                                    01001000b,00010000b,00001000b,10000000b,\
1782
                                    00100100b,00100000b,00010001b,00000000b,\
1795
                                    00100100b,00100000b,00010001b,00000000b,\
1783
                                    00010010b,01000001b,00100010b,00000000b,\
1796
                                    00010010b,01000001b,00100010b,00000000b,\
1784
                                    00001001b,10000000b,11000100b,00000000b,\
1797
                                    00001001b,10000000b,11000100b,00000000b,\
1785
                                    00000100b,00000000b,00001000b,00000000b,\
1798
                                    00000100b,00000000b,00001000b,00000000b,\
1786
                                    00000000b,00000000b,00110000b,00000000b
1799
                                    00000000b,00000000b,00110000b,00000000b
1787
 
1800
 
1788
.snake_dots                 db      8,0, 9,0, 10,0
1801
.snake_dots                 db      8,0, 9,0, 10,0
1789
.snake_direction            dd      RIGHT
1802
.snake_direction            dd      RIGHT
1790
.snake_direction_next       dd      RIGHT
1803
.snake_direction_next       dd      RIGHT
1791
.number_of_stones           dd      60
1804
.number_of_stones           dd      60
1792
.name                       dd      stage_14_name
1805
.name                       dd      stage_14_name
1793
 
1806
 
1794
stage_15:
1807
stage_15:
1795
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1808
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1796
                                    00000000b,01110000b,00110000b,00000000b,\
1809
                                    00000000b,01110000b,00110000b,00000000b,\
1797
                                    00000000b,10000000b,00001010b,00000000b,\
1810
                                    00000000b,10000000b,00001010b,00000000b,\
1798
                                    00100001b,00000000b,00110010b,00000000b,\
1811
                                    00100001b,00000000b,00110010b,00000000b,\
1799
                                    00010001b,00111111b,10011100b,00000000b,\
1812
                                    00010001b,00111111b,10011100b,00000000b,\
1800
                                    00001001b,00100000b,11000000b,00000000b,\
1813
                                    00001001b,00100000b,11000000b,00000000b,\
1801
                                    00010000b,00000010b,01000000b,00000000b,\
1814
                                    00010000b,00000010b,01000000b,00000000b,\
1802
                                    00100000b,00000010b,00100001b,10000000b,\
1815
                                    00100000b,00000010b,00100001b,10000000b,\
1803
                                    00010000b,00000010b,00110010b,01000000b,\
1816
                                    00010000b,00000010b,00110010b,01000000b,\
1804
                                    00001000b,01000100b,00011100b,01000000b,\
1817
                                    00001000b,01000100b,00011100b,01000000b,\
1805
                                    00010000b,00111000b,00010000b,01000000b,\
1818
                                    00010000b,00111000b,00010000b,01000000b,\
1806
                                    00100000b,00000000b,00010000b,01000000b,\
1819
                                    00100000b,00000000b,00010000b,01000000b,\
1807
                                    00000000b,00000000b,00000000b,00000000b,\
1820
                                    00000000b,00000000b,00000000b,00000000b,\
1808
                                    00000000b,00000000b,00000000b,00000000b
1821
                                    00000000b,00000000b,00000000b,00000000b
1809
 
1822
 
1810
.snake_dots                 db      13,3, 13,2, 14,2
1823
.snake_dots                 db      13,3, 13,2, 14,2
1811
.snake_direction            dd      RIGHT
1824
.snake_direction            dd      RIGHT
1812
.snake_direction_next       dd      RIGHT
1825
.snake_direction_next       dd      RIGHT
1813
.number_of_stones           dd      60
1826
.number_of_stones           dd      60
1814
.name                       dd      stage_15_name
1827
.name                       dd      stage_15_name
1815
 
1828
 
1816
stage_16:
1829
stage_16:
1817
.field                      db      00000000b,10000010b,00000000b,00000000b,\
1830
.field                      db      00000000b,10000010b,00000000b,00000000b,\
1818
                                    00000000b,01001010b,10000010b,10100000b,\
1831
                                    00000000b,01001010b,10000010b,10100000b,\
1819
                                    01111111b,11100111b,00000001b,11000000b,\
1832
                                    01111111b,11100111b,00000001b,11000000b,\
1820
                                    00000000b,01000010b,00000000b,10000000b,\
1833
                                    00000000b,01000010b,00000000b,10000000b,\
1821
                                    00000100b,10000000b,01000000b,00000001b,\
1834
                                    00000100b,10000000b,01000000b,00000001b,\
1822
                                    00000100b,00100000b,10000000b,00000010b,\
1835
                                    00000100b,00100000b,10000000b,00000010b,\
1823
                                    11000100b,00010001b,11111000b,00000111b,\
1836
                                    11000100b,00010001b,11111000b,00000111b,\
1824
                                    00010101b,00001000b,10000000b,00000010b,\
1837
                                    00010101b,00001000b,10000000b,00000010b,\
1825
                                    00001110b,00010000b,01000000b,00000001b,\
1838
                                    00001110b,00010000b,01000000b,00000001b,\
1826
                                    00000100b,00100010b,00000000b,10000000b,\
1839
                                    00000100b,00100010b,00000000b,10000000b,\
1827
                                    00000000b,00000010b,00000000b,01000000b,\
1840
                                    00000000b,00000010b,00000000b,01000000b,\
1828
                                    00111111b,11111111b,11111111b,11100000b,\
1841
                                    00111111b,11111111b,11111111b,11100000b,\
1829
                                    00000000b,00000010b,00000000b,01000000b,\
1842
                                    00000000b,00000010b,00000000b,01000000b,\
1830
                                    00000000b,00000010b,00000000b,10000000b
1843
                                    00000000b,00000010b,00000000b,10000000b
1831
 
1844
 
1832
.snake_dots                 db      11,7, 10,7, 9,7
1845
.snake_dots                 db      11,7, 10,7, 9,7
1833
.snake_direction            dd      LEFT
1846
.snake_direction            dd      LEFT
1834
.snake_direction_next       dd      LEFT
1847
.snake_direction_next       dd      LEFT
1835
.number_of_stones           dd      96
1848
.number_of_stones           dd      96
1836
.name                       dd      stage_16_name
1849
.name                       dd      stage_16_name
1837
 
1850
 
1838
stage_17:
1851
stage_17:
1839
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1852
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1840
                                    00000000b,00000000b,00000000b,00000000b,\
1853
                                    00000000b,00000000b,00000000b,00000000b,\
1841
                                    00000000b,00000000b,00000000b,00000000b,\
1854
                                    00000000b,00000000b,00000000b,00000000b,\
1842
                                    00000111b,10000001b,11100000b,00000000b,\
1855
                                    00000111b,10000001b,11100000b,00000000b,\
1843
                                    00001000b,01000010b,00010000b,00000000b,\
1856
                                    00001000b,01000010b,00010000b,00000000b,\
1844
                                    00010001b,00100100b,01001000b,00000000b,\
1857
                                    00010001b,00100100b,01001000b,00000000b,\
1845
                                    00010001b,00000000b,01001000b,00000000b,\
1858
                                    00010001b,00000000b,01001000b,00000000b,\
1846
                                    00001000b,01000010b,00010000b,00000000b,\
1859
                                    00001000b,01000010b,00010000b,00000000b,\
1847
                                    00000111b,10000001b,11100000b,00000000b,\
1860
                                    00000111b,10000001b,11100000b,00000000b,\
1848
                                    00000000b,00000000b,00000000b,00000000b,\
1861
                                    00000000b,00000000b,00000000b,00000000b,\
1849
                                    00000000b,01000000b,00000000b,00000000b,\
1862
                                    00000000b,01000000b,00000000b,00000000b,\
1850
                                    00000000b,00111110b,00000000b,00000000b,\
1863
                                    00000000b,00111110b,00000000b,00000000b,\
1851
                                    00000000b,00000000b,00000000b,00000000b,\
1864
                                    00000000b,00000000b,00000000b,00000000b,\
1852
                                    00000000b,00000000b,00000000b,00000000b
1865
                                    00000000b,00000000b,00000000b,00000000b
1853
 
1866
 
1854
.snake_dots                 db      11,7, 11,8, 12,8
1867
.snake_dots                 db      11,7, 11,8, 12,8
1855
.snake_direction            dd      RIGHT
1868
.snake_direction            dd      RIGHT
1856
.snake_direction_next       dd      RIGHT
1869
.snake_direction_next       dd      RIGHT
1857
.number_of_stones           dd      40
1870
.number_of_stones           dd      40
1858
.name                       dd      stage_17_name
1871
.name                       dd      stage_17_name
1859
 
1872
 
1860
stage_18:
1873
stage_18:
1861
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1874
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1862
                                    01000100b,01000100b,01000100b,01000000b,\
1875
                                    01000100b,01000100b,01000100b,01000000b,\
1863
                                    00101010b,10101010b,10101010b,10100000b,\
1876
                                    00101010b,10101010b,10101010b,10100000b,\
1864
                                    00010001b,00010001b,00010001b,00000000b,\
1877
                                    00010001b,00010001b,00010001b,00000000b,\
1865
                                    00000000b,00000000b,00000000b,00000000b,\
1878
                                    00000000b,00000000b,00000000b,00000000b,\
1866
                                    00000000b,00000000b,00000000b,00000000b,\
1879
                                    00000000b,00000000b,00000000b,00000000b,\
1867
                                    01000100b,01000100b,01000100b,01000000b,\
1880
                                    01000100b,01000100b,01000100b,01000000b,\
1868
                                    00101010b,10101010b,10101010b,10100000b,\
1881
                                    00101010b,10101010b,10101010b,10100000b,\
1869
                                    00010001b,00010001b,00010001b,00000000b,\
1882
                                    00010001b,00010001b,00010001b,00000000b,\
1870
                                    00000000b,00000000b,00000000b,00000000b,\
1883
                                    00000000b,00000000b,00000000b,00000000b,\
1871
                                    00000000b,00000000b,00000000b,00000000b,\
1884
                                    00000000b,00000000b,00000000b,00000000b,\
1872
                                    01000100b,01000100b,01000100b,01000000b,\
1885
                                    01000100b,01000100b,01000100b,01000000b,\
1873
                                    00101010b,10101010b,10101010b,10100000b,\
1886
                                    00101010b,10101010b,10101010b,10100000b,\
1874
                                    00010001b,00010001b,00010001b,00000000b
1887
                                    00010001b,00010001b,00010001b,00000000b
1875
 
1888
 
1876
.snake_dots                 db      2,5, 3,5, 4,5
1889
.snake_dots                 db      2,5, 3,5, 4,5
1877
.snake_direction            dd      RIGHT
1890
.snake_direction            dd      RIGHT
1878
.snake_direction_next       dd      RIGHT
1891
.snake_direction_next       dd      RIGHT
1879
.number_of_stones           dd      78
1892
.number_of_stones           dd      78
1880
.name                       dd      stage_18_name
1893
.name                       dd      stage_18_name
1881
 
1894
 
1882
stage_19:
1895
stage_19:
1883
.field                      db      01000010b,00100100b,10000101b,00000000b,\
1896
.field                      db      01000010b,00100100b,10000101b,00000000b,\
1884
                                    00010000b,00010000b,00100000b,10000000b,\
1897
                                    00010000b,00010000b,00100000b,10000000b,\
1885
                                    00111001b,00000010b,00010000b,00100000b,\
1898
                                    00111001b,00000010b,00010000b,00100000b,\
1886
                                    01000100b,00001000b,00000010b,00000000b,\
1899
                                    01000100b,00001000b,00000010b,00000000b,\
1887
                                    01010101b,01000000b,01000000b,01000000b,\
1900
                                    01010101b,01000000b,01000000b,01000000b,\
1888
                                    01010100b,00010000b,00001000b,11100000b,\
1901
                                    01010100b,00010000b,00001000b,11100000b,\
1889
                                    00000100b,10001001b,00100001b,00000000b,\
1902
                                    00000100b,10001001b,00100001b,00000000b,\
1890
                                    01111100b,00100000b,00000001b,01010000b,\
1903
                                    01111100b,00100000b,00000001b,01010000b,\
1891
                                    00111001b,00000100b,00010001b,01010000b,\
1904
                                    00111001b,00000100b,00010001b,01010000b,\
1892
                                    00010000b,00000000b,10000001b,00010000b,\
1905
                                    00010000b,00000000b,10000001b,00010000b,\
1893
                                    11010111b,11100000b,00011101b,11110000b,\
1906
                                    11010111b,11100000b,00011101b,11110000b,\
1894
                                    00010000b,01000000b,00100000b,11100000b,\
1907
                                    00010000b,01000000b,00100000b,11100000b,\
1895
                                    00010000b,10000000b,00100000b,01000000b,\
1908
                                    00010000b,10000000b,00100000b,01000000b,\
1896
                                    00000001b,00000000b,00010000b,01000000b
1909
                                    00000001b,00000000b,00010000b,01000000b
1897
 
1910
 
1898
.snake_dots                 db      27,6, 0,6, 1,6
1911
.snake_dots                 db      27,6, 0,6, 1,6
1899
.snake_direction            dd      RIGHT
1912
.snake_direction            dd      RIGHT
1900
.snake_direction_next       dd      RIGHT
1913
.snake_direction_next       dd      RIGHT
1901
.number_of_stones           dd      95
1914
.number_of_stones           dd      95
1902
.name                       dd      stage_19_name
1915
.name                       dd      stage_19_name
1903
 
1916
 
1904
stage_20:
1917
stage_20:
1905
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1918
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1906
                                    00000000b,00000000b,10001000b,00000000b,\
1919
                                    00000000b,00000000b,10001000b,00000000b,\
1907
                                    00000000b,00011100b,10000100b,00000000b,\
1920
                                    00000000b,00011100b,10000100b,00000000b,\
1908
                                    00000000b,01100100b,10000010b,00000000b,\
1921
                                    00000000b,01100100b,10000010b,00000000b,\
1909
                                    00000011b,10000100b,10000100b,00000000b,\
1922
                                    00000011b,10000100b,10000100b,00000000b,\
1910
                                    00000010b,00000100b,10001000b,00000000b,\
1923
                                    00000010b,00000100b,10001000b,00000000b,\
1911
                                    00000010b,00000100b,10000100b,00000000b,\
1924
                                    00000010b,00000100b,10000100b,00000000b,\
1912
                                    00000010b,00000100b,10000010b,00000000b,\
1925
                                    00000010b,00000100b,10000010b,00000000b,\
1913
                                    00000010b,00111100b,10010010b,00000000b,\
1926
                                    00000010b,00111100b,10010010b,00000000b,\
1914
                                    00011110b,00111100b,10010100b,00000000b,\
1927
                                    00011110b,00111100b,10010100b,00000000b,\
1915
                                    00011110b,00111100b,10001000b,00000000b,\
1928
                                    00011110b,00111100b,10001000b,00000000b,\
1916
                                    00011110b,00000000b,10000000b,00000000b,\
1929
                                    00011110b,00000000b,10000000b,00000000b,\
1917
                                    00000000b,00000000b,10000000b,00000000b,\
1930
                                    00000000b,00000000b,10000000b,00000000b,\
1918
                                    00000000b,00000000b,00000000b,00000000b
1931
                                    00000000b,00000000b,00000000b,00000000b
1919
 
1932
 
1920
.snake_dots                 db      17,2, 17,3, 17,4
1933
.snake_dots                 db      17,2, 17,3, 17,4
1921
.snake_direction            dd      DOWN
1934
.snake_direction            dd      DOWN
1922
.snake_direction_next       dd      DOWN
1935
.snake_direction_next       dd      DOWN
1923
.number_of_stones           dd      65
1936
.number_of_stones           dd      65
1924
.name                       dd      stage_20_name
1937
.name                       dd      stage_20_name
1925
 
1938
 
1926
stage_21:
1939
stage_21:
1927
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1940
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1928
                                    00000000b,00000000b,00000000b,00000000b,\
1941
                                    00000000b,00000000b,00000000b,00000000b,\
1929
                                    00000011b,11111111b,11111110b,00000000b,\
1942
                                    00000011b,11111111b,11111110b,00000000b,\
1930
                                    00000001b,01000100b,01000100b,00000000b,\
1943
                                    00000001b,01000100b,01000100b,00000000b,\
1931
                                    00000010b,01000100b,01000100b,00000000b,\
1944
                                    00000010b,01000100b,01000100b,00000000b,\
1932
                                    00001100b,01000100b,01000100b,00000000b,\
1945
                                    00001100b,01000100b,01000100b,00000000b,\
1933
                                    01110000b,01000100b,01000100b,00000000b,\
1946
                                    01110000b,01000100b,01000100b,00000000b,\
1934
                                    01110000b,01000100b,01000100b,00000000b,\
1947
                                    01110000b,01000100b,01000100b,00000000b,\
1935
                                    01110000b,11101110b,11101110b,00000000b,\
1948
                                    01110000b,11101110b,11101110b,00000000b,\
1936
                                    00000000b,11101110b,11101110b,00000000b,\
1949
                                    00000000b,11101110b,11101110b,00000000b,\
1937
                                    00000000b,11101110b,11101110b,00000000b,\
1950
                                    00000000b,11101110b,11101110b,00000000b,\
1938
                                    00000000b,00000000b,00000000b,00000000b,\
1951
                                    00000000b,00000000b,00000000b,00000000b,\
1939
                                    00000000b,00000000b,00000000b,00000000b,\
1952
                                    00000000b,00000000b,00000000b,00000000b,\
1940
                                    00000000b,00000000b,00000000b,00000000b
1953
                                    00000000b,00000000b,00000000b,00000000b
1941
 
1954
 
1942
.snake_dots                 db      10,1, 11,1, 12,1
1955
.snake_dots                 db      10,1, 11,1, 12,1
1943
.snake_direction            dd      RIGHT
1956
.snake_direction            dd      RIGHT
1944
.snake_direction_next       dd      RIGHT
1957
.snake_direction_next       dd      RIGHT
1945
.number_of_stones           dd      86
1958
.number_of_stones           dd      86
1946
.name                       dd      stage_21_name
1959
.name                       dd      stage_21_name
1947
 
1960
 
1948
stage_22:
1961
stage_22:
1949
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1962
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1950
                                    00000011b,10000000b,00000000b,00000000b,\
1963
                                    00000011b,10000000b,00000000b,00000000b,\
1951
                                    00000111b,11100000b,00000000b,00000000b,\
1964
                                    00000111b,11100000b,00000000b,00000000b,\
1952
                                    00001111b,11110000b,00000000b,00000000b,\
1965
                                    00001111b,11110000b,00000000b,00000000b,\
1953
                                    00011111b,11100000b,00000000b,00000000b,\
1966
                                    00011111b,11100000b,00000000b,00000000b,\
1954
                                    00011111b,11000011b,00001100b,00110000b,\
1967
                                    00011111b,11000011b,00001100b,00110000b,\
1955
                                    00011111b,10000111b,10011110b,01110000b,\
1968
                                    00011111b,10000111b,10011110b,01110000b,\
1956
                                    00011111b,11000111b,10011110b,01110000b,\
1969
                                    00011111b,11000111b,10011110b,01110000b,\
1957
                                    00011111b,11100011b,00001100b,00110000b,\
1970
                                    00011111b,11100011b,00001100b,00110000b,\
1958
                                    00001111b,11110000b,00000000b,00000000b,\
1971
                                    00001111b,11110000b,00000000b,00000000b,\
1959
                                    00000111b,11100000b,00000000b,00000000b,\
1972
                                    00000111b,11100000b,00000000b,00000000b,\
1960
                                    00000011b,10000000b,00000000b,00000000b,\
1973
                                    00000011b,10000000b,00000000b,00000000b,\
1961
                                    00000000b,00000000b,00000000b,00000000b,\
1974
                                    00000000b,00000000b,00000000b,00000000b,\
1962
                                    00000000b,00000000b,00000000b,00000000b
1975
                                    00000000b,00000000b,00000000b,00000000b
1963
 
1976
 
1964
.snake_dots                 db      1,7, 1,6, 1,5
1977
.snake_dots                 db      1,7, 1,6, 1,5
1965
.snake_direction            dd      UP
1978
.snake_direction            dd      UP
1966
.snake_direction_next       dd      UP
1979
.snake_direction_next       dd      UP
1967
.number_of_stones           dd      104
1980
.number_of_stones           dd      104
1968
.name                       dd      stage_22_name
1981
.name                       dd      stage_22_name
1969
 
1982
 
1970
stage_23:
1983
stage_23:
1971
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1984
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1972
                                    00100000b,01000101b,00010000b,00100000b,\
1985
                                    00100000b,01000101b,00010000b,00100000b,\
1973
                                    00011010b,00100101b,00100010b,11000000b,\
1986
                                    00011010b,00100101b,00100010b,11000000b,\
1974
                                    00000100b,10101000b,10101001b,00000000b,\
1987
                                    00000100b,10101000b,10101001b,00000000b,\
1975
                                    00000100b,10010010b,01001001b,00000000b,\
1988
                                    00000100b,10010010b,01001001b,00000000b,\
1976
                                    00001011b,00110000b,01100110b,10000000b,\
1989
                                    00001011b,00110000b,01100110b,10000000b,\
1977
                                    00000000b,11001010b,10011000b,00000000b,\
1990
                                    00000000b,11001010b,10011000b,00000000b,\
1978
                                    00000001b,00000111b,00000100b,00000000b,\
1991
                                    00000001b,00000111b,00000100b,00000000b,\
1979
                                    00001110b,01001010b,10010011b,10000000b,\
1992
                                    00001110b,01001010b,10010011b,10000000b,\
1980
                                    00000010b,00110000b,01100010b,00000000b,\
1993
                                    00000010b,00110000b,01100010b,00000000b,\
1981
                                    00000101b,00010010b,01000101b,00000000b,\
1994
                                    00000101b,00010010b,01000101b,00000000b,\
1982
                                    00001001b,00001000b,10000100b,10000000b,\
1995
                                    00001001b,00001000b,10000100b,10000000b,\
1983
                                    00000000b,00001000b,10000000b,00000000b,\
1996
                                    00000000b,00001000b,10000000b,00000000b,\
1984
                                    00000000b,00000000b,00000000b,00000000b
1997
                                    00000000b,00000000b,00000000b,00000000b
1985
 
1998
 
1986
.snake_dots                 db      15,0, 14,0, 13,0
1999
.snake_dots                 db      15,0, 14,0, 13,0
1987
.snake_direction            dd      LEFT
2000
.snake_direction            dd      LEFT
1988
.snake_direction_next       dd      LEFT
2001
.snake_direction_next       dd      LEFT
1989
.number_of_stones           dd      85
2002
.number_of_stones           dd      85
1990
.name                       dd      stage_23_name
2003
.name                       dd      stage_23_name
1991
 
2004
 
1992
stage_24:
2005
stage_24:
1993
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2006
.field                      db      00000000b,00000000b,00000000b,00000000b,\
1994
                                    00111111b,11111111b,11111111b,10000000b,\
2007
                                    00111111b,11111111b,11111111b,10000000b,\
1995
                                    00100000b,00000000b,00000000b,10000000b,\
2008
                                    00100000b,00000000b,00000000b,10000000b,\
1996
                                    00100011b,11111111b,11111000b,10000000b,\
2009
                                    00100011b,11111111b,11111000b,10000000b,\
1997
                                    00100010b,00000000b,00001000b,10000000b,\
2010
                                    00100010b,00000000b,00001000b,10000000b,\
1998
                                    00100010b,00111111b,10001000b,10000000b,\
2011
                                    00100010b,00111111b,10001000b,10000000b,\
1999
                                    00100010b,00100000b,10001000b,10000000b,\
2012
                                    00100010b,00100000b,10001000b,10000000b,\
2000
                                    00101010b,10101010b,10101010b,10000000b,\
2013
                                    00101010b,10101010b,10101010b,10000000b,\
2001
                                    00001000b,10001110b,00100010b,00000000b,\
2014
                                    00001000b,10001110b,00100010b,00000000b,\
2002
                                    00001000b,10000000b,00100010b,00000000b,\
2015
                                    00001000b,10000000b,00100010b,00000000b,\
2003
                                    00001000b,11111111b,11100010b,00000000b,\
2016
                                    00001000b,11111111b,11100010b,00000000b,\
2004
                                    00001000b,00000000b,00000010b,00000000b,\
2017
                                    00001000b,00000000b,00000010b,00000000b,\
2005
                                    00001111b,11111111b,11111110b,00000000b,\
2018
                                    00001111b,11111111b,11111110b,00000000b,\
2006
                                    00000000b,00000000b,00000000b,00000000b
2019
                                    00000000b,00000000b,00000000b,00000000b
2007
 
2020
 
2008
.snake_dots                 db      1,0, 0,0, 0,1
2021
.snake_dots                 db      1,0, 0,0, 0,1
2009
.snake_direction            dd      DOWN
2022
.snake_direction            dd      DOWN
2010
.snake_direction_next       dd      DOWN
2023
.snake_direction_next       dd      DOWN
2011
.number_of_stones           dd      120
2024
.number_of_stones           dd      120
2012
.name                       dd      stage_24_name
2025
.name                       dd      stage_24_name
2013
 
2026
 
2014
stage_25:
2027
stage_25:
2015
.field                      db      00000100b,11000000b,00000000b,00000000b,\
2028
.field                      db      00000100b,11000000b,00000000b,00000000b,\
2016
                                    00000011b,10000000b,00110010b,00000000b,\
2029
                                    00000011b,10000000b,00110010b,00000000b,\
2017
                                    10011010b,10000000b,00011100b,00000000b,\
2030
                                    10011010b,10000000b,00011100b,00000000b,\
2018
                                    01110000b,00000000b,00010101b,10010000b,\
2031
                                    01110000b,00000000b,00010101b,10010000b,\
2019
                                    01010000b,00000111b,00000000b,11100000b,\
2032
                                    01010000b,00000111b,00000000b,11100000b,\
2020
                                    00000100b,00000101b,00000000b,10100000b,\
2033
                                    00000100b,00000101b,00000000b,10100000b,\
2021
                                    00000100b,00000100b,00000000b,00000000b,\
2034
                                    00000100b,00000100b,00000000b,00000000b,\
2022
                                    00000011b,11111100b,00011001b,00000000b,\
2035
                                    00000011b,11111100b,00011001b,00000000b,\
2023
                                    00000010b,10010100b,00001110b,00000000b,\
2036
                                    00000010b,10010100b,00001110b,00000000b,\
2024
                                    00000010b,10010100b,00001010b,00000000b,\
2037
                                    00000010b,10010100b,00001010b,00000000b,\
2025
                                    00000000b,00000000b,00000000b,00000000b,\
2038
                                    00000000b,00000000b,00000000b,00000000b,\
2026
                                    00000011b,00100001b,10010011b,00100000b,\
2039
                                    00000011b,00100001b,10010011b,00100000b,\
2027
                                    00000001b,11000000b,11100001b,11000000b,\
2040
                                    00000001b,11000000b,11100001b,11000000b,\
2028
                                    00000001b,01000000b,10100001b,01000000b
2041
                                    00000001b,01000000b,10100001b,01000000b
2029
 
2042
 
2030
.snake_dots                 db      11,2, 12,2, 13,2
2043
.snake_dots                 db      11,2, 12,2, 13,2
2031
.snake_direction            dd      RIGHT
2044
.snake_direction            dd      RIGHT
2032
.snake_direction_next       dd      RIGHT
2045
.snake_direction_next       dd      RIGHT
2033
.number_of_stones           dd      88
2046
.number_of_stones           dd      88
2034
.name                       dd      stage_25_name
2047
.name                       dd      stage_25_name
2035
 
2048
 
2036
stage_26:
2049
stage_26:
2037
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2050
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2038
                                    00111100b,01001111b,01111010b,01000000b,\
2051
                                    00111100b,01001111b,01111010b,01000000b,\
2039
                                    00100000b,01000001b,00001010b,01000000b,\
2052
                                    00100000b,01000001b,00001010b,01000000b,\
2040
                                    00100100b,01001111b,01111011b,11000000b,\
2053
                                    00100100b,01001111b,01111011b,11000000b,\
2041
                                    00000100b,01001000b,00001000b,01000000b,\
2054
                                    00000100b,01001000b,00001000b,01000000b,\
2042
                                    00111100b,01001111b,01111000b,01000000b,\
2055
                                    00111100b,01001111b,01111000b,01000000b,\
2043
                                    00000000b,00000000b,00000000b,00000000b,\
2056
                                    00000000b,00000000b,00000000b,00000000b,\
2044
                                    00000000b,00000000b,00000000b,00000000b,\
2057
                                    00000000b,00000000b,00000000b,00000000b,\
2045
                                    00111101b,11101111b,01111011b,11000000b,\
2058
                                    00111101b,11101111b,01111011b,11000000b,\
2046
                                    00100001b,00000001b,00000000b,00000000b,\
2059
                                    00100001b,00000001b,00000000b,00000000b,\
2047
                                    00111101b,11100001b,01111011b,11000000b,\
2060
                                    00111101b,11100001b,01111011b,11000000b,\
2048
                                    00000100b,00000001b,00000000b,01000000b,\
2061
                                    00000100b,00000001b,00000000b,01000000b,\
2049
                                    00111101b,11100001b,01111011b,11000000b,\
2062
                                    00111101b,11100001b,01111011b,11000000b,\
2050
                                    00000000b,00000000b,00000000b,00000000b
2063
                                    00000000b,00000000b,00000000b,00000000b
2051
 
2064
 
2052
.snake_dots                 db      1,5, 0,5, 0,6
2065
.snake_dots                 db      1,5, 0,5, 0,6
2053
.snake_direction            dd      DOWN
2066
.snake_direction            dd      DOWN
2054
.snake_direction_next       dd      DOWN
2067
.snake_direction_next       dd      DOWN
2055
.number_of_stones           dd      115
2068
.number_of_stones           dd      115
2056
.name                       dd      stage_26_name
2069
.name                       dd      stage_26_name
2057
 
2070
 
2058
stage_27:
2071
stage_27:
2059
.field                      db      00000000b,10000000b,00000000b,01000000b,\
2072
.field                      db      00000000b,10000000b,00000000b,01000000b,\
2060
                                    00000000b,10000000b,01000000b,11100000b,\
2073
                                    00000000b,10000000b,01000000b,11100000b,\
2061
                                    00100011b,11100000b,01000000b,01000000b,\
2074
                                    00100011b,11100000b,01000000b,01000000b,\
2062
                                    01110000b,10000001b,11110000b,00000000b,\
2075
                                    01110000b,10000001b,11110000b,00000000b,\
2063
                                    00100000b,10000000b,01000000b,00000000b,\
2076
                                    00100000b,10000000b,01000000b,00000000b,\
2064
                                    00000000b,00000000b,01000010b,00000000b,\
2077
                                    00000000b,00000000b,01000010b,00000000b,\
2065
                                    00000000b,00000000b,00000000b,00000000b,\
2078
                                    00000000b,00000000b,00000000b,00000000b,\
2066
                                    00000010b,00000000b,00000000b,00000000b,\
2079
                                    00000010b,00000000b,00000000b,00000000b,\
2067
                                    00000111b,00000000b,00000000b,10000000b,\
2080
                                    00000111b,00000000b,00000000b,10000000b,\
2068
                                    00000010b,00001000b,00000001b,11000000b,\
2081
                                    00000010b,00001000b,00000001b,11000000b,\
2069
                                    00000000b,00000000b,10000000b,10000000b,\
2082
                                    00000000b,00000000b,10000000b,10000000b,\
2070
                                    00000000b,01000001b,11000000b,00000000b,\
2083
                                    00000000b,01000001b,11000000b,00000000b,\
2071
                                    01000000b,11100000b,10000000b,00000000b,\
2084
                                    01000000b,11100000b,10000000b,00000000b,\
2072
                                    00000000b,01000000b,00000000b,00000000b
2085
                                    00000000b,01000000b,00000000b,00000000b
2073
 
2086
 
2074
.snake_dots                 db      12,8, 12,7, 12,6
2087
.snake_dots                 db      12,8, 12,7, 12,6
2075
.snake_direction            dd      UP
2088
.snake_direction            dd      UP
2076
.snake_direction_next       dd      UP
2089
.snake_direction_next       dd      UP
2077
.number_of_stones           dd      51
2090
.number_of_stones           dd      51
2078
.name                       dd      stage_27_name
2091
.name                       dd      stage_27_name
2079
 
2092
 
2080
stage_28:
2093
stage_28:
2081
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2094
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2082
                                    00000000b,00000000b,00000000b,00000000b,\
2095
                                    00000000b,00000000b,00000000b,00000000b,\
2083
                                    00000000b,00000000b,00000000b,00000000b,\
2096
                                    00000000b,00000000b,00000000b,00000000b,\
2084
                                    00000000b,00000000b,00000000b,00000000b,\
2097
                                    00000000b,00000000b,00000000b,00000000b,\
2085
                                    00000100b,00000000b,00000010b,00000000b,\
2098
                                    00000100b,00000000b,00000010b,00000000b,\
2086
                                    00010100b,00000000b,00000010b,10000000b,\
2099
                                    00010100b,00000000b,00000010b,10000000b,\
2087
                                    01010100b,00000000b,00000010b,10100000b,\
2100
                                    01010100b,00000000b,00000010b,10100000b,\
2088
                                    01010101b,11111111b,11111010b,10100000b,\
2101
                                    01010101b,11111111b,11111010b,10100000b,\
2089
                                    01010100b,00000000b,00000010b,10100000b,\
2102
                                    01010100b,00000000b,00000010b,10100000b,\
2090
                                    00010100b,00000000b,00000010b,10000000b,\
2103
                                    00010100b,00000000b,00000010b,10000000b,\
2091
                                    00000100b,00000000b,00000010b,00000000b,\
2104
                                    00000100b,00000000b,00000010b,00000000b,\
2092
                                    00000000b,00000000b,00000000b,00000000b,\
2105
                                    00000000b,00000000b,00000000b,00000000b,\
2093
                                    00000000b,00000000b,00000000b,00000000b,\
2106
                                    00000000b,00000000b,00000000b,00000000b,\
2094
                                    00000000b,00000000b,00000000b,00000000b
2107
                                    00000000b,00000000b,00000000b,00000000b
2095
 
2108
 
2096
.snake_dots                 db      13,8, 12,8, 11,8
2109
.snake_dots                 db      13,8, 12,8, 11,8
2097
.snake_direction            dd      LEFT
2110
.snake_direction            dd      LEFT
2098
.snake_direction_next       dd      LEFT
2111
.snake_direction_next       dd      LEFT
2099
.number_of_stones           dd      44
2112
.number_of_stones           dd      44
2100
.name                       dd      stage_28_name
2113
.name                       dd      stage_28_name
2101
 
2114
 
2102
stage_29:
2115
stage_29:
2103
.field                      db      00000000b,01110000b,00000000b,00000000b,\
2116
.field                      db      00000000b,01110000b,00000000b,00000000b,\
2104
                                    00000100b,01000110b,00000001b,10000000b,\
2117
                                    00000100b,01000110b,00000001b,10000000b,\
2105
                                    01001110b,00001100b,01100000b,11000000b,\
2118
                                    01001110b,00001100b,01100000b,11000000b,\
2106
                                    01000000b,00000000b,01100000b,00000000b,\
2119
                                    01000000b,00000000b,01100000b,00000000b,\
2107
                                    01100000b,01111000b,00000001b,10010000b,\
2120
                                    01100000b,01111000b,00000001b,10010000b,\
2108
                                    00000000b,00000010b,10000101b,10110000b,\
2121
                                    00000000b,00000010b,10000101b,10110000b,\
2109
                                    00110000b,00110010b,10001100b,00100000b,\
2122
                                    00110000b,00110010b,10001100b,00100000b,\
2110
                                    00011011b,00110110b,10000100b,00000000b,\
2123
                                    00011011b,00110110b,10000100b,00000000b,\
2111
                                    00000001b,00000000b,10010000b,10000000b,\
2124
                                    00000001b,00000000b,10010000b,10000000b,\
2112
                                    00100001b,00000000b,00111000b,10000000b,\
2125
                                    00100001b,00000000b,00111000b,10000000b,\
2113
                                    00111001b,00110011b,00000011b,10000000b,\
2126
                                    00111001b,00110011b,00000011b,10000000b,\
2114
                                    01111111b,11111111b,00011011b,11010000b,\
2127
                                    01111111b,11111111b,00011011b,11010000b,\
2115
                                    11111111b,11111111b,00011111b,11110000b,\
2128
                                    11111111b,11111111b,00011111b,11110000b,\
2116
                                    11111111b,11111111b,00111111b,11110000b
2129
                                    11111111b,11111111b,00111111b,11110000b
2117
 
2130
 
2118
.snake_dots                 db      0,0, 1,0, 2,0
2131
.snake_dots                 db      0,0, 1,0, 2,0
2119
.snake_direction            dd      RIGHT
2132
.snake_direction            dd      RIGHT
2120
.snake_direction_next       dd      RIGHT
2133
.snake_direction_next       dd      RIGHT
2121
.number_of_stones           dd      151
2134
.number_of_stones           dd      151
2122
.name                       dd      stage_29_name
2135
.name                       dd      stage_29_name
2123
 
2136
 
2124
stage_30:
2137
stage_30:
2125
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2138
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2126
                                    00000000b,00000001b,01011100b,00000000b,\
2139
                                    00000000b,00000001b,01011100b,00000000b,\
2127
                                    00000000b,00000001b,11001000b,00000000b,\
2140
                                    00000000b,00000001b,11001000b,00000000b,\
2128
                                    00000100b,00000001b,01001000b,00000000b,\
2141
                                    00000100b,00000001b,01001000b,00000000b,\
2129
                                    00000100b,00000100b,00000000b,00000000b,\
2142
                                    00000100b,00000100b,00000000b,00000000b,\
2130
                                    00000100b,00000100b,00000100b,00000000b,\
2143
                                    00000100b,00000100b,00000100b,00000000b,\
2131
                                    00000100b,00000100b,00000100b,00000000b,\
2144
                                    00000100b,00000100b,00000100b,00000000b,\
2132
                                    00000100b,00000100b,00000100b,00000000b,\
2145
                                    00000100b,00000100b,00000100b,00000000b,\
2133
                                    01111111b,11000100b,11111111b,11100000b,\
2146
                                    01111111b,11000100b,11111111b,11100000b,\
2134
                                    00000100b,00000100b,00000100b,00000000b,\
2147
                                    00000100b,00000100b,00000100b,00000000b,\
2135
                                    00011111b,00111111b,10001110b,00000000b,\
2148
                                    00011111b,00111111b,10001110b,00000000b,\
2136
                                    00000100b,00000100b,00000100b,00000000b,\
2149
                                    00000100b,00000100b,00000100b,00000000b,\
2137
                                    00011111b,00011111b,00011111b,00000000b,\
2150
                                    00011111b,00011111b,00011111b,00000000b,\
2138
                                    11111111b,11111111b,11111111b,11110000b
2151
                                    11111111b,11111111b,11111111b,11110000b
2139
 
2152
 
2140
.snake_dots                 db      8,2, 9,2, 10,2
2153
.snake_dots                 db      8,2, 9,2, 10,2
2141
.snake_direction            dd      RIGHT
2154
.snake_direction            dd      RIGHT
2142
.snake_direction_next       dd      RIGHT
2155
.snake_direction_next       dd      RIGHT
2143
.number_of_stones           dd      109
2156
.number_of_stones           dd      109
2144
.name                       dd      stage_30_name
2157
.name                       dd      stage_30_name
2145
 
2158
 
2146
stage_31:
2159
stage_31:
2147
.field                      db      00000101b,00010000b,00000100b,01000000b,\
2160
.field                      db      00000101b,00010000b,00000100b,01000000b,\
2148
                                    01000100b,01010101b,00010100b,01000000b,\
2161
                                    01000100b,01010101b,00010100b,01000000b,\
2149
                                    01000101b,01010101b,01000101b,00010000b,\
2162
                                    01000101b,01010101b,01000101b,00010000b,\
2150
                                    01010000b,00010100b,01000000b,01010000b,\
2163
                                    01010000b,00010100b,01000000b,01010000b,\
2151
                                    00010101b,01000101b,01010100b,01000000b,\
2164
                                    00010101b,01000101b,01010100b,01000000b,\
2152
                                    01000001b,00010000b,01010101b,01000000b,\
2165
                                    01000001b,00010000b,01010101b,01000000b,\
2153
                                    01010101b,00010100b,00000101b,00010000b,\
2166
                                    01010101b,00010100b,00000101b,00010000b,\
2154
                                    00000101b,01010000b,01000101b,01010000b,\
2167
                                    00000101b,01010000b,01000101b,01010000b,\
2155
                                    01010000b,01000100b,00000000b,01010000b,\
2168
                                    01010000b,01000100b,00000000b,01010000b,\
2156
                                    00010101b,00000101b,00010100b,00010000b,\
2169
                                    00010101b,00000101b,00010100b,00010000b,\
2157
                                    01010001b,00010001b,01000001b,01000000b,\
2170
                                    01010001b,00010001b,01000001b,01000000b,\
2158
                                    01000100b,00000101b,01010100b,01010000b,\
2171
                                    01000100b,00000101b,01010100b,01010000b,\
2159
                                    00010001b,01010100b,00010001b,00010000b,\
2172
                                    00010001b,01010100b,00010001b,00010000b,\
2160
                                    00000100b,01000001b,00010001b,00000000b
2173
                                    00000100b,01000001b,00010001b,00000000b
2161
 
2174
 
2162
.snake_dots                 db      18,8, 17,8, 16,8
2175
.snake_dots                 db      18,8, 17,8, 16,8
2163
.snake_direction            dd      LEFT
2176
.snake_direction            dd      LEFT
2164
.snake_direction_next       dd      LEFT
2177
.snake_direction_next       dd      LEFT
2165
.number_of_stones           dd      112
2178
.number_of_stones           dd      112
2166
.name                       dd      stage_31_name
2179
.name                       dd      stage_31_name
2167
 
2180
 
2168
stage_32:
2181
stage_32:
2169
.field                      db      11111111b,11111111b,11111111b,11110000b,\
2182
.field                      db      11111111b,11111111b,11111111b,11110000b,\
2170
                                    10010010b,01001001b,00100100b,10010000b,\
2183
                                    10010010b,01001001b,00100100b,10010000b,\
2171
                                    10010000b,01000001b,00000100b,00010000b,\
2184
                                    10010000b,01000001b,00000100b,00010000b,\
2172
                                    10010010b,01001001b,00100100b,10010000b,\
2185
                                    10010010b,01001001b,00100100b,10010000b,\
2173
                                    10010010b,01001001b,00100100b,10010000b,\
2186
                                    10010010b,01001001b,00100100b,10010000b,\
2174
                                    10010010b,01001001b,00100100b,10010000b,\
2187
                                    10010010b,01001001b,00100100b,10010000b,\
2175
                                    10010010b,01001001b,00100100b,10010000b,\
2188
                                    10010010b,01001001b,00100100b,10010000b,\
2176
                                    10010010b,01001001b,00100100b,10010000b,\
2189
                                    10010010b,01001001b,00100100b,10010000b,\
2177
                                    10010010b,01001001b,00100100b,10010000b,\
2190
                                    10010010b,01001001b,00100100b,10010000b,\
2178
                                    10010010b,01001001b,00100100b,10010000b,\
2191
                                    10010010b,01001001b,00100100b,10010000b,\
2179
                                    10010010b,01001001b,00100100b,10010000b,\
2192
                                    10010010b,01001001b,00100100b,10010000b,\
2180
                                    10000010b,00001000b,00100000b,10010000b,\
2193
                                    10000010b,00001000b,00100000b,10010000b,\
2181
                                    10010010b,01001001b,00100100b,10010000b,\
2194
                                    10010010b,01001001b,00100100b,10010000b,\
2182
                                    11111111b,11111111b,11111111b,11110000b
2195
                                    11111111b,11111111b,11111111b,11110000b
2183
 
2196
 
2184
.snake_dots                 db      1,1, 1,2, 1,3
2197
.snake_dots                 db      1,1, 1,2, 1,3
2185
.snake_direction            dd      DOWN
2198
.snake_direction            dd      DOWN
2186
.snake_direction_next       dd      DOWN
2199
.snake_direction_next       dd      DOWN
2187
.number_of_stones           dd      168
2200
.number_of_stones           dd      168
2188
.name                       dd      stage_32_name
2201
.name                       dd      stage_32_name
2189
 
2202
 
2190
stage_33:
2203
stage_33:
2191
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2204
.field                      db      00000000b,00000000b,00000000b,00000000b,\
2192
                                    00000000b,00000000b,00000000b,00000000b,\
2205
                                    00000000b,00000000b,00000000b,00000000b,\
2193
                                    01111111b,11001111b,11111111b,11100000b,\
2206
                                    01111111b,11001111b,11111111b,11100000b,\
2194
                                    01000100b,01001000b,01000000b,00100000b,\
2207
                                    01000100b,01001000b,01000000b,00100000b,\
2195
                                    01000100b,01001000b,01000001b,10100000b,\
2208
                                    01000100b,01001000b,01000001b,10100000b,\
2196
                                    01000100b,01001000b,01001101b,10100000b,\
2209
                                    01000100b,01001000b,01001101b,10100000b,\
2197
                                    00000000b,00000000b,00000110b,00000000b,\
2210
                                    00000000b,00000000b,00000110b,00000000b,\
2198
                                    01000100b,01001000b,01000010b,00100000b,\
2211
                                    01000100b,01001000b,01000010b,00100000b,\
2199
                                    01000100b,01001000b,01001111b,00100000b,\
2212
                                    01000100b,01001000b,01001111b,00100000b,\
2200
                                    01000100b,01001000b,01001111b,00100000b,\
2213
                                    01000100b,01001000b,01001111b,00100000b,\
2201
                                    01000100b,01001000b,01000110b,00100000b,\
2214
                                    01000100b,01001000b,01000110b,00100000b,\
2202
                                    01111111b,11001111b,11111111b,11100000b,\
2215
                                    01111111b,11001111b,11111111b,11100000b,\
2203
                                    00000000b,00000000b,00000000b,00000000b,\
2216
                                    00000000b,00000000b,00000000b,00000000b,\
2204
                                    00000000b,00000000b,00000000b,00000000b
2217
                                    00000000b,00000000b,00000000b,00000000b
2205
 
2218
 
2206
.snake_dots                 db      6,6, 7,6, 8,6
2219
.snake_dots                 db      6,6, 7,6, 8,6
2207
.snake_direction            dd      RIGHT
2220
.snake_direction            dd      RIGHT
2208
.snake_direction_next       dd      RIGHT
2221
.snake_direction_next       dd      RIGHT
2209
.number_of_stones           dd      109
2222
.number_of_stones           dd      109
2210
.name                       dd      stage_33_name
2223
.name                       dd      stage_33_name
2211
 
2224
 
2212
stage_34:
2225
stage_34:
2213
.field                      db      01110000b,00000000b,00000011b,10000000b,\
2226
.field                      db      01110000b,00000000b,00000011b,10000000b,\
2214
                                    00010010b,00010000b,01111100b,00000000b,\
2227
                                    00010010b,00010000b,01111100b,00000000b,\
2215
                                    00011110b,00010000b,00100100b,00000000b,\
2228
                                    00011110b,00010000b,00100100b,00000000b,\
2216
                                    00000100b,00011001b,00100111b,00000000b,\
2229
                                    00000100b,00011001b,00100111b,00000000b,\
2217
                                    00001111b,10001001b,00100000b,00110000b,\
2230
                                    00001111b,10001001b,00100000b,00110000b,\
2218
                                    00000001b,00001011b,00101000b,00100000b,\
2231
                                    00000001b,00001011b,00101000b,00100000b,\
2219
                                    00000001b,00011110b,01111000b,00100000b,\
2232
                                    00000001b,00011110b,01111000b,00100000b,\
2220
                                    00111000b,00000010b,00001100b,10100000b,\
2233
                                    00111000b,00000010b,00001100b,10100000b,\
2221
                                    00001110b,00100010b,00000000b,10100000b,\
2234
                                    00001110b,00100010b,00000000b,10100000b,\
2222
                                    01100011b,11111110b,01000011b,11100000b,\
2235
                                    01100011b,11111110b,01000011b,11100000b,\
2223
                                    00111110b,00100010b,01000000b,10000000b,\
2236
                                    00111110b,00100010b,01000000b,10000000b,\
2224
                                    00000000b,01100011b,11000010b,10000000b,\
2237
                                    00000000b,01100011b,11000010b,10000000b,\
2225
                                    00000000b,01000000b,01100111b,10000000b,\
2238
                                    00000000b,01000000b,01100111b,10000000b,\
2226
                                    00000000b,00000000b,00000010b,00000000b
2239
                                    00000000b,00000000b,00000010b,00000000b
2227
 
2240
 
2228
.snake_dots                 db      7,0, 8,0, 9,0
2241
.snake_dots                 db      7,0, 8,0, 9,0
2229
.snake_direction            dd      RIGHT
2242
.snake_direction            dd      RIGHT
2230
.snake_direction_next       dd      RIGHT
2243
.snake_direction_next       dd      RIGHT
2231
.number_of_stones           dd      113
2244
.number_of_stones           dd      113
2232
.name                       dd      stage_34_name
2245
.name                       dd      stage_34_name
2233
 
2246
 
2234
stage_35:
2247
stage_35:
2235
.field                      db      00000100b,00000000b,00001010b,00000000b,\
2248
.field                      db      00000100b,00000000b,00001010b,00000000b,\
2236
                                    00010100b,01000000b,00101010b,00000000b,\
2249
                                    00010100b,01000000b,00101010b,00000000b,\
2237
                                    00010100b,10000010b,00010010b,10000000b,\
2250
                                    00010100b,10000010b,00010010b,10000000b,\
2238
                                    00010001b,00000000b,00010010b,10000000b,\
2251
                                    00010001b,00000000b,00010010b,10000000b,\
2239
                                    00010001b,00000010b,00001010b,10000000b,\
2252
                                    00010001b,00000010b,00001010b,10000000b,\
2240
                                    01010010b,00000010b,00001000b,10100000b,\
2253
                                    01010010b,00000010b,00001000b,10100000b,\
2241
                                    01000100b,00000000b,00001000b,10100000b,\
2254
                                    01000100b,00000000b,00001000b,10100000b,\
2242
                                    01000100b,00000010b,00000100b,10100000b,\
2255
                                    01000100b,00000010b,00000100b,10100000b,\
2243
                                    01001000b,00000010b,00000100b,00100000b,\
2256
                                    01001000b,00000010b,00000100b,00100000b,\
2244
                                    01001000b,00000000b,00000010b,00100000b,\
2257
                                    01001000b,00000000b,00000010b,00100000b,\
2245
                                    00010000b,00000010b,00000010b,00100000b,\
2258
                                    00010000b,00000010b,00000010b,00100000b,\
2246
                                    00110000b,00000010b,00000010b,00100000b,\
2259
                                    00110000b,00000010b,00000010b,00100000b,\
2247
                                    00100000b,00000010b,00000001b,00000000b,\
2260
                                    00100000b,00000010b,00000001b,00000000b,\
2248
                                    00000000b,00000000b,00000000b,00000000b
2261
                                    00000000b,00000000b,00000000b,00000000b
2249
 
2262
 
2250
.snake_dots                 db      13,11, 13,10, 13,9
2263
.snake_dots                 db      13,11, 13,10, 13,9
2251
.snake_direction            dd      UP
2264
.snake_direction            dd      UP
2252
.snake_direction_next       dd      UP
2265
.snake_direction_next       dd      UP
2253
.number_of_stones           dd      66
2266
.number_of_stones           dd      66
2254
.name                       dd      stage_35_name
2267
.name                       dd      stage_35_name
2255
 
2268
 
2256
stage_36:
2269
stage_36:
2257
.field                      db      10101110b,10001110b,00110100b,11100000b,\
2270
.field                      db      10101110b,10001110b,00110100b,11100000b,\
2258
                                    11101000b,10001110b,00101010b,10000000b,\
2271
                                    11101000b,10001110b,00101010b,10000000b,\
2259
                                    10101110b,11101000b,00101010b,11100000b,\
2272
                                    10101110b,11101000b,00101010b,11100000b,\
2260
                                    00000000b,00000000b,00000000b,00000000b,\
2273
                                    00000000b,00000000b,00000000b,00000000b,\
2261
                                    00000000b,00000000b,00000000b,00000000b,\
2274
                                    00000000b,00000000b,00000000b,00000000b,\
2262
                                    00000000b,10110010b,01000100b,00000000b,\
2275
                                    00000000b,10110010b,01000100b,00000000b,\
2263
                                    00000001b,10100101b,01010100b,00000000b,\
2276
                                    00000001b,10100101b,01010100b,00000000b,\
2264
                                    00000001b,10100101b,00101000b,00000000b,\
2277
                                    00000001b,10100101b,00101000b,00000000b,\
2265
                                    00000000b,00000000b,00000000b,00000000b,\
2278
                                    00000000b,00000000b,00000000b,00000000b,\
2266
                                    00010001b,11010101b,11010001b,11000000b,\
2279
                                    00010001b,11010101b,11010001b,11000000b,\
2267
                                    00010001b,11010101b,11010001b,00000000b,\
2280
                                    00010001b,11010101b,11010001b,00000000b,\
2268
                                    00010001b,00010101b,00010000b,10000000b,\
2281
                                    00010001b,00010101b,00010000b,10000000b,\
2269
                                    00011101b,11001001b,11011100b,01000000b,\
2282
                                    00011101b,11001001b,11011100b,01000000b,\
2270
                                    00000000b,00000000b,00000001b,11010000b
2283
                                    00000000b,00000000b,00000001b,11010000b
2271
 
2284
 
2272
.snake_dots                 db      27,11, 27,10, 27,9
2285
.snake_dots                 db      27,11, 27,10, 27,9
2273
.snake_direction            dd      UP
2286
.snake_direction            dd      UP
2274
.snake_direction_next       dd      UP
2287
.snake_direction_next       dd      UP
2275
.number_of_stones           dd      112
2288
.number_of_stones           dd      112
2276
.name                       dd      stage_36_name
2289
.name                       dd      stage_36_name
2277
 
2290
 
2278
 
2291
 
2279
stage_00_name               db      'Classic mode',0
2292
stage_00_name               db      'Classic mode',0
2280
stage_01_name               db      'Begin',0
2293
stage_01_name               db      'Begin',0
2281
stage_02_name               db      'Frame',0
2294
stage_02_name               db      'Frame',0
2282
stage_03_name               db      'Sight',0
2295
stage_03_name               db      'Sight',0
2283
stage_04_name               db      'Dashed',0
2296
stage_04_name               db      'Dashed',0
2284
stage_05_name               db      'Beams',0
2297
stage_05_name               db      'Beams',0
2285
stage_06_name               db      'Pipe',0
2298
stage_06_name               db      'Pipe',0
2286
stage_07_name               db      'Labyrinth',0
2299
stage_07_name               db      'Labyrinth',0
2287
stage_08_name               db      'Sea battle',0
2300
stage_08_name               db      'Sea battle',0
2288
stage_09_name               db      'Recursion',0
2301
stage_09_name               db      'Recursion',0
2289
stage_10_name               db      'Narrow corridors',0
2302
stage_10_name               db      'Narrow corridors',0
2290
stage_11_name               db      'CCC',0
2303
stage_11_name               db      'CCC',0
2291
stage_12_name               db      'Deadlocks',0
2304
stage_12_name               db      'Deadlocks',0
2292
stage_13_name               db      'Boat',0
2305
stage_13_name               db      'Boat',0
2293
stage_14_name               db      'Pattern',0
2306
stage_14_name               db      'Pattern',0
2294
stage_15_name               db      'Guernica',0
2307
stage_15_name               db      'Guernica',0
2295
stage_16_name               db      'Goto',0
2308
stage_16_name               db      'Goto',0
2296
stage_17_name               db      'Smiling face',0
2309
stage_17_name               db      'Smiling face',0
2297
stage_18_name               db      'Waves',0
2310
stage_18_name               db      'Waves',0
2298
stage_19_name               db      'First snow',0
2311
stage_19_name               db      'First snow',0
2299
stage_20_name               db      'Music and silence',0
2312
stage_20_name               db      'Music and silence',0
2300
stage_21_name               db      'Experiment',0
2313
stage_21_name               db      'Experiment',0
2301
stage_22_name               db      'Pacman',0
2314
stage_22_name               db      'Pacman',0
2302
stage_23_name               db      'Intricate pattern',0
2315
stage_23_name               db      'Intricate pattern',0
2303
stage_24_name               db      'Square arcs',0
2316
stage_24_name               db      'Square arcs',0
2304
stage_25_name               db      'In the animal world',0
2317
stage_25_name               db      'In the animal world',0
2305
stage_26_name               db      'Digits',0
2318
stage_26_name               db      'Digits',0
2306
stage_27_name               db      'Pluses',0
2319
stage_27_name               db      'Pluses',0
2307
stage_28_name               db      'Rod',0
2320
stage_28_name               db      'Rod',0
2308
stage_29_name               db      'Tetris',0
2321
stage_29_name               db      'Tetris',0
2309
stage_30_name               db      'Towers of Hanoi',0
2322
stage_30_name               db      'Towers of Hanoi',0
2310
stage_31_name               db      'Ruins',0
2323
stage_31_name               db      'Ruins',0
2311
stage_32_name               db      'Walls of Akendora',0
2324
stage_32_name               db      'Walls of Akendora',0
2312
stage_33_name               db      'Geranium in the window',0
2325
stage_33_name               db      'Geranium in the window',0
2313
stage_34_name               db      'Algae',0
2326
stage_34_name               db      'Algae',0
2314
stage_35_name               db      'The road ahead',0
2327
stage_35_name               db      'The road ahead',0
2315
stage_36_name               db      'Help me draw levels!',0
2328
stage_36_name               db      'Help me draw levels!',0
2316
 
2329
 
2317
 
2330
 
2318
background_color            dd      0x000000
2331
background_color            dd      0x000000
2319
decorations_color           dd      0x00000000
2332
decorations_color           dd      0x00000000
2320
snake_color                 dd      0x000000
2333
snake_color                 dd      0x000000
2321
snake_head_color            dd      0x000000
2334
snake_head_color            dd      0x000000
2322
lives_in_head_number_color  dd      0x000000
2335
lives_in_head_number_color  dd      0x000000
2323
snake_picture_color         dd      0x000000
2336
snake_picture_color         dd      0x000000
2324
version_picture_color       dd      0x000000
2337
version_picture_color       dd      0x000000
2325
pause_picture_color         dd      0x000000
2338
pause_picture_color         dd      0x000000
2326
game_over_picture_color     dd      0x000000
2339
game_over_picture_color     dd      0x000000
2327
you_win_picture_color       dd      0x000000
2340
you_win_picture_color       dd      0x000000
2328
eat_color                   dd      0x000000
2341
eat_color                   dd      0x000000
2329
navigation_strings_color    dd      0x80000000
2342
navigation_strings_color    dd      0x80000000
2330
game_over_strings_color     dd      0x80000000
2343
game_over_strings_color     dd      0x80000000
2331
score_string_color          dd      0x80000000
2344
score_string_color          dd      0x80000000
2332
hiscore_string_color        dd      0x80000000
2345
hiscore_string_color        dd      0x80000000
2333
champion_string_color       dd      0x80000000
2346
champion_string_color       dd      0x80000000
2334
game_over_hiscore_color     dd      0x80000000
2347
game_over_hiscore_color     dd      0x80000000
2335
score_number_color          dd      0x40000000
2348
score_number_color          dd      0x40000000
2336
hiscore_number_color        dd      0x00000000
2349
hiscore_number_color        dd      0x00000000
2337
champion_name_color         dd      0x80000000
2350
champion_name_color         dd      0x80000000
2338
button_color                dd      0x000000
2351
button_color                dd      0x000000
2339
button_text_color           dd      0x80000000
2352
button_text_color           dd      0x80000000
2340
stone_color                 dd      0x000000
2353
stone_color                 dd      0x000000
2341
splash_background_color     dd      0x000000
2354
splash_background_color     dd      0x000000
2342
splash_level_string_color   dd      0x000000
2355
splash_level_string_color   dd      0x000000
2343
splash_level_number_color   dd      0x000000
2356
splash_level_number_color   dd      0x000000
2344
level_string_color          dd      0x80000000
2357
level_string_color          dd      0x80000000
2345
level_number_color          dd      0x00000000
2358
level_number_color          dd      0x00000000
2346
 
2359
 
2347
 
2360
 
2348
align 4
2361
align 4
2349
@IMPORT:
2362
@IMPORT:
2350
 
2363
 
2351
library \
2364
library \
2352
        libini      ,   'libini.obj'        ,\
2365
        libini      ,   'libini.obj'        ,\
2353
        box_lib     ,   'box_lib.obj'
2366
        box_lib     ,   'box_lib.obj'
2354
 
2367
 
2355
import  libini,\
2368
import  libini,\
2356
    ini.get_str     ,   'ini_get_str'       ,\
2369
    ini.get_str     ,   'ini_get_str'       ,\
2357
    ini.get_int     ,   'ini_get_int'       ,\
2370
    ini.get_int     ,   'ini_get_int'       ,\
2358
    ini.set_str     ,   'ini_set_str'       ,\
2371
    ini.set_str     ,   'ini_set_str'       ,\
2359
    ini.set_int     ,   'ini_set_int'       ,\
2372
    ini.set_int     ,   'ini_set_int'       ,\
2360
    ini.get_color   ,   'ini_get_color'     ,\
2373
    ini.get_color   ,   'ini_get_color'     ,\
2361
    ini.get_shortcut,   'ini_get_shortcut'
2374
    ini.get_shortcut,   'ini_get_shortcut'
2362
 
2375
 
2363
import  box_lib,\
2376
import  box_lib,\
2364
    edit_box.draw   ,   'edit_box'          ,\
2377
    edit_box.draw   ,   'edit_box'          ,\
2365
    edit_box.key    ,   'edit_box_key'      ,\
2378
    edit_box.key    ,   'edit_box_key'      ,\
2366
    edit_box.mouse  ,   'edit_box_mouse'
2379
    edit_box.mouse  ,   'edit_box_mouse'
2367
 
2380
 
2368
bFirstDraw  db  0
2381
bFirstDraw  db  0
2369
 
2382
 
2370
aPreferences                db      'Preferences',0
2383
aPreferences                db      'Preferences',0
2371
aSpeed                      db      'Speed',0
2384
aSpeed                      db      'Speed',0
2372
aTheme                      db      'Theme',0
2385
aTheme                      db      'Theme',0
2373
aSmart_reverse              db      'Smart_reverse',0
2386
aSmart_reverse              db      'Smart_reverse',0
2374
aShow_lives_style           db      'Show_lives_style',0
2387
aShow_lives_style           db      'Show_lives_style',0
2375
aDraw_level_name_in_window_title db 'Draw_level_name_in_window_title',0
2388
aDraw_level_name_in_window_title db 'Draw_level_name_in_window_title',0
2376
aSeparating_symbol          db      'Separating_symbol',0
2389
aSeparating_symbol          db      'Separating_symbol',0
2377
 
2390
 
2378
aShortcuts                  db      'Shortcuts',0
2391
aShortcuts                  db      'Shortcuts',0
2379
aMove_left                  db      'Move_left',0
2392
aMove_left                  db      'Move_left',0
2380
aMove_down                  db      'Move_down',0
2393
aMove_down                  db      'Move_down',0
2381
aMove_up                    db      'Move_up',0
2394
aMove_up                    db      'Move_up',0
2382
aMove_right                 db      'Move_right',0
2395
aMove_right                 db      'Move_right',0
2383
aReverse                    db      'Reverse',0
2396
aReverse                    db      'Reverse',0
2384
aIncrease                   db      'Increase',0
2397
aIncrease                   db      'Increase',0
2385
aDecrease                   db      'Decrease',0
2398
aDecrease                   db      'Decrease',0
2386
 
2399
 
2387
aTheme_name                 db      32  dup (0)
2400
aTheme_name                 db      32  dup (0)
2388
aDecorations                db      'Decorations',0
2401
aDecorations                db      'Decorations',0
2389
aBackground_color           db      'Background_color',0
2402
aBackground_color           db      'Background_color',0
2390
aDecorations_color          db      'Decorations_color',0
2403
aDecorations_color          db      'Decorations_color',0
2391
aSnake_color                db      'Snake_color',0
2404
aSnake_color                db      'Snake_color',0
2392
aSnake_head_color           db      'Snake_head_color',0
2405
aSnake_head_color           db      'Snake_head_color',0
2393
aLives_in_head_number_color db      'Lives_in_head_number_color',0
2406
aLives_in_head_number_color db      'Lives_in_head_number_color',0
2394
aSnake_picture_color        db      'Snake_picture_color',0
2407
aSnake_picture_color        db      'Snake_picture_color',0
2395
aVersion_picture_color      db      'Version_picture_color',0
2408
aVersion_picture_color      db      'Version_picture_color',0
2396
aPause_picture_color        db      'Pause_picture_color',0
2409
aPause_picture_color        db      'Pause_picture_color',0
2397
aGame_over_picture_color    db      'Game_over_picture_color',0
2410
aGame_over_picture_color    db      'Game_over_picture_color',0
2398
aYou_win_picture_color      db      'You_win_picture_color',0
2411
aYou_win_picture_color      db      'You_win_picture_color',0
2399
aEat_color                  db      'Eat_color',0
2412
aEat_color                  db      'Eat_color',0
2400
aNavigation_strings_color   db      'Navigation_string_color',0
2413
aNavigation_strings_color   db      'Navigation_string_color',0
2401
aGame_over_strings_color    db      'Game_over_string_color',0
2414
aGame_over_strings_color    db      'Game_over_string_color',0
2402
aScore_string_color         db      'Score_string_color',0
2415
aScore_string_color         db      'Score_string_color',0
2403
aHiscore_string_color       db      'Hiscore_string_color',0
2416
aHiscore_string_color       db      'Hiscore_string_color',0
2404
aChampion_string_color      db      'Champion_string_color',0
2417
aChampion_string_color      db      'Champion_string_color',0
2405
aGame_over_hiscore_color    db      'Game_over_hiscore_color',0
2418
aGame_over_hiscore_color    db      'Game_over_hiscore_color',0
2406
aScore_number_color         db      'Score_number_color',0
2419
aScore_number_color         db      'Score_number_color',0
2407
aHiscore_number_color       db      'Hiscore_number_color',0
2420
aHiscore_number_color       db      'Hiscore_number_color',0
2408
aChampion_name_color        db      'Champion_name_color',0
2421
aChampion_name_color        db      'Champion_name_color',0
2409
aEdit_box_selection_color   db      'Edit_box_selection_color',0
2422
aEdit_box_selection_color   db      'Edit_box_selection_color',0
2410
aButton_color               db      'Button_color',0
2423
aButton_color               db      'Button_color',0
2411
aButton_text_color          db      'Button_text_color',0
2424
aButton_text_color          db      'Button_text_color',0
2412
aStone_color                db      'Stone_color',0
2425
aStone_color                db      'Stone_color',0
2413
aSplash_background_color    db      'Splash_background_color',0
2426
aSplash_background_color    db      'Splash_background_color',0
2414
aSplash_level_string_color  db      'Splash_level_string_color',0
2427
aSplash_level_string_color  db      'Splash_level_string_color',0
2415
aSplash_level_number_color  db      'Splash_level_number_color',0
2428
aSplash_level_number_color  db      'Splash_level_number_color',0
2416
aLevel_string_color         db      'Level_string_color',0
2429
aLevel_string_color         db      'Level_string_color',0
2417
aLevel_number_color         db      'Level_number_color',0
2430
aLevel_number_color         db      'Level_number_color',0
2418
 
2431
 
2419
aReserved                   db      'Reserved',0
2432
aReserved                   db      'Reserved',0
2420
aSquare_side_length         db      'Square_side_length',0
2433
aSquare_side_length         db      'Square_side_length',0
2421
aHiscore_classic            db      'Hiscore_classic',0
2434
aHiscore_classic            db      'Hiscore_classic',0
2422
aChampion_name_classic      db      'Champion_name_classic',0
2435
aChampion_name_classic      db      'Champion_name_classic',0
2423
aHiscore_levels             db      'Hiscore_levels',0
2436
aHiscore_levels             db      'Hiscore_levels',0
2424
aChampion_name_levels       db      'Champion_name_levels',0
2437
aChampion_name_levels       db      'Champion_name_levels',0
2425
 
2438
 
2426
edit1 edit_box 65,397,0x0,0x000000,0x000000,0x000000,0x000000,0x80000000,15,hed,mouse_dd,ed_focus,hed_end-hed-1,hed_end-hed-1
2439
edit1 edit_box 65,397,0x0,0x000000,0x000000,0x000000,0x000000,0x80000000,15,hed,mouse_dd,ed_focus,hed_end-hed-1,hed_end-hed-1
2427
 
2440
 
2428
hed                         db      '',0
2441
hed                         db      '',0
2429
;;---Variables-------------------------------------------------------------------------------------------------------------
2442
;;---Variables-------------------------------------------------------------------------------------------------------------
2430
i_end:
2443
i_end:
2431
hed_end:
2444
hed_end:
2432
rb  256
2445
rb  256
2433
mouse_dd                    rd      1
2446
mouse_dd                    rd      1
2434
 
2447
 
2435
window_style                rd      1
2448
window_style                rd      1
2436
 
2449
 
2437
cur_level                   rd      1
2450
cur_level                   rd      1
2438
cur_level_number            rd      1
2451
cur_level_number            rd      1
2439
hi_level                    rd      1
2452
hi_level                    rd      1
2440
 
2453
 
2441
score                       rd      1
2454
score                       rd      1
2442
hi_score_classic            rd      1
2455
hi_score_classic            rd      1
2443
hi_score_levels             rd      1
2456
hi_score_levels             rd      1
2444
 
2457
 
2445
champion_name_classic       rb      CHAMPION_NAME_LENGTH
2458
champion_name_classic       rb      CHAMPION_NAME_LENGTH
2446
champion_name_levels        rb      CHAMPION_NAME_LENGTH
2459
champion_name_levels        rb      CHAMPION_NAME_LENGTH
2447
 
2460
 
2448
snake_dots                  rb      GRID_WIDTH*GRID_HEIGHT*2+3          ; +3 bytes for faster dword copying
2461
snake_dots                  rb      GRID_WIDTH*GRID_HEIGHT*2+3          ; +3 bytes for faster dword copying
2449
snake_direction             rd      1
2462
snake_direction             rd      1
2450
snake_direction_next        rd      1
2463
snake_direction_next        rd      1
2451
snake_length_x2             rd      1
2464
snake_length_x2             rd      1
2452
 
2465
 
2453
decorations                 rd      1
2466
decorations                 rd      1
2454
number_of_free_dots         rd      1
2467
number_of_free_dots         rd      1
2455
 
2468
 
2456
eat                         rw      1
2469
eat                         rw      1
2457
 
2470
 
2458
g_s                         rd      1
2471
g_s                         rd      1
2459
g_e                         rd      1
2472
g_e                         rd      1
2460
 
2473
 
2461
window_width                rd      1
2474
window_width                rd      1
2462
window_height               rd      1
2475
window_height               rd      1
2463
wp_x                        rd      1
2476
wp_x                        rd      1
2464
wp_y                        rd      1
2477
wp_y                        rd      1
2465
 
2478
 
2466
gw_mul_gs                   rd      1
2479
gw_mul_gs                   rd      1
2467
gh_mul_gs                   rd      1
2480
gh_mul_gs                   rd      1
2468
gbxm1_plus_gw_mul_gs        rd      1
2481
gbxm1_plus_gw_mul_gs        rd      1
2469
gbym1_plus_gh_mul_gs        rd      1
2482
gbym1_plus_gh_mul_gs        rd      1
2470
gs_shl16_gs                 rd      1
2483
gs_shl16_gs                 rd      1
2471
gbxm1_shl16_gbxm1           rd      1
2484
gbxm1_shl16_gbxm1           rd      1
2472
gbym1_shl16_gbym1           rd      1
2485
gbym1_shl16_gbym1           rd      1
2473
 
2486
 
2474
bottom_top_strings          rd      1
2487
bottom_top_strings          rd      1
2475
bottom_middle_strings       rd      1
2488
bottom_middle_strings       rd      1
2476
bottom_bottom_strings       rd      1
2489
bottom_bottom_strings       rd      1
2477
top_strings                 rd      1
2490
top_strings                 rd      1
2478
 
2491
 
2479
button_x_left               rd      1
2492
button_x_left               rd      1
2480
button_x_right              rd      1
2493
button_x_right              rd      1
2481
button_y_top                rd      1
2494
button_y_top                rd      1
2482
button_y_middle             rd      1
2495
button_y_middle             rd      1
2483
button_y_bottom             rd      1
2496
button_y_bottom             rd      1
2484
button_width_short          rd      1
2497
button_width_short          rd      1
2485
button_width_long           rd      1
2498
button_width_long           rd      1
2486
button_height               rd      1
2499
button_height               rd      1
2487
 
2500
 
2488
cursor_data                 rb      32*32*4
2501
cursor_data                 rb      32*32*4
2489
cursor_handle               rd      1
2502
cursor_handle               rd      1
2490
 
2503
 
2491
cur_dir_path                rb      4096
2504
cur_dir_path                rb      4096
2492
@PARAMS                     rb      4096
2505
@PARAMS                     rb      4096
2493
 
2506
 
2494
field_map                   rb      GRID_WIDTH*GRID_HEIGHT*2
2507
field_map                   rb      GRID_WIDTH*GRID_HEIGHT*2
2495
 
2508
 
2496
proc_info                   process_information
2509
proc_info                   process_information
2497
 
2510
 
2498
smart_reverse               rd      1
2511
smart_reverse               rd      1
2499
show_lives_style            rd      1
2512
show_lives_style            rd      1
2500
draw_level_name_in_window_title rd  1
2513
draw_level_name_in_window_title rd  1
2501
separating_symbol           rd      1
2514
separating_symbol           rd      1
2502
 
2515
 
2503
shortcut_move_left          rb      1
2516
shortcut_move_left          rb      1
2504
shortcut_move_down          rb      1
2517
shortcut_move_down          rb      1
2505
shortcut_move_up            rb      1
2518
shortcut_move_up            rb      1
2506
shortcut_move_right         rb      1
2519
shortcut_move_right         rb      1
2507
shortcut_reverse            rb      1
2520
shortcut_reverse            rb      1
2508
shortcut_increase           rb      1
2521
shortcut_increase           rb      1
2509
shortcut_decrease           rb      1
2522
shortcut_decrease           rb      1
2510
 
2523
 
2511
square_side_length          rd      1
2524
square_side_length          rd      1
2512
 
2525
 
2513
gbxm1                       rd      1
2526
gbxm1                       rd      1
2514
gbym1                       rd      1
2527
gbym1                       rd      1
2515
speed_up_counter            rw      1
2528
speed_up_counter            rw      1
2516
 
2529
 
2517
rb 4096
2530
rb 4096
2518
stacktop:
2531
stacktop:
2519
d_end:
2532
d_end: