forked from KolibriOS/kolibrios
Rusty Earth - font Russo for main menu and fix crash of background music
git-svn-id: svn://kolibrios.org@5264 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5936066957
commit
47b7315fd5
@ -4,6 +4,7 @@ if not exist bin mkdir rstearth_eng_bin
|
||||
@fasm -m 16384 rstearth.asm rstearth_eng_bin\rstearth.kex
|
||||
@erase lang.inc
|
||||
@kpack rstearth_eng_bin\rstearth.kex
|
||||
@copy resources\font_russo_1bpp.png rstearth_eng_bin\font_russo_1bpp.png
|
||||
@copy resources\base_8bpp.png rstearth_eng_bin\base_8bpp.png
|
||||
@copy resources\red_brick_8bpp.png rstearth_eng_bin\red_brick_8bpp.png
|
||||
@copy resources\white_brick_8bpp.png rstearth_eng_bin\white_brick_8bpp.png
|
||||
|
@ -4,6 +4,7 @@ if not exist bin mkdir rstearth_rus_bin
|
||||
@fasm -m 16384 rstearth.asm rstearth_rus_bin\rstearth.kex
|
||||
@erase lang.inc
|
||||
@kpack rstearth_rus_bin\rstearth.kex
|
||||
@copy resources\font_russo_1bpp.png rstearth_rus_bin\font_russo_1bpp.png
|
||||
@copy resources\base_8bpp.png rstearth_rus_bin\base_8bpp.png
|
||||
@copy resources\red_brick_8bpp.png rstearth_rus_bin\red_brick_8bpp.png
|
||||
@copy resources\white_brick_8bpp.png rstearth_rus_bin\white_brick_8bpp.png
|
||||
|
34
programs/games/rstearth/font.inc
Normal file
34
programs/games/rstearth/font.inc
Normal file
@ -0,0 +1,34 @@
|
||||
;---------------------------------------------------------------------
|
||||
draw_font:
|
||||
pusha
|
||||
xor ebp,ebp
|
||||
mov esi,edx
|
||||
mov edx,ebx
|
||||
cld
|
||||
;--------------------------------------
|
||||
@@:
|
||||
lodsb
|
||||
test al,al
|
||||
jz .exit
|
||||
|
||||
movzx ebx,al
|
||||
imul ebx, FONT_SIZE_X * FONT_SIZE_Y /8
|
||||
mov eax,[font_icons]
|
||||
add ebx,[eax+28]
|
||||
add ebx,eax
|
||||
mov ecx,FONT_SIZE_X shl 16 + FONT_SIZE_Y
|
||||
mov edi,[eax+20] ; palette
|
||||
add edi,eax
|
||||
|
||||
push esi
|
||||
mov esi,1
|
||||
mcall 65
|
||||
pop esi
|
||||
|
||||
add edx,FONT_REAL_SIZE_X shl 16 ; font size x
|
||||
jmp @b
|
||||
;--------------------------------------
|
||||
.exit:
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
@ -243,6 +243,7 @@ error_fs_text_9: db '9 - FAT table is destroyed',0
|
||||
error_fs_text_10: db '10 - Access denied',0
|
||||
error_fs_text_11: db '11 - Device error',0
|
||||
;---------------------------------------------------------------------
|
||||
font_icons_file_name db 'font_russo_1bpp.png',0
|
||||
base_icons_file_name db 'base_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
|
||||
|
@ -65,14 +65,7 @@ load_and_convert_current_icon_set:
|
||||
mov eax,[raw_pointer]
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
load_and_convert_all_icons:
|
||||
; load and convert base icons
|
||||
mov ebx,base_icons_file_name
|
||||
call load_and_convert_current_icon_set
|
||||
mov [base_icons],eax
|
||||
; DEBUGF 1, "base_icons: %x\n",eax
|
||||
|
||||
; load and convert base icons
|
||||
; load and convert icons
|
||||
; mov ebx,npc_miku_kick_icons_file_name
|
||||
; call load_and_convert_current_icon_set
|
||||
; mov [npc_miku_kick_icons],eax
|
||||
@ -88,6 +81,19 @@ load_and_convert_all_icons:
|
||||
; DEBUGF 1, "data size: %x\n",[eax+32]
|
||||
; DEBUGF 1, "transparency offset: %x\n",[eax+36]
|
||||
; DEBUGF 1, "transparency size: %x\n",[eax+40]
|
||||
;---------------------------------------------------------------------
|
||||
load_and_convert_all_icons:
|
||||
; load and convert font icons
|
||||
mov ebx,font_icons_file_name
|
||||
call load_and_convert_current_icon_set
|
||||
mov [font_icons],eax
|
||||
; DEBUGF 1, "font_icons: %x\n",eax
|
||||
|
||||
; load and convert base icons
|
||||
mov ebx,base_icons_file_name
|
||||
call load_and_convert_current_icon_set
|
||||
mov [base_icons],eax
|
||||
; DEBUGF 1, "base_icons: %x\n",eax
|
||||
|
||||
; load and convert red brick
|
||||
mov ebx,red_brick_icons_file_name
|
||||
|
@ -1,6 +1,6 @@
|
||||
;---------------------------------------------------------------------
|
||||
title:
|
||||
db 'Rusty Earth (Prototype 1.6) 24.12.2014',0
|
||||
db 'Rusty Earth (Prototype 1.7) 26.12.2014',0
|
||||
;---------------------------------------------------------------------
|
||||
menu_game_label:
|
||||
db 'GAME',0
|
||||
|
@ -2,7 +2,7 @@
|
||||
; Code page - Cyrillic OEM866
|
||||
;---------------------------------------------------------------------
|
||||
title:
|
||||
db '<27>¦ Ά ο ‡¥¬«ο (<28>ΰ®β®β¨― 1.6) 24.12.2014',0
|
||||
db '<27>¦ Ά ο ‡¥¬«ο (<28>ΰ®β®β¨― 1.7) 26.12.2014',0
|
||||
;---------------------------------------------------------------------
|
||||
menu_game_label:
|
||||
db 'ˆƒ<CB86>€',0
|
||||
@ -11,7 +11,7 @@ menu_settings_label:
|
||||
db '<27>€‘’<E28098>Ž‰Šˆ',0
|
||||
;--------------------------------------
|
||||
menu_credits_label:
|
||||
db '<27>‹€ƒ<EFBFBD>„€<EFBFBD><EFBFBD><EFBFBD>‘’<EFBFBD>',0
|
||||
db '<27><EFBFBD><EFBFBD>‚…’›',0
|
||||
;--------------------------------------
|
||||
menu_help_label:
|
||||
db '<27>ŽŒŽ™œ',0
|
||||
@ -36,8 +36,8 @@ menu_setting_exit:
|
||||
;---------------------------------------------------------------------
|
||||
menu_credits_text:
|
||||
.1: db '<27>ਢ¥â ãç á⨪ ¬ ª®¬ ¤ë KolibriOS Team!',0
|
||||
.2: db '‚ ¨£ΰ¥ ¨α―®«μ§®Ά λ £ΰ δ¨η¥α<EFBFBD>¨¥ ¨ §Άγ<CE86>®Άλ¥ ¬ β¥ΰ¨ «λ',0
|
||||
.3: db '―®¤ αΆ®΅®¤λ¬¨ «¨ζ¥§¨ο¬¨, ―®§ ¨¬αβΆ®Ά λ¥ α α ©β®Ά:',0
|
||||
.2: db 'ƒΰ δ¨η¥α<EFBFBD>¨¥ ¨ §Άγ<CE86>®Άλ¥ ¬ β¥ΰ¨ «λ ―®¤',0
|
||||
.3: db 'αΆ®΅®¤λ¬¨ «¨ζ¥§¨ο¬¨, Ά§οβλ α α ©β®Ά:',0
|
||||
.4: db 'http://untamed.wild-refuge.net/',0
|
||||
.5: db 'http://opengameart.org',0
|
||||
.6: db 'https://wiki.themanaworld.org',0
|
||||
|
@ -5,6 +5,7 @@ main_menu_start:
|
||||
.red:
|
||||
mov [menu_text_pointers],main_menu_text_pointers
|
||||
mov [text_step_Y],SPRITE_SIZE_Y
|
||||
mov [use_separate_draw_text],1
|
||||
call draw_menu_window
|
||||
call draw_new_pointer
|
||||
;---------------------------------------------------------------------
|
||||
@ -116,7 +117,7 @@ main_menu_start:
|
||||
clear_old_pointer:
|
||||
movzx ecx,byte [main_menu_pointer]
|
||||
imul ecx,SPRITE_SIZE_Y
|
||||
add ecx,SPRITE_SIZE_Y*2 + 32
|
||||
add ecx,SPRITE_SIZE_Y*3 - 16
|
||||
shl ecx,16
|
||||
mov cx,SPRITE_SIZE_Y
|
||||
mcall 13,<SPRITE_SIZE_X*2,SPRITE_SIZE_X>,,0
|
||||
@ -132,7 +133,7 @@ draw_new_pointer:
|
||||
|
||||
movzx edx,byte [main_menu_pointer]
|
||||
imul edx,SPRITE_SIZE_Y
|
||||
add edx,SPRITE_SIZE_Y*2 + 32
|
||||
add edx,SPRITE_SIZE_Y*3 - 16
|
||||
add edx,SPRITE_SIZE_X*2 shl 16
|
||||
|
||||
mov eax,[npc_miku_icons]
|
||||
@ -162,7 +163,16 @@ draw_menu_window:
|
||||
test edx,edx
|
||||
jz .end
|
||||
|
||||
cmp [use_separate_draw_text],1
|
||||
je .use_separate_draw_text
|
||||
|
||||
mcall
|
||||
jmp .continue
|
||||
;--------------------------------------
|
||||
.use_separate_draw_text:
|
||||
call draw_font
|
||||
;--------------------------------------
|
||||
.continue:
|
||||
add ebx,[text_step_Y]
|
||||
add esi,4
|
||||
jmp @b
|
||||
@ -190,6 +200,7 @@ menu_help:
|
||||
mov [text_step_Y],20
|
||||
;--------------------------------------
|
||||
.red:
|
||||
mov [use_separate_draw_text],0
|
||||
call draw_menu_window
|
||||
;---------------------------------------------------------------------
|
||||
.still:
|
||||
@ -253,6 +264,7 @@ settings_menu_start:
|
||||
mov [menu_text_pointers],settings_menu_text_pointers
|
||||
mov [text_step_Y],SPRITE_SIZE_Y
|
||||
call prepare_settings_text
|
||||
mov [use_separate_draw_text],1
|
||||
call draw_menu_window
|
||||
call draw_new_pointer
|
||||
;---------------------------------------------------------------------
|
||||
|
BIN
programs/games/rstearth/resources/font_russo_1bpp.png
Normal file
BIN
programs/games/rstearth/resources/font_russo_1bpp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
@ -47,6 +47,10 @@ include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
;include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
@use_library
|
||||
;---------------------------------------------------------------------
|
||||
FONT_SIZE_X = 32
|
||||
FONT_REAL_SIZE_X = 32
|
||||
FONT_SIZE_Y = 32
|
||||
;---------------------------------------------------------------------
|
||||
LEVEL_MAP_SIZE_X = 10
|
||||
LEVEL_MAP_SIZE_Y = 10
|
||||
SPRITE_SIZE_X = 64
|
||||
@ -207,6 +211,7 @@ include 'random.inc'
|
||||
include 'snd_api.inc'
|
||||
include 'sound.inc'
|
||||
include 'menu.inc'
|
||||
include 'font.inc'
|
||||
;---------------------------------------------------------------------
|
||||
if lang eq ru
|
||||
include 'localization_rus.inc'
|
||||
|
@ -180,12 +180,13 @@ snd_background_music_thread_start:
|
||||
mov ebx,[eax]
|
||||
add eax,4
|
||||
mov ebp,eax
|
||||
; DEBUGF 1, "src EAX: %x size EBX: %x\n",eax,ebx
|
||||
add ebx,eax
|
||||
; DEBUGF 1, "start EAX: %x\n",eax
|
||||
;--------------------------------------
|
||||
.loop:
|
||||
cmp [music_flag],0
|
||||
je snd_background_music_thread_start
|
||||
; DEBUGF 1, "src EAX: %x size EBX: %x\n",eax,ebx
|
||||
; DEBUGF 1, "src EBP: %x size EBX: %x\n",ebp,ebx
|
||||
; stdcall _WaveOut@12,[hBuff],eax,ebx
|
||||
stdcall _WaveOut@12,[hBuff1],ebp,8192
|
||||
; DEBUGF 1, "return EAX: %x\n",eax
|
||||
@ -195,7 +196,7 @@ snd_background_music_thread_start:
|
||||
|
||||
add ebp,8192*2
|
||||
cmp ebx,ebp
|
||||
jae .start
|
||||
jbe .start
|
||||
|
||||
sub ebp,8192
|
||||
jmp .loop
|
||||
|
@ -12,12 +12,14 @@ music_flag rb 1
|
||||
snd_kick_flag rb 1
|
||||
main_menu_pointer rb 1
|
||||
settings_menu_pointer rb 1
|
||||
use_separate_draw_text rb 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
N_error rd 1
|
||||
error_type rd 1
|
||||
error_path rd 1
|
||||
;---------------------------------------------------------------------
|
||||
font_icons rd 1
|
||||
base_icons rd 1
|
||||
red_brick_icons rd 1
|
||||
white_brick_icons rd 1
|
||||
|
Loading…
Reference in New Issue
Block a user