Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 109 → Rev 485

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