Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 485 → Rev 109

/programs/games/tanks/trunk/build_en.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm tanks.asm tanks
@erase lang.inc
@pause
/programs/games/tanks/trunk/build_ru.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm tanks.asm tanks
@erase lang.inc
@pause
/programs/games/tanks/trunk/leveledit.asm
14,7 → 14,7
START:
mov eax,40
mov ebx,111b
mcall
int 0x40
call drawwin
;main cycle(fps)
fpst:
82,7 → 82,7
call putimage
mov eax,5
mov ebx,2
mcall
int 0x40
mov eax,[black]
mov [phas],eax
call PutSprite
101,13 → 101,13
mov ebx,420*65536+30
mov ecx,425*65536+15
mov edx,0xffffff
mcall
int 0x40
mov eax,47
mov ebx,3*65536
mov ecx,[frames]
mov edx,425*65536+427
mov esi,0
mcall
int 0x40
mov [frames],0
no_frames:
;----------------------
127,14 → 127,14
mov [eax],bl;write number of shablon to the map-array
;-----------------------
;mov eax,11
;mcall
;int 0x40
mov eax,23
mov ebx,2
mcall
int 0x40
cmp eax,2
jne animation
mov eax,2
mcall
int 0x40
shr eax,8
cmp eax,32
jne key2
170,12 → 170,12
key8:cmp eax,27
jne animation
mov eax,-1
mcall
int 0x40
;-------------------------------------------
drawwin:
mov eax,12
mov ebx,1
mcall
int 0x40
;à¨á㥬 ®ª­® § ¤ ¢ ï ¢á¥ ­¥®¡å®¤¨¬ë¥ 梥â 
mov eax,0
mov ebx,50*65536+640
183,7 → 183,7
mov edx,0x02AABBCC
mov esi,0x805080d0
mov edi,0x005080d0
mcall
int 0x40
;¯¨è¥¬ § £®«®¢®ª ®ª­ 
mov eax,4
mov ebx,5*65536+5
190,7 → 190,7
mov ecx,0x10ddeeff
mov edx,name
mov esi,7
mcall
int 0x40
;à¨á㥬 ª­®¯ªã § ªàëâ¨ï ®ª­ 
mov eax,8
mov ebx,(640-19)*65536+12
197,7 → 197,7
mov ecx,5*65536+12
mov edx,1
mov esi,0x6688dd
mcall
int 0x40
ret
;----------------------------------------------------------
counter dd 0
230,7 → 230,7
;get time in 1/100 sec
clock: mov eax,26
mov ebx,9
mcall
int 0x40
mov [time],eax
ret
;---------------------------------------------------------
239,7 → 239,7
mov ebx,0x3000
mov ecx,640*65536+400
mov edx,1*65536+20
mcall
int 0x40
ret
;---------------------------------------------------------
print_pos:mov eax,13
246,19 → 246,19
mov ebx,490*65536+60
mov ecx,425*65536+15
mov edx,0xffffff
mcall
int 0x40
mov eax,47
mov ebx,3*65536
mov ecx,[x]
mov edx,495*65536+430
mov esi,0
mcall
int 0x40
mov eax,47
mov ebx,3*65536
mov ecx,[y]
mov edx,530*65536+430
mov esi,0
mcall
int 0x40
ret
;-----------------------------------------------------------
;-------------------------load files------------------------
269,7 → 269,7
;§ £à㦠¥¬ ¯¥à¢ë© ¡«®ª ¤«ï ⮣® ç⮡ë 㧭 â à §¬¥à ä ©« 
mov eax,58
mov ebx,file_read
mcall
int 0x40
;¢ëç¨á«ï¥¬ ᪮«ìª® ¡«®ª®¢ ¯® 512 ¡ ©â ­ã¦­® ¨á¯®«ì§®¢ âì
;¤«ï § £à㧪¨ ä ©« 
mov ecx,ebx
284,7 → 284,7
;§ £à㦠¥¬ ¡«®ª
mov eax,58
mov ebx,file_read
mcall
int 0x40
cmp eax,0
jne scock2
mov esi,0x3000+(640*400*3)+(16*20*20*3)
336,7 → 336,7
mov [file_write+12],dword 0x3000+(640*400*3)+(16*20*20*3);+(0x1000)
mov eax,58
mov ebx,file_write
mcall
int 0x40
cmp eax,0
jne scok
xor esi,esi
343,7 → 343,7
mov eax,55
mov ebx,eax
mov esi,sound
mcall
int 0x40
scok:
ret
;-----------------------------------------------------------------------------
363,7 → 363,7
mov [file_read+12],dword 0x3000+(640*400*3)+(16*20*20*3)
mov eax,58
mov ebx,file_read
mcall
int 0x40
mov ecx,ebx
shr ebx,9
add ebx,1
370,7 → 370,7
mov [file_read+8],ebx
mov eax,58
mov ebx,file_read
mcall
int 0x40
cmp eax,0
jne nosound
mov esi,0x3000+(640*400*3)+(16*20*20*3)
380,7 → 380,7
mov eax,55
mov ebx,55
mov esi,sound
mcall
int 0x40
xor esi,esi
mov [x_l],0
mov [y_l],0
434,13 → 434,13
mov ebx,25*65536+6
mov ecx,433*65536+12
mov edx,0xff6c58
mcall
int 0x40
opros:mov eax,10
mcall
int 0x40
cmp eax,2
jne opros
mov eax,2
mcall
int 0x40
shr eax,8
cmp eax,13
je exit_cycle
486,7 → 486,7
mov ebx,20*65536+(64*6)+5
mov ecx,430*65536+15
mov edx,0xffffff
mcall
int 0x40
ret
;---------------------------------------------------------------
print_line:
494,13 → 494,13
mov ebx,20*65536+(64*6)+5
mov ecx,430*65536+15
mov edx,0xffffff
mcall
int 0x40
mov eax,4
mov ebx,25*65536+435
mov ecx,0x1
mov edx,string
mov esi,64
mcall
int 0x40
ret
print_cursor:
mov eax,13
512,7 → 512,7
add ebx,6
mov ecx,433*65536+12
mov edx,0xff6c58
mcall
int 0x40
ret
;------------------------------------------------------------------------
string:
/programs/games/tanks/trunk/tanks.asm
4,7 → 4,6
use32
org 0x0
include 'lang.inc'
include '..\..\..\macros.inc'
db 'MENUET01'
dd 0x1
dd START
16,7 → 15,7
START:
mov eax,40
mov ebx,111b
mcall
int 0x40
;----------------------------------------------------------
;---------load all sprites from arrays to memory-----------
;----------------------------------------------------------
177,7 → 176,7
mov ebx,0x4000
mov ecx,640*65536+400
mov edx,0*65536+20
mcall
int 0x40
call menu
;----------------------------
new_level:
278,7 → 277,7
mov ebx,0x4000
mov ecx,640*65536+400
mov edx,0*65536+20
mcall
int 0x40
NoPutScreen:
;put fon
mov eax,23*4
338,7 → 337,7
;-------------------------------------------------
mov eax,23
mov ebx,3
mcall
int 0x40
cmp eax,1
jne keypressed
call drawwin
349,7 → 348,7
and [_dx],0
and [_dy],0
mov eax,2
mcall
int 0x40
shr eax,8
;---------
cmp eax,32
422,7 → 421,7
key6:cmp eax,27
jne action
mov eax,-1
mcall
int 0x40
action:
mov [SpriteInfo+72+4],dword 1
mov [SpriteInfo+72+16],dword 5 ;usal speed of tank
588,7 → 587,7
cmp [number_level],25
jne no_end_game
mov eax,-1
mcall
int 0x40
no_end_game:
jmp new_level
no_end_level:
894,25 → 893,25
mov ebx,180*65536+220
mov ecx,425*65536+17
mov edx,0xdfffff
mcall
int 0x40
mov eax,4
mov ebx,190*65536+430
mov ecx,0x1ded00;0
mov edx,Level
mov esi,5
mcall
int 0x40
mov eax,4
mov ebx,260*65536+430
mov ecx,0x3558ff
mov edx,Lifes
mov esi,5
mcall
int 0x40
mov eax,4
mov ebx,330*65536+430
mov ecx,0xf93500
mov edx,Score
mov esi,5
mcall
int 0x40
mov eax,47
mov ebx,3*65536
mov ecx,[number_level]
919,7 → 918,7
inc ecx
mov edx,225*65536+430
mov esi,0x1ded00
mcall
int 0x40
mov eax,47
mov ebx,3*65536
xor ecx,ecx
927,7 → 926,7
shr ecx,2
mov edx,295*65536+430
mov esi,0x3558ff
mcall
int 0x40
mov eax,47
mov ebx,3*65536
xor ecx,ecx
934,7 → 933,7
mov cl,byte[score]
mov edx,365*65536+430
mov esi,0xf93500
mcall
int 0x40
jmp maincycle
;----------------------------------------------------------
;-----------------end of main cycle------------------------
1035,7 → 1034,7
;get time in 1/100 sec
clock: mov eax,26
mov ebx,9
mcall
int 0x40
mov [time],eax
ret
;----------------------------------------------------------
1137,28 → 1136,28
mov ebx,1*65536+640
mov ecx,20*65536+400
mov edx,0xc6e9
mcall
int 0x40
mov eax,4
mov ebx,220*65536+190
mov ecx,0xffffff
mov edx,won1
mov esi,29
mcall
int 0x40
mov eax,4
mov ebx,220*65536+200
mov ecx,0xffffff
mov edx,won2
mov esi,29
mcall
int 0x40
mov eax,4
mov ebx,220*65536+210
mov ecx,0xffffff
mov edx,won3
mov esi,29
mcall
int 0x40
mov eax,5
mov ebx,100
mcall
int 0x40
ret
;----------------------------------------------------------
end_game:
1166,22 → 1165,22
mov ebx,0*65536+640
mov ecx,20*65536+400
mov edx,0
mcall
int 0x40
mov eax,4
mov ebx,280*65536+200
mov ecx,0xffffff
mov edx,game_over
mov esi,9
mcall
int 0x40
mov eax,5
mov ebx,150
mcall
int 0x40
ret
;----------------------------------------------------------
drawwin:
mov eax,12
mov ebx,1
mcall
int 0x40
;à¨á㥬 ®ª­® § ¤ ¢ ï ¢á¥ ­¥®¡å®¤¨¬ë¥ 梥â 
mov eax,0
mov ebx,50*65536+640
1189,7 → 1188,7
mov edx,0x03AABBCC
mov esi,0x805080d0
mov edi,0x005080d0
mcall
int 0x40
;¯¨è¥¬ § £®«®¢®ª ®ª­ 
mov eax,4
mov ebx,5*65536+5
1196,7 → 1195,7
mov ecx,0x10ffffff
mov edx,name
mov esi,42
mcall
int 0x40
ret
;----------------------------------------------------------
menu:
1205,26 → 1204,26
mov ebx,235*65536+140
mov ecx,230*65536+20
mov edx,0xed16
mcall
int 0x40
mov eax,4
mov ebx,255*65536+235
mov ecx,0xff0200
mov edx,start_menu
mov esi,11
mcall
int 0x40
mov eax,47
mov ebx,3*65536
mov ecx,[number_level]
mov edx,345*65536+235
mov esi,0xff0200
mcall
int 0x40
still:
mov eax,10
mcall
int 0x40
cmp eax,2
jne still
mov eax,2
mcall
int 0x40
shr eax,8
cmp eax,32
je start_game
1243,7 → 1242,7
cmp eax,27
jne cycle_menu
mov eax,-1
mcall
int 0x40
start_game:
ret
;----------------------------------------------------------