Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1573 → Rev 1577

/programs/games/nu_pogodi/trunk/nu_pogod.asm
66,10 → 66,11
;§­ ç¥­¨ï ¨¬¥­ ¯® 㬮«ç ­¨î
ini_def_decorat_file db 'curici.png',0
ini_def_unit_file db 'wolf.png',0
ini_def_objects_file db 'eggs.png',0
;¨¬¥­  ä ©«®¢
fn_icon0 rb FILE_NAME_MAX ;¨¬ï ä ©«  á ¤¥ª®à æ¨ï¬¨
fn_icon1 rb FILE_NAME_MAX ;¨¬ï ä ©«  á ¢®«ª®¬ ¨ § ©æ¥¬
fn_icon2 db 'eggs.png',0 ;¨¬ï ä ©«  á ï©æ ¬¨
fn_icon2 rb FILE_NAME_MAX ;¨¬ï ä ©«  á ï©æ ¬¨
fn_icon3 db 'chi.png',0 ;¨¬ï ä ©«  á 樯«ïâ ¬¨
fn_font db 'font8x9.bmp',0
 
77,11 → 78,17
ini_sec_files db 'Files',0
key_file_decorat db 'file_decorat',0
key_file_unit db 'file_unit',0
key_file_objects db 'file_objects',0
key_displ_w db 'displ_w',0
key_displ_h db 'displ_h',0
key_shadow_x db 'offs_shadow_x',0
key_shadow_y db 'offs_shadow_y',0
 
ini_sec_game db 'Game',0
key_delay_a db 'delay_a',0
key_delay_b db 'delay_b',0
key_delay_min db 'delay_min',0
 
ini_sec_color db 'Colors',0
;ª«îç¨ ¤«ï áç¨â뢠­¨ï 梥⮢ ¨§ *.ini ä ©« 
key_color_fon db 'background',0
166,6 → 173,9
rb 8 ;⥪áâ á ç¨á«®¬ ¯®©¬ ­­ëå ï¨æ
count_last db 0 ;áç¥â稪 ¯à®¯ã饭­ëå ï¨æ
game_spd dd 0 ;§ ¤¥à¦ª  ¨£àë
game_delay_a dd ? ;¯¥à¢®­ ç «ì­ ï § ¤¥à¦ª  ¤«ï ¨£àë €
game_delay_b dd ? ;¯¥à¢®­ ç «ì­ ï § ¤¥à¦ª  ¤«ï ¨£àë 
game_delay_min dd ? ;¬¨­¨¬ «ì­ ï § ¤¥à¦ª 
 
;¤«ï £¥­¥à æ¨¨ á«ãç ©­ëå ç¨á¥«
rand_x dd 0
410,7 → 420,8
and ax,0xf ;ç¥à¥§ ª ¦¤ë¥ 16 ï¨æ 㬥­ìè ¥¬ ¢à¥¬ï
cmp ax,0
jne @f
cmp dword[game_spd],15 ;¬¨­¨¬ «ì­ ï § ¤¥à¦ª 
mov edi,dword[game_delay_min] ;¬¨­¨¬ «ì­ ï § ¤¥à¦ª 
cmp dword[game_spd],edi
jle @f
dec dword[game_spd]
@@:
554,21 → 565,23
mov word[eggs_count],0 ;ª®««¨ç¥á⢮ ¯®©¬ ­ëå ï¨æ
mov byte[some_text],'0'
mov byte[some_text+1],0 ;⥪áâ á ç¨á«®¬ ¯®©¬ ­­ëå ï¨æ
mov byte[count_last],0
mov byte[count_last],0 ;èâà ä­ë¥ ®çª¨
mov dword[pos_eggs],0
mov byte[zaac_status],0
 
push eax ebx
cmp dword[b],0
jne @f
mov byte[game_text+5],'€'
mov dword[game_spd],65 ;§ ¤¥à¦ª  ¨£àë
mov eax,dword[game_delay_a]
mov dword[game_spd],eax ;§ ¤¥à¦ª  ¨£àë
jmp .end_init
@@:
mov byte[game_text+5],''
mov dword[game_spd],35 ;§ ¤¥à¦ª  ¨£àë
mov eax,dword[game_delay_b]
mov dword[game_spd],eax ;§ ¤¥à¦ª  ¨£àë
.end_init:
 
push eax ebx
mcall 26,9
mov dword[rand_x],eax ;§ ¯®«­ï¥¬ 1-¥ á«ãç ©­®¥ ç¨á«®
pop ebx eax
626,11 → 639,20
mov dword[displ_h],eax
stdcall dword[ini_get_str],file_name,ini_sec_files,key_file_decorat,fn_icon0,FILE_NAME_MAX,ini_def_decorat_file
stdcall dword[ini_get_str],file_name,ini_sec_files,key_file_unit,fn_icon1,FILE_NAME_MAX,ini_def_unit_file
stdcall dword[ini_get_str],file_name,ini_sec_files,key_file_objects,fn_icon2,FILE_NAME_MAX,ini_def_objects_file
stdcall dword[ini_get_int],file_name,ini_sec_files,key_shadow_x,2
mov dword[offs_shadow_x],eax
stdcall dword[ini_get_int],file_name,ini_sec_files,key_shadow_y,2
mov dword[offs_shadow_y],eax
 
;áç¨â뢠­¨¥ ­ áâ஥ª ¢«¨ïîé¨å ­  ᪮àáâì ¨£àë
stdcall dword[ini_get_int],file_name,ini_sec_game,key_delay_a,65
mov dword[game_delay_a],eax
stdcall dword[ini_get_int],file_name,ini_sec_game,key_delay_b,35
mov dword[game_delay_b],eax
stdcall dword[ini_get_int],file_name,ini_sec_game,key_delay_min,15
mov dword[game_delay_min],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_fon,0xffffff
mov dword[color_fon],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_shadows,0xd0d0d0
647,7 → 669,9
mov ecx,3
cld
@@:
push ecx ;äã­ªæ¨ï ini_get_color ¨¬¥¥â ¯à ¢® ¬ ­ïâì ॣ¨áâà ecx
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_decorat,0x000080
pop ecx
mov dword[ebx],eax
add ebx,4
inc byte[key_color_decorat.ind]
1026,7 → 1050,7
image_data_gray dd 0 ;¯ ¬ïâì á ¢à¥¬¥­­ë¬¨ á¥à묨 ¨§®¡à ¦¥­¨ï¬¨ ¢ ä®à¬ â¥ 24-bit, ¨§ ª®â®àëå ¡ã¤ãâ ᮧ¤ ¢ âìáï âà ä à¥âë
 
run_file_70 FileInfoBlock
hed db 'Nu pogodi 20.08.10',0 ;¯®¤¯¨áì ®ª­ 
hed db 'Nu pogodi 22.08.10',0 ;¯®¤¯¨áì ®ª­ 
sc system_colors ;á¨á⥬­ë¥ 梥â 
 
align 4
/programs/games/nu_pogodi/trunk/nu_pogod.ini
3,8 → 3,13
displ_h=210
file_decorat=curici.png
file_unit=wolf.png
file_objects=eggs.png
offs_shadow_x=2
offs_shadow_y=2
[Game]
delay_a=65
delay_b=35
delay_min=15
[Colors]
background=255,255,255 ;öâåò ôîíà
shadows=200,200,200 ;öâåò òåíåé