update game 'Nu pogodi': add ini file
git-svn-id: svn://kolibrios.org@1552 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -4,6 +4,7 @@ if not exist bin\chi.png @copy chi.png bin\chi.png
|
||||
if not exist bin\curici.png @copy curici.png bin\curici.png
|
||||
if not exist bin\eggs.png @copy eggs.png bin\eggs.png
|
||||
if not exist bin\wolf.png @copy wolf.png bin\wolf.png
|
||||
@copy *.ini bin\*.ini
|
||||
@fasm.exe -m 16384 nu_pogod.asm bin\nu_pogod.kex
|
||||
@kpack bin\nu_pogod.kex
|
||||
if not exist bin\buf2d.obj @fasm.exe -m 16384 ..\..\..\develop\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
|
||||
|
@@ -47,9 +47,11 @@ struct FileInfoBlock
|
||||
FileName dd ?
|
||||
ends
|
||||
|
||||
GAME_POLE_W equ 315 ;<3B><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
GAME_POLE_H equ 210 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
GAME_POLE_BYTES equ GAME_POLE_W*GAME_POLE_H*3 ;ࠧ<><E0A0A7><EFBFBD> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD><EFBFBD>
|
||||
displ_w dd ? ;<3B><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
displ_h dd ? ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
displ_bytes dd ? ;ࠧ<><E0A0A7><EFBFBD> 1-<2D><> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD><EFBFBD>
|
||||
;displ_bytes equ 315*210*3 ;ࠧ<><E0A0A7><EFBFBD> 1-<2D><> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
OFFS_SHADOW_X equ 2 ;ᤢ<><E1A4A2> ⥭<><E2A5AD> <20><> <20><><EFBFBD> 'x'
|
||||
OFFS_SHADOW_Y equ 2 ;ᤢ<><E1A4A2> ⥭<><E2A5AD> <20><> <20><><EFBFBD> 'y'
|
||||
IMAGE_FONT_SIZE equ 128*144*3
|
||||
@@ -70,6 +72,13 @@ fn_icon2 db 'eggs.png',0 ;
|
||||
fn_icon3 db 'chi.png',0 ;<3B><><EFBFBD> 䠩<><E4A0A9> <20> 樯<><E6A8AF>⠬<EFBFBD>
|
||||
fn_font db 'font8x9.bmp',0
|
||||
|
||||
ini_name db 'nu_pogod.ini',0
|
||||
ini_sec_files db 'Files',0
|
||||
key_displ_w db 'displ_w',0
|
||||
key_displ_h db 'displ_h',0
|
||||
ini_sec_color db 'Colors',0
|
||||
key_color_unit db 'unit',0
|
||||
|
||||
;梥<><E6A2A5> <20> <20><><EFBFBD><EFBFBD>
|
||||
color_fon dd 0xffffff
|
||||
color_shadows dd 0xd0d0d0 ;梥<> ⥭<><E2A5AD>
|
||||
@@ -81,13 +90,14 @@ color_curici dd 0x8080d0 ;梥
|
||||
color_perilo dd 0x000080 ;梥<> <20><>ਫ<EFBFBD> (<28>ॡ<EFBFBD><E0A5A1>)
|
||||
;梥<><E6A2A5> <20><><EFBFBD><EFBFBD><EFBFBD>䥩<EFBFBD><E4A5A9>
|
||||
color_but_sm dd 0x808080 ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD>쪨<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
color_but_bi dd 0x8080ff ;梥<> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
color_but_te dd 0xffffff ;梥<> ⥪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
macro load_image_file path,buf,size { ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
copy_path path,sys_path,file_name,0x0 ;<3B><>ନ<EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>, <20><><EFBFBD>ࠧ㬥<E0A0A7><E3ACA5><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>
|
||||
|
||||
stdcall mem.Alloc, dword size ;<3B>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
mov [buf],eax
|
||||
|
||||
copy_path path,sys_path,file_name,0x0 ;<3B><>ନ<EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>, <20><><EFBFBD>ࠧ㬥<E0A0A7><E3ACA5><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>
|
||||
mov eax,70 ;70-<2D> <20>㭪<EFBFBD><E3ADAA><EFBFBD> ࠡ<><E0A0A1><EFBFBD> <20> 䠩<><E4A0A9><EFBFBD><EFBFBD>
|
||||
mov [run_file_70.Function], 0
|
||||
mov [run_file_70.Position], 0
|
||||
@@ -130,6 +140,9 @@ bit_chi_right equ 27 ;1-
|
||||
val_zaac_time_y equ 5 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ ⠪⮢, <20><><EFBFBD><EFBFBD> <20><>易⥫쭮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
val_zaac_time_n equ 7 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ ⠪⮢, <20><><EFBFBD><EFBFBD> <20><>易⥫쭮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
txt_game_a db '<27><><EFBFBD><EFBFBD> <20>',0
|
||||
txt_game_b db '<27><><EFBFBD><EFBFBD> <20>',0
|
||||
|
||||
zaac_status db 0
|
||||
pos_wolf db 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 0-<2D> <20><><EFBFBD> <><E1ABA5>/<2F><>ࠢ<EFBFBD>, 1-<2D> <20><><EFBFBD> ᢥ<><E1A2A5><EFBFBD>/<2F><><EFBFBD><EFBFBD>
|
||||
;rb 1
|
||||
@@ -162,13 +175,23 @@ pop eax
|
||||
;<3B><> 䮭<><E4AEAD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>㤥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 쬭<><ECACAD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
align 4
|
||||
proc CreateTrapharetBuffer, buf:dword, img_data:dword
|
||||
push edi
|
||||
push eax edi
|
||||
mov edi,dword[buf]
|
||||
|
||||
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov buf2d_size_lt,0
|
||||
mov eax,dword[displ_w]
|
||||
mov buf2d_w,eax
|
||||
mov eax,dword[displ_h]
|
||||
mov buf2d_h,eax
|
||||
mov buf2d_color,0xffffff
|
||||
mov buf2d_bits,24
|
||||
|
||||
stdcall [buf2d_create_f_img], edi,[img_data] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_conv_24_to_8], edi,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA7>筮<EFBFBD><E7ADAE><EFBFBD> 8<><38><EFBFBD>
|
||||
;<3B><>१<EFBFBD><E0A5A7><EFBFBD> <20><>譨<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ண<EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_crop_color], edi,buf2d_color,BUF2D_OPT_CROP_TOP+BUF2D_OPT_CROP_BOTTOM+BUF2D_OPT_CROP_RIGHT+BUF2D_OPT_CROP_LEFT
|
||||
pop edi
|
||||
pop edi eax
|
||||
ret
|
||||
endp
|
||||
|
||||
@@ -184,32 +207,32 @@ InitBackgroundBuffer: ;ᮧ
|
||||
xor eax,eax
|
||||
xor ebx,ebx
|
||||
|
||||
mov edi,buf_tr_fon0
|
||||
mov edi,buf_decor
|
||||
mov ax,buf2d_t
|
||||
add eax,OFFS_SHADOW_Y
|
||||
mov bx,buf2d_l
|
||||
add ebx,OFFS_SHADOW_X
|
||||
stdcall [buf2d_bit_blt_alpha], esi, ebx,eax, edi,[color_shadows] ;<3B><><EFBFBD>㥬 ⥭<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov edi,buf_tr_fon1
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
mov ax,buf2d_t
|
||||
add eax,OFFS_SHADOW_Y
|
||||
mov bx,buf2d_l
|
||||
add ebx,OFFS_SHADOW_X
|
||||
stdcall [buf2d_bit_blt_alpha], esi, ebx,eax, edi,[color_shadows] ;<3B><><EFBFBD>㥬 ⥭<> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov edi,buf_tr_fon2
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
mov ax,buf2d_t
|
||||
add eax,OFFS_SHADOW_Y
|
||||
mov bx,buf2d_l
|
||||
add ebx,OFFS_SHADOW_X
|
||||
stdcall [buf2d_bit_blt_alpha], esi, ebx,eax, edi,[color_shadows] ;<3B><><EFBFBD>㥬 ⥭<> <20><>ॢ쥢
|
||||
|
||||
mov edi,buf_tr_fon0
|
||||
mov edi,buf_decor
|
||||
mov ax,buf2d_t
|
||||
stdcall [buf2d_bit_blt_alpha], esi, 0,eax, edi,[color_perilo] ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov edi,buf_tr_fon1
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
mov ax,buf2d_t
|
||||
stdcall [buf2d_bit_blt_alpha], esi, 0,eax, edi,[color_curici] ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov edi,buf_tr_fon2
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
mov ax,buf2d_t
|
||||
stdcall [buf2d_bit_blt_alpha], esi, 0,eax, edi,[color_trees] ;<3B><><EFBFBD>㥬 <20><>ॢ<EFBFBD><E0A5A2>
|
||||
popad
|
||||
@@ -533,6 +556,29 @@ proc InitGame, b:dword ;
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
proc LoadArrayBuffer, f_name:dword, buf_start:dword, count:dword
|
||||
pushad
|
||||
mov edx,dword[displ_bytes]
|
||||
mov ecx,edx
|
||||
imul ecx,dword[count]
|
||||
mov eax,dword[f_name]
|
||||
load_image_file eax,image_data_gray,ecx
|
||||
mov edx,dword[displ_bytes]
|
||||
mov eax,[image_data_gray]
|
||||
mov edi,dword[buf_start]
|
||||
mov ecx,dword[count]
|
||||
cld
|
||||
@@: ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ
|
||||
stdcall CreateTrapharetBuffer,edi,eax
|
||||
add eax,edx
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
loop @b
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
start:
|
||||
load_libraries l_libs_start,load_lib_end
|
||||
@@ -552,67 +598,24 @@ start:
|
||||
mcall 40,0x27
|
||||
mcall 48,3,sc,sizeof.system_colors ;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> 梥<><E6A2A5>
|
||||
|
||||
load_image_file fn_icon0,image_data_gray,3*GAME_POLE_BYTES
|
||||
mov eax,[image_data_gray]
|
||||
stdcall CreateTrapharetBuffer,buf_tr_fon0,eax
|
||||
add eax,GAME_POLE_BYTES
|
||||
stdcall CreateTrapharetBuffer,buf_tr_fon1,eax
|
||||
add eax,GAME_POLE_BYTES
|
||||
stdcall CreateTrapharetBuffer,buf_tr_fon2,eax
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
;ࠡ<><E0A0A1><EFBFBD> <20> 䠩<><E4A0A9><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
copy_path ini_name,sys_path,file_name,0x0
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_files,key_displ_w,210
|
||||
mov dword[displ_w],eax
|
||||
stdcall dword[ini_get_int],file_name,ini_sec_files,key_displ_h,140
|
||||
mov dword[displ_h],eax
|
||||
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_unit,0
|
||||
mov dword[color_wolf],eax
|
||||
|
||||
stdcall [buf2d_create], buf_fon ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䮭<><E4AEAD>묨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ
|
||||
mov edx,dword[displ_w]
|
||||
imul edx,dword[displ_h]
|
||||
lea edx,[edx+edx*2]
|
||||
mov dword[displ_bytes],edx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
load_image_file fn_icon1,image_data_gray, 9*GAME_POLE_BYTES
|
||||
mov eax,[image_data_gray]
|
||||
mov edi,buf_wolf
|
||||
mov ecx,9
|
||||
cld
|
||||
@@: ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 9 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>楬
|
||||
mov buf2d_size_lt,0
|
||||
mov buf2d_w,GAME_POLE_W
|
||||
mov buf2d_h,GAME_POLE_H
|
||||
mov buf2d_color,0xffffff
|
||||
mov buf2d_bits,24
|
||||
stdcall CreateTrapharetBuffer,edi,eax
|
||||
add eax,GAME_POLE_BYTES
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
loop @b
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
load_image_file fn_icon2,image_data_gray, 22*GAME_POLE_BYTES
|
||||
mov eax,[image_data_gray]
|
||||
mov edi,buf_egg
|
||||
mov ecx,22
|
||||
cld
|
||||
@@: ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 22 <20><><EFBFBD><EFBFBD> <20> <20><>栬<EFBFBD>
|
||||
mov buf2d_size_lt,0
|
||||
mov buf2d_w,GAME_POLE_W
|
||||
mov buf2d_h,GAME_POLE_H
|
||||
mov buf2d_color,0xffffff
|
||||
mov buf2d_bits,24
|
||||
stdcall CreateTrapharetBuffer,edi,eax
|
||||
add eax,GAME_POLE_BYTES
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
loop @b
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
load_image_file fn_icon3,image_data_gray, 13*GAME_POLE_BYTES
|
||||
mov eax,[image_data_gray]
|
||||
mov edi,buf_chi
|
||||
mov ecx,13
|
||||
cld
|
||||
@@: ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 13 <20><><EFBFBD><EFBFBD> <20> 樯<><E6A8AF>⠬<EFBFBD>
|
||||
mov buf2d_size_lt,0
|
||||
mov buf2d_w,GAME_POLE_W
|
||||
mov buf2d_h,GAME_POLE_H
|
||||
mov buf2d_color,0xffffff
|
||||
mov buf2d_bits,24
|
||||
stdcall CreateTrapharetBuffer,edi,eax
|
||||
add eax,GAME_POLE_BYTES
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
loop @b
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall LoadArrayBuffer, fn_icon0, buf_decor,3 ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ
|
||||
stdcall LoadArrayBuffer, fn_icon1, buf_wolf,9 ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 9 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>楬
|
||||
stdcall LoadArrayBuffer, fn_icon2, buf_egg,22 ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 22 <20><><EFBFBD><EFBFBD> <20> <20><>栬<EFBFBD>
|
||||
stdcall LoadArrayBuffer, fn_icon3, buf_chi,13 ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 13 <20><><EFBFBD><EFBFBD> <20> 樯<><E6A8AF>⠬<EFBFBD>
|
||||
|
||||
load_image_file fn_font, image_data_gray,IMAGE_FONT_SIZE
|
||||
stdcall [buf2d_create_f_img], buf_font,[image_data_gray] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -626,7 +629,19 @@ start:
|
||||
;add edi,BUF_STRUCT_SIZE ;<3B><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>২<EFBFBD><E0A7A8>
|
||||
;stdcall [buf2d_clear],edi,0x808080 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 梥⮬
|
||||
|
||||
mov ebx,dword[displ_w]
|
||||
mov edx,dword[displ_h]
|
||||
|
||||
mov edi,buf_displ
|
||||
mov buf2d_w,ebx
|
||||
mov buf2d_h,edx
|
||||
stdcall [buf2d_create], buf_displ ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20>뢮<EFBFBD><EBA2AE> <20><> <20><>࠭
|
||||
|
||||
mov edi,buf_fon
|
||||
mov buf2d_w,ebx
|
||||
mov buf2d_h,edx
|
||||
stdcall [buf2d_create], buf_fon ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䮭<><E4AEAD>묨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ
|
||||
|
||||
call InitBackgroundBuffer ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䮭<><E4AEAD>묨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ
|
||||
stdcall InitGame,0
|
||||
mcall 26,9
|
||||
@@ -736,9 +751,9 @@ draw_window:
|
||||
mcall 9,procinfo,-1
|
||||
mov edi,buf_displ
|
||||
mov eax,dword[procinfo.client_box.width]
|
||||
cmp eax,GAME_POLE_W
|
||||
cmp eax,dword[displ_w]
|
||||
jle @f
|
||||
sub eax,GAME_POLE_W
|
||||
sub eax,dword[displ_w]
|
||||
shr eax,1
|
||||
mov buf2d_l,ax ;<3B><><EFBFBD>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> 業<><E6A5AD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
@@:
|
||||
@@ -749,7 +764,7 @@ draw_window:
|
||||
mov edx,[sc.work]
|
||||
xor esi,esi
|
||||
mov si,buf2d_l
|
||||
add esi,GAME_POLE_W
|
||||
add esi,dword[displ_w]
|
||||
mov ebx,dword[procinfo.client_box.width]
|
||||
inc ebx
|
||||
cmp esi,ebx
|
||||
@@ -788,6 +803,20 @@ push esi
|
||||
int 0x40
|
||||
pop esi
|
||||
|
||||
mov eax,4 ;<3B><><EFBFBD>R<EFBFBD><52>-<2D>? <20>?<3F><><EFBFBD><EFBFBD>
|
||||
mov bx,BUT1_H
|
||||
add ebx,3*65536;+3
|
||||
mov ecx,dword[color_but_te]
|
||||
or ecx,0x80000000
|
||||
mov edx,txt_game_a
|
||||
int 0x40
|
||||
|
||||
ror ebx,16
|
||||
add ebx,BUT1_NEXT_TOP
|
||||
ror ebx,16
|
||||
mov edx,txt_game_b
|
||||
int 0x40
|
||||
|
||||
; *** <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC> ***
|
||||
mov eax,13 ;<3B><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD><ECADA8>
|
||||
mov edx,[sc.work]
|
||||
@@ -796,7 +825,7 @@ end if
|
||||
mov ebx,esi
|
||||
mov ecx,dword[procinfo.client_box.height]
|
||||
inc ecx
|
||||
mov esi,GAME_POLE_H
|
||||
mov esi,dword[displ_h]
|
||||
cmp esi,ebx
|
||||
jge @f
|
||||
sub ecx,esi
|
||||
@@ -808,7 +837,7 @@ end if
|
||||
|
||||
xor ebx,ebx
|
||||
mov bx,buf2d_l
|
||||
mov ecx,GAME_POLE_H
|
||||
mov ecx,dword[displ_h]
|
||||
int 0x40 ;<3B><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
mcall 12,2
|
||||
@@ -818,22 +847,17 @@ end if
|
||||
align 4
|
||||
draw_display:
|
||||
|
||||
stdcall mem_copy, dword[buf_fon],dword[buf_displ],GAME_POLE_BYTES ;<3B><><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> 䮭<><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
call DrawZaac
|
||||
stdcall mem_copy, dword[buf_fon],dword[buf_displ],315*210*3;dword[displ_bytes] ;<3B><><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> 䮭<><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
call DrawZaac ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
call DrawWolf ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
call DrawEggs
|
||||
|
||||
stdcall [buf2d_draw_text], buf_displ, buf_font,game_text,GAME_POLE_W/2,OFFS_SHADOW_X,[color_curici] ;<3B><><EFBFBD>㥬 <20><>ப<EFBFBD> <20> ⥪<>⮬
|
||||
call DrawEggs ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD>
|
||||
|
||||
push eax
|
||||
mov eax,dword[displ_w]
|
||||
shr eax,1
|
||||
stdcall [buf2d_draw_text], buf_displ, buf_font,game_text,eax,OFFS_SHADOW_X,[color_curici] ;<3B><><EFBFBD>㥬 <20><>ப<EFBFBD> <20> ⥪<>⮬
|
||||
pop eax
|
||||
stdcall [buf2d_draw], buf_displ
|
||||
|
||||
;mov eax,4 ;<3B><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
||||
;mov ebx,(GAME_POLE_W/2)*65536+OFFS_SHADOW_X
|
||||
;mov ecx,[color_curici]
|
||||
;or ecx,0x80000000
|
||||
;mov edx,some_text
|
||||
;mcall
|
||||
|
||||
ret
|
||||
|
||||
align 4
|
||||
@@ -854,13 +878,15 @@ button:
|
||||
stdcall [buf2d_delete],buf_fon ;㤠<>塞 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_delete],buf_displ ;㤠<>塞 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
stdcall [buf2d_delete],buf_tr_fon0
|
||||
stdcall [buf2d_delete],buf_tr_fon1
|
||||
stdcall [buf2d_delete],buf_tr_fon2
|
||||
|
||||
stdcall [buf2d_delete],buf_font
|
||||
|
||||
cld
|
||||
mov ecx,3
|
||||
mov edi,buf_decor
|
||||
@@: ;㤠<>塞 3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_delete],edi
|
||||
add edi,BUF_STRUCT_SIZE
|
||||
loop @b
|
||||
mov ecx,9
|
||||
mov edi,buf_wolf
|
||||
@@: ;㤠<>塞 9 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>楬
|
||||
@@ -895,10 +921,16 @@ name_libimg db 'libimg.obj',0
|
||||
err_message_found_lib1 db '<27><> 㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> libimg.obj',0
|
||||
err_message_import1 db '<27>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> libimg.obj',0
|
||||
|
||||
system_dir2 db '/sys/lib/'
|
||||
libini_name db 'libini.obj',0
|
||||
err_message_found_lib2 db '<27><> 㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> libini.obj',0
|
||||
err_message_import2 db '<27>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> libini.obj',0
|
||||
|
||||
;library structures
|
||||
l_libs_start:
|
||||
lib0 l_libs name_buf2d, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, import_buf2d_lib, err_message_import0, head_f_i
|
||||
lib1 l_libs name_libimg, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, import_libimg, err_message_import1, head_f_i
|
||||
lib2 l_libs libini_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l, libini_import, err_message_import2, head_f_i
|
||||
load_lib_end:
|
||||
|
||||
align 4
|
||||
@@ -950,19 +982,9 @@ image_data dd 0 ;
|
||||
image_data_gray dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>६<EFBFBD><E0A5AC><EFBFBD>묨 <20><><EFBFBD>묨 <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD>ﬨ <20> <20><>ଠ<EFBFBD><E0ACA0> 24-bit, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
run_file_70 FileInfoBlock
|
||||
hed db 'Nu pogodi 30.07.10',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
hed db 'Nu pogodi 03.08.10',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
sc system_colors ;<3B><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> 梥<><E6A2A5>
|
||||
|
||||
align 4
|
||||
buf_fon: ;䮭<><E4AEAD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
dw 0 ;+4 left
|
||||
dw 0 ;+6 top
|
||||
dd GAME_POLE_W ;+8 w
|
||||
dd GAME_POLE_H ;+12 h
|
||||
dd 0xffffff ;+16 color
|
||||
db 24 ;+20 bit in pixel
|
||||
|
||||
align 4
|
||||
buf_font: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>⮬
|
||||
dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
@@ -974,41 +996,27 @@ buf_font: ;
|
||||
db 24 ;+20 bit in pixel
|
||||
|
||||
align 4
|
||||
buf_tr_fon0: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ३<><E0A5A9><EFBFBD><EFBFBD>
|
||||
buf_displ:
|
||||
dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
dw 0 ;+4 left
|
||||
dw 0 ;+6 top
|
||||
dd GAME_POLE_W ;+8 w
|
||||
dd GAME_POLE_H ;+12 h
|
||||
dd 0xffffff ;+16 color
|
||||
dw 25,0
|
||||
dd ? ;+8 w
|
||||
dd ? ;+12 h
|
||||
dd 0 ;+16 color
|
||||
db 24 ;+20 bit in pixel
|
||||
|
||||
align 4
|
||||
buf_tr_fon1: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>栬<EFBFBD>
|
||||
buf_fon: ;䮭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
dw 0 ;+4 left
|
||||
dw 0 ;+6 top
|
||||
dd GAME_POLE_W ;+8 w
|
||||
dd GAME_POLE_H ;+12 h
|
||||
dd 0xffffff ;+16 color
|
||||
db 24 ;+20 bit in pixel
|
||||
align 4
|
||||
buf_tr_fon2: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>⥭<EFBFBD>ﬨ
|
||||
dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
dw 0 ;+4 left
|
||||
dw 0 ;+6 top
|
||||
dd GAME_POLE_W ;+8 w
|
||||
dd GAME_POLE_H ;+12 h
|
||||
dd ? ;+8 w
|
||||
dd ? ;+12 h
|
||||
dd 0xffffff ;+16 color
|
||||
db 24 ;+20 bit in pixel
|
||||
|
||||
align 4
|
||||
buf_displ:
|
||||
dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
dw 25,0
|
||||
dd GAME_POLE_W ;+8 w
|
||||
dd GAME_POLE_H ;+12 h
|
||||
dd 0 ;+16 color
|
||||
db 24 ;+20 bit in pixel
|
||||
buf_decor: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ३<><E0A5A9><EFBFBD><EFBFBD>; <20> <20><><EFBFBD><EFBFBD>栬<EFBFBD>; <20> <20><><EFBFBD>⥭<EFBFBD>ﬨ
|
||||
rb 3*BUF_STRUCT_SIZE
|
||||
|
||||
align 4
|
||||
buf_wolf:
|
||||
@@ -1022,6 +1030,20 @@ align 4
|
||||
buf_chi:
|
||||
rb 13*BUF_STRUCT_SIZE
|
||||
|
||||
|
||||
|
||||
align 4
|
||||
libini_import:
|
||||
dd alib_init0
|
||||
ini_get_str dd aini_get_str
|
||||
ini_get_int dd aini_get_int
|
||||
ini_get_color dd aini_get_color
|
||||
dd 0,0
|
||||
alib_init0 db 'lib_init',0
|
||||
aini_get_str db 'ini_get_str',0
|
||||
aini_get_int db 'ini_get_int',0
|
||||
aini_get_color db 'ini_get_color',0
|
||||
|
||||
align 4
|
||||
import_libimg:
|
||||
dd alib_init1
|
||||
|
5
programs/games/nu_pogodi/trunk/nu_pogod.ini
Normal file
5
programs/games/nu_pogodi/trunk/nu_pogod.ini
Normal file
@@ -0,0 +1,5 @@
|
||||
[Files]
|
||||
displ_w=315
|
||||
displ_h=210
|
||||
[Colors]
|
||||
unit=128,0,0
|
Reference in New Issue
Block a user