Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 109 → Rev 485

/programs/games/pong/trunk/ascgl.inc
33,7 → 33,7
add ecx,ys
mov edx,color
mov eax,13
int 0x40
mcall
}
 
; FPS - Set Frame Per Second Display
50,7 → 50,7
spdat:
get_time:
mov eax,3
int 0x40
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
69,7 → 69,7
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
int 0x40
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
78,7 → 78,7
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
int 0x40
mcall
no_out_fps:
}
 
153,7 → 153,7
shl edx,16
add edx,arg2
end if
int 0x40
mcall
nodi:
}
 
173,7 → 173,7
shl edx,16
add edx,arg2
end if
int 0x40
mcall
}
 
;Not optimiz
451,7 → 451,7
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
mov eax,[bmp_load_area+2]
shr eax,9 ; ¯®¤¥«¨¬ ­  512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢
inc eax
458,7 → 458,7
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
 
; jmp qwe
;bmpfn db bmp_file_name
469,7 → 469,7
; mov edx,0xFFFFFF
; mov esi,bmp_load_area
; mov edi,0
; int 0x40
; mcall
 
; convert:
movzx eax,word [bmp_load_area+28]
/programs/games/pong/trunk/ascl.inc
38,7 → 38,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
54,12 → 54,12
mov edx,100
mov esi,0
mov eax,33
int 0x40
mcall
 
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
int 0x40
mcall
 
still:
scevent red,key,button
72,7 → 72,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
84,19 → 84,19
file_is_open:
mov eax,32
mov ebx,clip_file
int 0x40
mcall
jmp openoff
 
key: ; key
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
int 0x40
mcall
 
red:
call redproc
127,7 → 127,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
143,12 → 143,12
mov edx,100
mov esi,0
mov eax,33
int 0x40
mcall
 
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
int 0x40
mcall
 
still:
scevent red,key,button
161,7 → 161,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
173,19 → 173,19
file_is_open:
mov eax,32
mov ebx,clip_file
int 0x40
mcall
jmp openoff
 
key: ; key
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
int 0x40
mcall
 
red:
call redproc
272,7 → 272,7
macro scank
{
mov eax,10
int 0x40
mcall
}
 
macro putpix x,y,color
281,7 → 281,7
mov ecx,y
mov edx,color
mov eax,1
int 0x40
mcall
}
 
macro puttxt x,y,offs,size,color
293,7 → 293,7
mov edx,offs
mov esi,size
mov eax,4
int 0x40
mcall
}
 
;_ equ '____'
306,7 → 306,7
; mov ecx,y
; mov edx,color
; mov eax,1
; int 0x40
; mcall
;}
 
 
318,7 → 318,7
mov edx,x*65536+y
mov esi,color
mov eax,47
int 0x40
mcall
}
 
; SCEVENT - Scan event
326,7 → 326,7
macro scevent red,key,but
{
mov eax,11
int 0x40
mcall
dec eax
jz red
dec eax
340,7 → 340,7
macro wtevent red,key,but
{
mov eax,10
int 0x40
mcall
dec eax
jz red
dec eax
355,7 → 355,7
{
mov eax,23
mov ebx,xfps
int 0x40
mcall
cmp eax,0
je noevent
dec eax
372,7 → 372,7
macro close
{
mov eax,-1
int 0x40
mcall
}
 
; DELAY - Create delay 1/100 sec
383,7 → 383,7
{
mov eax,5
mov ebx,arg1
int 0x40
mcall
}
 
; WINDOW - Draw window
396,7 → 396,7
mov ecx,arg2*65536+arg4
mov edx,arg5
mov eax,0
int 0x40
mcall
}
 
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
407,7 → 407,7
mov esi,arg6
mov edi,arg7
mov eax,0
int 0x40
mcall
}
 
 
417,7 → 417,7
{
mov eax,12
mov ebx,1
int 0x40
mcall
}
 
; ENDWD - End window draw
426,7 → 426,7
{
mov eax,12
mov ebx,2
int 0x40
mcall
}
 
; LABEL - Put text to frame
446,7 → 446,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
;Key's
/programs/games/pong/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm pong.asm pong
@erase lang.inc
@pause
/programs/games/pong/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm pong.asm pong
@erase lang.inc
@pause
/programs/games/pong/trunk/pong.asm
21,6 → 21,7
 
 
include 'lang.inc'
include '..\..\..\macros.inc'
include 'ascl.inc'
include 'ascgl.inc'
 
43,7 → 44,7
still:
 
mov eax,11 ; scan event
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je red
58,7 → 59,7
mov ecx,[scorea]
mov edx,300*65536+8
mov esi,cl_Blue
int 0x40
mcall
out_scoreb:
mov eax,47
mov ebx,5*65536
65,7 → 66,7
mov ecx,[scoreb]
mov edx,350*65536+8
mov esi,cl_Red
int 0x40
mcall
 
del_images:
setimg dword [ply1x],dword [ply1y],img4
290,7 → 291,7
 
key: ; key
mov eax,2
int 0x40
mcall
cmp ah,key_Left
jne no_l
sub dword [ply1rx],16
316,11 → 317,11
 
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
int 0x40
mcall
noclose:
jmp still