/programs/games/rstearth/death_protagonist.inc |
---|
File deleted |
\ No newline at end of file |
/programs/games/rstearth/actions.inc |
---|
101,7 → 101,9 |
ret |
;--------------------------------------------------------------------- |
harvest_of_death: |
mov [death_of_protagonist],0 |
xor eax,eax |
mov [death_of_protagonist],al |
mov [npc_alive],al |
mov esi,plan_level |
mov ecx,LEVEL_MAP_SIZE_X*LEVEL_MAP_SIZE_Y |
cld |
117,6 → 119,11 |
cmp al,BASE_WATER |
je .base_water |
cmp ah,OBJECT_FINAL_MONSTER |
ja .counter |
mov [npc_alive],1 |
;-------------------------------------- |
.counter: |
dec ecx |
/programs/games/rstearth/font.inc |
---|
1,5 → 1,9 |
;--------------------------------------------------------------------- |
draw_font: |
; in: |
; ebx - X*65536 + Y |
; edx - text ASCII |
; |
pusha |
xor ebp,ebp |
mov esi,edx |
/programs/games/rstearth/i_data.inc |
---|
256,11 → 256,13 |
stone_kick_sound_file_name db 'flaunch.wav',0 |
menu_sound_file_name db 'misc_menu.wav',0 |
;--------------------------------------------------------------------- |
align 4 |
protagonist_route dd 2 |
protagonist_position: |
.x dd 4 |
.y dd 4 |
;--------------------------------------------------------------------- |
align 4 |
main_menu_text_pointers: |
dd menu_game_label |
dd menu_settings_label |
269,6 → 271,7 |
dd menu_exit_label |
dd 0 |
;--------------------------------------------------------------------- |
align 4 |
menu_credits_text_pointers: |
dd menu_credits_text.1 |
dd menu_credits_text.2 |
278,6 → 281,7 |
dd menu_credits_text.6 |
dd 0 |
;--------------------------------------------------------------------- |
align 4 |
menu_help_text_pointers: |
dd menu_help_text.1 |
dd menu_help_text.2 |
285,6 → 289,7 |
dd menu_help_text.4 |
dd 0 |
;--------------------------------------------------------------------- |
align 4 |
settings_menu_text_pointers: |
dd menu_settings_sound_label |
dd menu_settings_music_label |
291,3 → 296,9 |
dd menu_setting_exit |
dd 0 |
;--------------------------------------------------------------------- |
align 4 |
map_level_pointer: |
dd map_level_0 |
dd map_level_1 |
dd 0 |
;--------------------------------------------------------------------- |
/programs/games/rstearth/levels.inc |
---|
7,7 → 7,33 |
;--------------------------------------------------------------------- |
align 4 |
map_level_0: |
map_level_game_over: |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
dd 000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h,000002h |
;--------------------------------------------------------------------- |
align 4 |
map_level_game_stage: |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
;--------------------------------------------------------------------- |
align 4 |
map_level_1: |
dd 030100h,000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h |
dd 000000h,001001h,001001h,000001h,000001h,000001h,001001h,001001h,001001h,000000h |
dd 010200h,001001h,000002h,000002h,000000h,000000h,000000h,000000h,001001h,000000h |
20,15 → 46,15 |
dd 030300h,000000h,000000h,000000h,000000h,020400h,000000h,000000h,000003h,000003h |
;--------------------------------------------------------------------- |
align 4 |
map_level_game_over: |
dd 000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h |
dd 000000h,000002h,000002h,000000h,000000h,000002h,000000h,000002h,000002h,000000h |
dd 000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h |
dd 000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h |
dd 000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h |
dd 000000h,000002h,000002h,000000h,000000h,000002h,000000h,000002h,000002h,000000h |
dd 000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h,000000h,000000h |
dd 000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h,000000h,000000h |
dd 000000h,000002h,000000h,000002h,000000h,000002h,000000h,000002h,000000h,000000h |
dd 000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h,000000h |
;--------------------------------------------------------------------- |
map_level_0: |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
dd 000001h,001001h,001001h,000001h,000001h,000001h,000001h,001101h,001101h,000001h |
dd 000001h,001001h,000001h,000001h,000001h,000001h,000001h,000001h,001101h,000001h |
dd 000001h,001101h,030101h,001101h,001101h,001001h,001001h,000001h,001001h,000001h |
dd 000001h,001101h,000001h,001101h,000f01h,000001h,001001h,000001h,001001h,010301h |
dd 000001h,001001h,000001h,001001h,000001h,000001h,001101h,000001h,001101h,000001h |
dd 000001h,001001h,000001h,001001h,001001h,001101h,001101h,000001h,001101h,000001h |
dd 000001h,001101h,000001h,000001h,000001h,000001h,000001h,000001h,001001h,000001h |
dd 000001h,001101h,001101h,000001h,000001h,000001h,000001h,001001h,001001h,000001h |
dd 000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h,000001h |
;--------------------------------------------------------------------- |
/programs/games/rstearth/localization_eng.inc |
---|
1,6 → 1,6 |
;--------------------------------------------------------------------- |
title: |
db 'Rusty Earth (Prototype 1.8) 28.12.2014',0 |
db 'Rusty Earth (Prototype 1.9) 30.12.2014',0 |
;--------------------------------------------------------------------- |
menu_game_label: |
db 'GAME',0 |
32,6 → 32,16 |
menu_setting_exit: |
db 'EXIT',0 |
;--------------------------------------------------------------------- |
stage_text: |
db 'LEVEL ' |
.1: db '00',0 |
;-------------------------------------- |
game_win_text: |
db 'YES! YOU WIN!',0 |
;-------------------------------------- |
protagonist_death_text: |
db 'REST IN PEACE',0 |
;--------------------------------------------------------------------- |
menu_credits_text: |
.1: db 'Hello KolibriOS Team!',0 |
.2: db 'The game used graphics and sound material',0 |
/programs/games/rstearth/localization_rus.inc |
---|
2,7 → 2,7 |
; Code page - Cyrillic OEM866 |
;--------------------------------------------------------------------- |
title: |
db '¦ ¢ ï ¥¬«ï (à®â®â¨¯ 1.8) 28.12.2014',0 |
db '¦ ¢ ï ¥¬«ï (à®â®â¨¯ 1.9) 30.12.2014',0 |
;--------------------------------------------------------------------- |
menu_game_label: |
db '',0 |
34,6 → 34,16 |
menu_setting_exit: |
db '',0 |
;--------------------------------------------------------------------- |
stage_text: |
db ' ' |
.1: db '00',0 |
;-------------------------------------- |
game_win_text: |
db '! !',0 |
;-------------------------------------- |
protagonist_death_text: |
db ' ',0 |
;--------------------------------------------------------------------- |
menu_credits_text: |
.1: db 'ਢ¥â ãç á⨪ ¬ ª®¬ ¤ë KolibriOS Team!',0 |
.2: db 'à ä¨ç¥áª¨¥ ¨ §¢ãª®¢ë¥ ¬ â¥à¨ «ë ¯®¤',0 |
/programs/games/rstearth/rstearth.asm |
---|
34,7 → 34,7 |
dd IM_END |
dd I_END |
dd stacktop |
dd 0x0 |
dd bootparam |
dd path |
;----------------------------------------------------------------------------- |
include 'lang.inc' |
65,10 → 65,10 |
OBJECT_SKELETON = 2 |
OBJECT_IFRIT = 3 |
OBJECT_BARRET = 4 |
OBJECT_FINAL_MONSTER = 14 |
OBJECT_PROTAGONIST = 15 |
OBJECT_RED_BRICK = 16 |
OBJECT_WHITE_BRICK = 17 |
OBJECT_FINAL_MONSTER = 14 ; 0Eh |
OBJECT_PROTAGONIST = 15 ; 0Fh |
OBJECT_RED_BRICK = 16 ; 10h |
OBJECT_WHITE_BRICK = 17 ; 11h |
RED_BRICK_CRASH_1 = 0x80 |
RED_BRICK_CRASH_2 = 0x81 |
;----------------------------------------------------------------------------- |
93,6 → 93,10 |
mov [deflate_unpack],eax |
;-------------------------------------- |
call load_and_convert_all_icons |
cmp [bootparam],dword 'NOSO' |
je menu_still |
call load_all_sound_files |
mov eax,[background_music] |
111,15 → 115,69 |
menu_still: |
jmp main_menu_start |
;--------------------------------------------------------------------- |
show_game_stage: |
mov esi,map_level_game_stage |
call map_level_to_plan_level |
call draw_window |
mov eax,[level_counter] |
inc eax |
mov ebx,stage_text.1 |
call decimal_string_2 |
mov edx,stage_text |
mov ebx,SPRITE_SIZE_X*3 shl 16 + SPRITE_SIZE_Y*5 |
call draw_font |
mcall 5,300 |
ret |
;--------------------------------------------------------------------- |
show_game_win: |
mov esi,map_level_game_stage |
call map_level_to_plan_level |
call draw_window |
mov edx,game_win_text |
mov ebx,SPRITE_SIZE_X*2 shl 16 + SPRITE_SIZE_Y*5 |
call draw_font |
mcall 5,1000 |
ret |
;--------------------------------------------------------------------- |
death_of_protagonist_show: |
mov esi,map_level_game_over |
call map_level_to_plan_level |
call draw_window |
mov edx,protagonist_death_text |
mov ebx,SPRITE_SIZE_X*2 shl 16 + SPRITE_SIZE_Y*5 |
call draw_font |
mcall 5,500 |
jmp main_menu_start |
;--------------------------------------------------------------------- |
start_level_0: |
xor eax,eax |
mov [level_counter],eax |
;--------------------------------------------------------------------- |
start_level: |
mov esi,[level_counter] |
shl esi,2 |
mov esi,[esi+map_level_pointer] |
test esi,esi |
jnz @f |
call show_game_win |
jmp main_menu_start |
;-------------------------------------- |
@@: |
call show_game_stage |
mov eax,[stone_kick_sound] |
mov [sounds_sample],eax |
; xor eax,eax |
; mov [level_counter],eax |
mov [death_of_protagonist],0 |
mov [protagonist_route],2 |
mov [protagonist_position.x],4 |
mov [protagonist_position.y],4 |
mov esi,map_level_0 |
mov esi,[level_counter] |
shl esi,2 |
mov esi,[esi+map_level_pointer] |
; mov esi,map_level_0 |
call map_level_to_plan_level |
call generate_objects_id |
call copy_plan_level_to_plan_level_old |
145,8 → 203,15 |
call harvest_of_death |
call show_tiles_one_iteration |
cmp [death_of_protagonist],1 |
je death_of_protagonist_start |
je death_of_protagonist_show |
cmp [npc_alive],0 |
jne @f |
inc byte [level_counter] |
jmp start_level |
;-------------------------------------- |
@@: |
mov eax,[protagonist_position.y] |
imul eax,LEVEL_MAP_SIZE_X*4 |
mov ebx,[protagonist_position.x] |
155,7 → 220,7 |
add eax,plan_level |
mov eax,[eax] |
cmp ah,OBJECT_PROTAGONIST |
jne death_of_protagonist_start |
jne death_of_protagonist_show |
jmp still |
;--------------------------------------------------------------------- |
193,6 → 258,46 |
mcall 12,2 |
ret |
;--------------------------------------------------------------------- |
; 10- |
; 室: |
; AX - ç¨á«® |
; EBX - ¤à¥á áâப¨ |
; ë室: |
; áâப ᮤ¥à¦¨â ç¨á«®, ª®¥æ ®â¬¥ç¥ ª®¤®¬ 0 |
;------------------------------------------------------------------------------ |
decimal_string_2: |
push eax ebx ecx edx |
xor ecx,ecx |
mov [ebx],byte '0' |
inc ebx |
;-------------------------------------- |
.p3: |
xor edx,edx |
push ebx |
mov ebx,10 |
div ebx |
pop ebx |
add edx,48 |
push edx |
inc ecx |
cmp ax,0 |
jne .p3 |
cmp ecx,1 |
jbe .p4 |
mov ecx,2 |
dec ebx |
;-------------------------------------- |
.p4: |
pop edx |
mov [ebx],dl |
inc ebx |
loop .p4 |
pop edx ecx ebx eax |
ret |
;------------------------------------------------------------------------------ |
;--------------------------------------------------------------------- |
memory_free_error: |
mov [N_error],3 |
jmp button.exit |
205,7 → 310,6 |
include 'show_tiles.inc' |
include 'show_base.inc' |
include 'show_object.inc' |
include 'death_protagonist.inc' |
include 'load.inc' |
include 'icon_convert.inc' |
include 'error_window.inc' |
/programs/games/rstearth/u_data.inc |
---|
5,6 → 5,7 |
draw_all_level rb 1 |
current_cell_NPC rb 1 |
death_of_protagonist rb 1 |
npc_alive rb 1 |
target_detected rb 1 |
sound_flag rb 1 |
sounds_flag rb 1 |
52,6 → 53,8 |
menu_text_pointers rd 1 |
text_step_Y rd 1 |
;------------------------------------------------------------------------------ |
level_counter rd 1 |
;------------------------------------------------------------------------------ |
align 4 |
version rd 1 ; версия интерфейса, текущая 0x0101 |
; snd_format одна из констант вида PCM_X_Y_Z где |
115,10 → 118,11 |
file_info: |
rb 40 |
;--------------------------------------------------------------------- |
;align 4 |
align 4 |
bootparam: |
;procinfo: |
;process_info: |
; rb 1024 |
rb 1024 |
;--------------------------------------------------------------------- |
align 4 |
; sound thread |