Rev 5274 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5274 | Rev 5292 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | dd 0x01 |
32 | dd 0x01 |
33 | dd START |
33 | dd START |
34 | dd IM_END |
34 | dd IM_END |
35 | dd I_END |
35 | dd I_END |
36 | dd stacktop |
36 | dd stacktop |
37 | dd 0x0 |
37 | dd bootparam |
38 | dd path |
38 | dd path |
39 | ;----------------------------------------------------------------------------- |
39 | ;----------------------------------------------------------------------------- |
40 | include 'lang.inc' |
40 | include 'lang.inc' |
41 | include '../../macros.inc' |
41 | include '../../macros.inc' |
42 | include '../../proc32.inc' |
42 | include '../../proc32.inc' |
Line 63... | Line 63... | ||
63 | ;----------------------------------------------------------------------------- |
63 | ;----------------------------------------------------------------------------- |
64 | OBJECT_DEATH = 1 |
64 | OBJECT_DEATH = 1 |
65 | OBJECT_SKELETON = 2 |
65 | OBJECT_SKELETON = 2 |
66 | OBJECT_IFRIT = 3 |
66 | OBJECT_IFRIT = 3 |
67 | OBJECT_BARRET = 4 |
67 | OBJECT_BARRET = 4 |
68 | OBJECT_FINAL_MONSTER = 14 |
68 | OBJECT_FINAL_MONSTER = 14 ; 0Eh |
69 | OBJECT_PROTAGONIST = 15 |
69 | OBJECT_PROTAGONIST = 15 ; 0Fh |
70 | OBJECT_RED_BRICK = 16 |
70 | OBJECT_RED_BRICK = 16 ; 10h |
71 | OBJECT_WHITE_BRICK = 17 |
71 | OBJECT_WHITE_BRICK = 17 ; 11h |
72 | RED_BRICK_CRASH_1 = 0x80 |
72 | RED_BRICK_CRASH_1 = 0x80 |
73 | RED_BRICK_CRASH_2 = 0x81 |
73 | RED_BRICK_CRASH_2 = 0x81 |
74 | ;----------------------------------------------------------------------------- |
74 | ;----------------------------------------------------------------------------- |
75 | BASE_SMALL_ROCK = 0 |
75 | BASE_SMALL_ROCK = 0 |
76 | BASE_GRASS = 1 |
76 | BASE_GRASS = 1 |
Line 91... | Line 91... | ||
91 | ; unpack deflate |
91 | ; unpack deflate |
92 | mov eax,[unpack_DeflateUnpack2] |
92 | mov eax,[unpack_DeflateUnpack2] |
93 | mov [deflate_unpack],eax |
93 | mov [deflate_unpack],eax |
94 | ;-------------------------------------- |
94 | ;-------------------------------------- |
95 | call load_and_convert_all_icons |
95 | call load_and_convert_all_icons |
- | 96 | ||
- | 97 | cmp [bootparam],dword 'NOSO' |
|
- | 98 | je menu_still |
|
- | 99 | ||
96 | call load_all_sound_files |
100 | call load_all_sound_files |
Line 97... | Line 101... | ||
97 | 101 | ||
98 | mov eax,[background_music] |
102 | mov eax,[background_music] |
99 | mov [wav_for_test],eax |
103 | mov [wav_for_test],eax |
Line 109... | Line 113... | ||
109 | mcall 51,1,snd_kick_action_thread_start,snd_kick_action_thread_stack |
113 | mcall 51,1,snd_kick_action_thread_start,snd_kick_action_thread_stack |
110 | ;--------------------------------------------------------------------- |
114 | ;--------------------------------------------------------------------- |
111 | menu_still: |
115 | menu_still: |
112 | jmp main_menu_start |
116 | jmp main_menu_start |
113 | ;--------------------------------------------------------------------- |
117 | ;--------------------------------------------------------------------- |
- | 118 | show_game_stage: |
|
- | 119 | mov esi,map_level_game_stage |
|
- | 120 | call map_level_to_plan_level |
|
- | 121 | call draw_window |
|
- | 122 | mov eax,[level_counter] |
|
- | 123 | inc eax |
|
- | 124 | mov ebx,stage_text.1 |
|
- | 125 | call decimal_string_2 |
|
- | 126 | mov edx,stage_text |
|
- | 127 | mov ebx,SPRITE_SIZE_X*3 shl 16 + SPRITE_SIZE_Y*5 |
|
- | 128 | call draw_font |
|
- | 129 | mcall 5,300 |
|
- | 130 | ret |
|
- | 131 | ;--------------------------------------------------------------------- |
|
- | 132 | show_game_win: |
|
- | 133 | mov esi,map_level_game_stage |
|
- | 134 | call map_level_to_plan_level |
|
- | 135 | call draw_window |
|
- | 136 | mov edx,game_win_text |
|
- | 137 | mov ebx,SPRITE_SIZE_X*2 shl 16 + SPRITE_SIZE_Y*5 |
|
- | 138 | call draw_font |
|
- | 139 | mcall 5,1000 |
|
- | 140 | ret |
|
- | 141 | ;--------------------------------------------------------------------- |
|
- | 142 | death_of_protagonist_show: |
|
- | 143 | mov esi,map_level_game_over |
|
- | 144 | call map_level_to_plan_level |
|
- | 145 | call draw_window |
|
- | 146 | mov edx,protagonist_death_text |
|
- | 147 | mov ebx,SPRITE_SIZE_X*2 shl 16 + SPRITE_SIZE_Y*5 |
|
- | 148 | call draw_font |
|
- | 149 | mcall 5,500 |
|
- | 150 | jmp main_menu_start |
|
- | 151 | ;--------------------------------------------------------------------- |
|
114 | start_level_0: |
152 | start_level_0: |
- | 153 | xor eax,eax |
|
- | 154 | mov [level_counter],eax |
|
- | 155 | ;--------------------------------------------------------------------- |
|
- | 156 | start_level: |
|
- | 157 | mov esi,[level_counter] |
|
- | 158 | shl esi,2 |
|
- | 159 | mov esi,[esi+map_level_pointer] |
|
- | 160 | test esi,esi |
|
- | 161 | jnz @f |
|
- | 162 | ||
- | 163 | call show_game_win |
|
- | 164 | jmp main_menu_start |
|
- | 165 | ;-------------------------------------- |
|
- | 166 | @@: |
|
- | 167 | call show_game_stage |
|
115 | mov eax,[stone_kick_sound] |
168 | mov eax,[stone_kick_sound] |
116 | mov [sounds_sample],eax |
169 | mov [sounds_sample],eax |
- | 170 | ; xor eax,eax |
|
- | 171 | ; mov [level_counter],eax |
|
117 | mov [death_of_protagonist],0 |
172 | mov [death_of_protagonist],0 |
118 | mov [protagonist_route],2 |
173 | mov [protagonist_route],2 |
119 | mov [protagonist_position.x],4 |
174 | mov [protagonist_position.x],4 |
120 | mov [protagonist_position.y],4 |
175 | mov [protagonist_position.y],4 |
Line -... | Line 176... | ||
- | 176 | ||
- | 177 | mov esi,[level_counter] |
|
- | 178 | shl esi,2 |
|
121 | 179 | mov esi,[esi+map_level_pointer] |
|
122 | mov esi,map_level_0 |
180 | ; mov esi,map_level_0 |
123 | call map_level_to_plan_level |
181 | call map_level_to_plan_level |
124 | call generate_objects_id |
182 | call generate_objects_id |
125 | call copy_plan_level_to_plan_level_old |
183 | call copy_plan_level_to_plan_level_old |
126 | ;--------------------------------------------------------------------- |
184 | ;--------------------------------------------------------------------- |
Line 143... | Line 201... | ||
143 | call actions_for_all_cell |
201 | call actions_for_all_cell |
144 | call show_tiles |
202 | call show_tiles |
145 | call harvest_of_death |
203 | call harvest_of_death |
146 | call show_tiles_one_iteration |
204 | call show_tiles_one_iteration |
147 | cmp [death_of_protagonist],1 |
205 | cmp [death_of_protagonist],1 |
148 | je death_of_protagonist_start |
206 | je death_of_protagonist_show |
- | 207 | ||
- | 208 | cmp [npc_alive],0 |
|
- | 209 | jne @f |
|
Line -... | Line 210... | ||
- | 210 | ||
- | 211 | inc byte [level_counter] |
|
- | 212 | jmp start_level |
|
- | 213 | ;-------------------------------------- |
|
149 | 214 | @@: |
|
150 | mov eax,[protagonist_position.y] |
215 | mov eax,[protagonist_position.y] |
151 | imul eax,LEVEL_MAP_SIZE_X*4 |
216 | imul eax,LEVEL_MAP_SIZE_X*4 |
152 | mov ebx,[protagonist_position.x] |
217 | mov ebx,[protagonist_position.x] |
153 | shl ebx,2 |
218 | shl ebx,2 |
154 | add eax,ebx |
219 | add eax,ebx |
155 | add eax,plan_level |
220 | add eax,plan_level |
156 | mov eax,[eax] |
221 | mov eax,[eax] |
157 | cmp ah,OBJECT_PROTAGONIST |
222 | cmp ah,OBJECT_PROTAGONIST |
Line 158... | Line 223... | ||
158 | jne death_of_protagonist_start |
223 | jne death_of_protagonist_show |
159 | 224 | ||
160 | jmp still |
225 | jmp still |
161 | ;--------------------------------------------------------------------- |
226 | ;--------------------------------------------------------------------- |
Line 191... | Line 256... | ||
191 | mov [draw_all_level],0 |
256 | mov [draw_all_level],0 |
192 | ; mcall 4,<3,8>,0,message,message.size |
257 | ; mcall 4,<3,8>,0,message,message.size |
193 | mcall 12,2 |
258 | mcall 12,2 |
194 | ret |
259 | ret |
195 | ;--------------------------------------------------------------------- |
260 | ;--------------------------------------------------------------------- |
- | 261 | ; 10- |
|
- | 262 | ; 室: |
|
- | 263 | ; AX - ç¨á«® |
|
- | 264 | ; EBX - ¤à¥á áâப¨ |
|
- | 265 | ; ë室: |
|
- | 266 | ; áâப ᮤ¥à¦¨â ç¨á«®, ª®¥æ ®â¬¥ç¥ ª®¤®¬ 0 |
|
- | 267 | ;------------------------------------------------------------------------------ |
|
- | 268 | decimal_string_2: |
|
- | 269 | push eax ebx ecx edx |
|
- | 270 | xor ecx,ecx |
|
- | 271 | mov [ebx],byte '0' |
|
- | 272 | inc ebx |
|
- | 273 | ;-------------------------------------- |
|
- | 274 | .p3: |
|
- | 275 | xor edx,edx |
|
- | 276 | push ebx |
|
- | 277 | mov ebx,10 |
|
- | 278 | div ebx |
|
- | 279 | pop ebx |
|
- | 280 | add edx,48 |
|
- | 281 | push edx |
|
- | 282 | inc ecx |
|
- | 283 | cmp ax,0 |
|
- | 284 | jne .p3 |
|
- | 285 | ||
- | 286 | cmp ecx,1 |
|
- | 287 | jbe .p4 |
|
- | 288 | ||
- | 289 | mov ecx,2 |
|
- | 290 | dec ebx |
|
- | 291 | ;-------------------------------------- |
|
- | 292 | .p4: |
|
- | 293 | pop edx |
|
- | 294 | mov [ebx],dl |
|
- | 295 | inc ebx |
|
- | 296 | loop .p4 |
|
- | 297 | pop edx ecx ebx eax |
|
- | 298 | ret |
|
- | 299 | ;------------------------------------------------------------------------------ |
|
- | 300 | ;--------------------------------------------------------------------- |
|
196 | memory_free_error: |
301 | memory_free_error: |
197 | mov [N_error],3 |
302 | mov [N_error],3 |
198 | jmp button.exit |
303 | jmp button.exit |
199 | ;--------------------------------------------------------------------- |
304 | ;--------------------------------------------------------------------- |
200 | memory_get_error: |
305 | memory_get_error: |
Line 203... | Line 308... | ||
203 | ;----------------------------------------------------------------------------- |
308 | ;----------------------------------------------------------------------------- |
204 | include 'key.inc' |
309 | include 'key.inc' |
205 | include 'show_tiles.inc' |
310 | include 'show_tiles.inc' |
206 | include 'show_base.inc' |
311 | include 'show_base.inc' |
207 | include 'show_object.inc' |
312 | include 'show_object.inc' |
208 | include 'death_protagonist.inc' |
- | |
209 | include 'load.inc' |
313 | include 'load.inc' |
210 | include 'icon_convert.inc' |
314 | include 'icon_convert.inc' |
211 | include 'error_window.inc' |
315 | include 'error_window.inc' |
212 | include 'actions.inc' |
316 | include 'actions.inc' |
213 | include 'actions_npc.inc' |
317 | include 'actions_npc.inc' |