forked from KolibriOS/kolibrios
Rusty Earth - main menu.
git-svn-id: svn://kolibrios.org@5257 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
40df1da8cf
commit
e0ca5a7b52
@ -28,14 +28,18 @@ death_of_protagonist_start:
|
|||||||
jnz .still
|
jnz .still
|
||||||
|
|
||||||
cmp ah,0xE0
|
cmp ah,0xE0
|
||||||
jne start_level_0
|
jne .menu_still ; start_level_0
|
||||||
|
|
||||||
mov [extended_key],1
|
mov [extended_key],1
|
||||||
jmp .still
|
jmp .still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.extended_key:
|
.extended_key:
|
||||||
mov [extended_key],0
|
mov [extended_key],0
|
||||||
jmp start_level_0
|
jmp .menu_still ; start_level_0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.menu_still:
|
||||||
|
mcall 5,200
|
||||||
|
jmp menu_still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.button:
|
.button:
|
||||||
mcall 17
|
mcall 17
|
||||||
|
@ -243,11 +243,6 @@ error_fs_text_9: db '9 - FAT table is destroyed',0
|
|||||||
error_fs_text_10: db '10 - Access denied',0
|
error_fs_text_10: db '10 - Access denied',0
|
||||||
error_fs_text_11: db '11 - Device error',0
|
error_fs_text_11: db '11 - Device error',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
lsz title,\
|
|
||||||
ru,'<27>¦ ¢ ï ‡¥¬«ï (<28>à®â®â¨¯ 1.4) 21.12.2014',\
|
|
||||||
en,'Rusty Earth (Prototype 1.4) 21.12.2014'
|
|
||||||
db 0
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
base_icons_file_name db 'base_8bpp.png',0
|
base_icons_file_name db 'base_8bpp.png',0
|
||||||
red_brick_icons_file_name db 'red_brick_8bpp.png',0
|
red_brick_icons_file_name db 'red_brick_8bpp.png',0
|
||||||
white_brick_icons_file_name db 'white_brick_8bpp.png',0
|
white_brick_icons_file_name db 'white_brick_8bpp.png',0
|
||||||
|
39
programs/games/rstearth/localization_eng.inc
Normal file
39
programs/games/rstearth/localization_eng.inc
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
;---------------------------------------------------------------------
|
||||||
|
title:
|
||||||
|
db 'Rusty Earth (Prototype 1.5) 23.12.2014',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_game_label:
|
||||||
|
db 'GAME',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_settings_label:
|
||||||
|
db 'SETTINGS',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_credits_label:
|
||||||
|
db 'CREDITS',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_help_label:
|
||||||
|
db 'HELP',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_exit_label:
|
||||||
|
db 'EXIT',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_settings_sound_label:
|
||||||
|
db 'SOUNDS',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_settings_music_label:
|
||||||
|
db 'MUSIC',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_credits_text:
|
||||||
|
db 'Hello KolibriOS Team!',0
|
||||||
|
db 'The game used graphics and sound material',0
|
||||||
|
db 'under a free license, borrowed from:',0
|
||||||
|
db 'http://untamed.wild-refuge.net/',0
|
||||||
|
db 'http://opengameart.org',0
|
||||||
|
db 'https://wiki.themanaworld.org',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_help_text:
|
||||||
|
db 'Game control',0
|
||||||
|
db 'Move the player:',0
|
||||||
|
db 'WASD, Arrows or Num8462',0
|
||||||
|
db 'Player kick : Space',0
|
||||||
|
;---------------------------------------------------------------------
|
49
programs/games/rstearth/localization_rus.inc
Normal file
49
programs/games/rstearth/localization_rus.inc
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
;---------------------------------------------------------------------
|
||||||
|
; Code page - Cyrillic OEM866
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
title:
|
||||||
|
db '<27>¦ ¢ ï ‡¥¬«ï (<28>à®â®â¨¯ 1.5) 23.12.2014',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
main_menu_text_pointers:
|
||||||
|
dd menu_game_label
|
||||||
|
dd menu_settings_label
|
||||||
|
dd menu_credits_label
|
||||||
|
dd menu_help_label
|
||||||
|
dd menu_exit_label
|
||||||
|
dd 0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_game_label:
|
||||||
|
db 'ˆƒ<CB86>€',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_settings_label:
|
||||||
|
db '<27>€‘’<E28098>Ž‰Šˆ',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_credits_label:
|
||||||
|
db '<27>‹€ƒŽ„€<E2809E><E282AC>Ž‘’œ',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_help_label:
|
||||||
|
db '<27>ŽŒŽ™œ',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_exit_label:
|
||||||
|
db '‚›•Ž„',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_settings_sound_label:
|
||||||
|
db '‡‚“Šˆ',0
|
||||||
|
;--------------------------------------
|
||||||
|
menu_settings_music_label:
|
||||||
|
db 'Œ“‡›Š€',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_credits_text:
|
||||||
|
db '<27>ਢ¥â ãç á⨪ ¬ ª®¬ ¤ë KolibriOS Team!',0
|
||||||
|
db '‚ ¨£à¥ ¨á¯®«ì§®¢ ë £à ä¨ç¥áª¨¥ ¨ §¢ãª®¢ë¥ ¬ â¥à¨ «ë',0
|
||||||
|
db '¯®¤ ᢮¡®¤ë¬¨ «¨æ¥§¨ï¬¨, ¯®§ ¨¬á⢮¢ ë¥ á á ©â®¢:',0
|
||||||
|
db 'http://untamed.wild-refuge.net/',0
|
||||||
|
db 'http://opengameart.org',0
|
||||||
|
db 'https://wiki.themanaworld.org',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
menu_help_text:
|
||||||
|
db '“¯à ¢«¥¨¥ ¨£à®©',0
|
||||||
|
db '<27>¥à¥¬¥é¥¨¥ ¨£à®ª :',0
|
||||||
|
db 'WASD, áâ५ª¨ ¨«¨ Num8462',0
|
||||||
|
db '“¤ à ¨£à®ª : "<22>஡¥«"',0
|
||||||
|
;---------------------------------------------------------------------
|
158
programs/games/rstearth/menu.inc
Normal file
158
programs/games/rstearth/menu.inc
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
main_menu_start:
|
||||||
|
mov [main_menu_pointer],0
|
||||||
|
.red:
|
||||||
|
call draw_main_menu_window
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.still:
|
||||||
|
mcall 10
|
||||||
|
|
||||||
|
cmp eax,1
|
||||||
|
je .red
|
||||||
|
|
||||||
|
cmp eax,2
|
||||||
|
je .key
|
||||||
|
|
||||||
|
cmp eax,3
|
||||||
|
je .button
|
||||||
|
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.key:
|
||||||
|
mcall 2
|
||||||
|
cmp [extended_key],1
|
||||||
|
je .extended_key
|
||||||
|
|
||||||
|
test al,al
|
||||||
|
jnz .still
|
||||||
|
|
||||||
|
cmp ah,72 ; arrow up
|
||||||
|
je .arrow_up
|
||||||
|
|
||||||
|
cmp ah,80 ; arrow down
|
||||||
|
je .arrow_down
|
||||||
|
|
||||||
|
cmp ah,17 ; w - arrow up
|
||||||
|
je .arrow_up
|
||||||
|
|
||||||
|
cmp ah,31 ; s - arrow down
|
||||||
|
je .arrow_down
|
||||||
|
|
||||||
|
cmp ah,57 ; space
|
||||||
|
je .enter_to_point
|
||||||
|
|
||||||
|
cmp ah,28 ; enter
|
||||||
|
je .enter_to_point
|
||||||
|
|
||||||
|
mov [extended_key],1
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.extended_key:
|
||||||
|
mov [extended_key],0
|
||||||
|
cmp ah,72 ; arrow up
|
||||||
|
je .arrow_up
|
||||||
|
|
||||||
|
cmp ah,80 ; arrow down
|
||||||
|
je .arrow_down
|
||||||
|
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.arrow_up:
|
||||||
|
cmp [main_menu_pointer],0
|
||||||
|
je .still
|
||||||
|
|
||||||
|
call clear_old_pointer
|
||||||
|
dec [main_menu_pointer]
|
||||||
|
call draw_new_pointer
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.arrow_down:
|
||||||
|
cmp [main_menu_pointer],4
|
||||||
|
je .still
|
||||||
|
|
||||||
|
call clear_old_pointer
|
||||||
|
inc [main_menu_pointer]
|
||||||
|
call draw_new_pointer
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.enter_to_point:
|
||||||
|
cmp [main_menu_pointer],0
|
||||||
|
je start_level_0
|
||||||
|
|
||||||
|
cmp [main_menu_pointer],4
|
||||||
|
je button.exit
|
||||||
|
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
.button:
|
||||||
|
mcall 17
|
||||||
|
|
||||||
|
cmp ah,1
|
||||||
|
jne .still
|
||||||
|
|
||||||
|
jmp button.exit
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
clear_old_pointer:
|
||||||
|
movzx ecx,byte [main_menu_pointer]
|
||||||
|
imul ecx,SPRITE_SIZE_Y
|
||||||
|
add ecx,SPRITE_SIZE_Y*2 + 32
|
||||||
|
shl ecx,16
|
||||||
|
mov cx,SPRITE_SIZE_Y
|
||||||
|
mcall 13,<SPRITE_SIZE_X*2,SPRITE_SIZE_X>,,0
|
||||||
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
draw_new_pointer:
|
||||||
|
; movzx ecx,byte [main_menu_pointer]
|
||||||
|
; imul ecx,SPRITE_SIZE_Y
|
||||||
|
; add ecx,SPRITE_SIZE_Y*2
|
||||||
|
; shl ecx,16
|
||||||
|
; mov cx,SPRITE_SIZE_Y
|
||||||
|
; mcall 13,<SPRITE_SIZE_X*1,SPRITE_SIZE_X>,,0xff0000
|
||||||
|
|
||||||
|
mov eax,[npc_miku_icons]
|
||||||
|
mov ebp,SPRITE_SIZE_X*SPRITE_SIZE_Y*12
|
||||||
|
call copy_base_8bpp
|
||||||
|
|
||||||
|
movzx edx,byte [main_menu_pointer]
|
||||||
|
imul edx,SPRITE_SIZE_Y
|
||||||
|
add edx,SPRITE_SIZE_Y*2 + 32
|
||||||
|
add edx,SPRITE_SIZE_X*2 shl 16
|
||||||
|
|
||||||
|
xor ebp,ebp
|
||||||
|
mcall 65,buffer_area,<SPRITE_SIZE_X,SPRITE_SIZE_Y>,,32
|
||||||
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
draw_main_menu_window:
|
||||||
|
mcall 12,1
|
||||||
|
mcall 48,4
|
||||||
|
mov ecx,100 shl 16 + 644
|
||||||
|
add cx,ax
|
||||||
|
mcall 0,<100,649>,,0x74AABBCC,,title
|
||||||
|
|
||||||
|
call clear_screen
|
||||||
|
|
||||||
|
mov eax,4
|
||||||
|
mov ebx,SPRITE_SIZE_X*3 shl 16 + SPRITE_SIZE_Y*3
|
||||||
|
mov ecx,0x90ffffff
|
||||||
|
mov esi,main_menu_text_pointers
|
||||||
|
;--------------------------------------
|
||||||
|
@@:
|
||||||
|
mov edx,[esi]
|
||||||
|
test edx,edx
|
||||||
|
jz .end
|
||||||
|
|
||||||
|
mcall
|
||||||
|
add ebx,SPRITE_SIZE_Y
|
||||||
|
add esi,4
|
||||||
|
jmp @b
|
||||||
|
;--------------------------------------
|
||||||
|
.end:
|
||||||
|
call draw_new_pointer
|
||||||
|
|
||||||
|
mcall 12,2
|
||||||
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
clear_screen:
|
||||||
|
xor edx,edx
|
||||||
|
mcall 13,<0,SPRITE_SIZE_X*LEVEL_MAP_SIZE_X>,<0,SPRITE_SIZE_Y*LEVEL_MAP_SIZE_Y>
|
||||||
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
@ -100,6 +100,9 @@ load_libraries l_libs_start,end_l_libs
|
|||||||
|
|
||||||
mcall 51,1,snd_background_music_thread_start,snd_background_music_thread_stack
|
mcall 51,1,snd_background_music_thread_start,snd_background_music_thread_stack
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
menu_still:
|
||||||
|
jmp main_menu_start
|
||||||
|
;---------------------------------------------------------------------
|
||||||
start_level_0:
|
start_level_0:
|
||||||
mov [death_of_protagonist],0
|
mov [death_of_protagonist],0
|
||||||
mov [protagonist_route],2
|
mov [protagonist_route],2
|
||||||
@ -201,6 +204,13 @@ include 'actions_white_bricks.inc'
|
|||||||
include 'random.inc'
|
include 'random.inc'
|
||||||
include 'snd_api.inc'
|
include 'snd_api.inc'
|
||||||
include 'sound.inc'
|
include 'sound.inc'
|
||||||
|
include 'menu.inc'
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
if lang eq ru
|
||||||
|
include 'localization_rus.inc'
|
||||||
|
else
|
||||||
|
include 'localization_eng.inc'
|
||||||
|
end if
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
include 'i_data.inc'
|
include 'i_data.inc'
|
||||||
include 'levels.inc'
|
include 'levels.inc'
|
||||||
|
@ -8,6 +8,7 @@ death_of_protagonist rb 1
|
|||||||
target_detected rb 1
|
target_detected rb 1
|
||||||
sound_flag rb 1
|
sound_flag rb 1
|
||||||
snd_kick_flag rb 1
|
snd_kick_flag rb 1
|
||||||
|
main_menu_pointer rb 1
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
N_error rd 1
|
N_error rd 1
|
||||||
|
Loading…
Reference in New Issue
Block a user