Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 485 → Rev 205

/programs/games/pipes/pipes.asm
13,7 → 13,6
fg3color equ 0x007F7F55
btcolor equ 0x005B6200
 
include '..\..\macros.inc'
 
use32
 
35,7 → 34,7
still:
 
mov eax,10 ; wait here for event
mcall
int 0x40
 
cmp eax,1 ; redraw request ?
je red
54,7 → 53,7
 
key: ; key
mov eax,2 ; just read it and ignore
mcall
int 0x40
jmp still
button: ; button
call get_input
65,13 → 64,13
get_input:
pusha
mov eax,17 ; get id
mcall
int 0x40
 
cmp ah,1 ; button id=1 ?
jne .noclose
 
mov eax,-1 ; close this program
mcall
int 0x40
.noclose:
cmp ah,4
jne .moderate
240,9 → 239,9
.down:
mov eax,5
mov ebx,10
mcall
int 0x40
mov eax,11
mcall
int 0x40
cmp eax,1
jne .nored
call draw_window
283,9 → 282,9
.down:
mov eax,5
mov ebx,2
mcall
int 0x40
mov eax,11
mcall
int 0x40
cmp eax,1
jne .nored
call draw_window
308,7 → 307,7
call draw_message
mov eax,5
mov ebx,500
mcall
int 0x40
mov [stat],0
inc [level]
cmp [speed],6 ;waterflowdelay < 6 ?
332,25 → 331,25
mov ebx,50 shl 16 +15
mov ecx,395 shl 16 +15
mov edx,bgcolor
mcall
int 0x40
add ebx,60 shl 16 + 20
mcall
int 0x40
add ebx,80 shl 16
mcall
int 0x40
mov eax,47
mov ebx,0x20000
mov ecx,[time]
mov edx,50*65536+398
mov esi,fg2color
mcall
int 0x40
mov ebx,0x50000
mov ecx,[score]
add edx,60 shl 16
mcall
int 0x40
mov ebx,0x20000
mov ecx,[level]
add edx,80 shl 16
mcall
int 0x40
 
popa
ret
461,11 → 460,11
mov ebx,146 shl 16 + 200
mov ecx,190 shl 16 + 40
mov edx,0x0
mcall
int 0x40
add ebx,2 shl 16 - 4
add ecx,2 shl 16 - 4
mov edx,fgcolor
mcall
int 0x40
 
cmp [stat],1
je .winmessage
475,12 → 474,12
movzx esi,byte [lbl_gameover]
mov ecx,btcolor
add ecx,0x10000000
mcall
int 0x40
add ebx,8 shl 16 +17
mov edx,lbl_yscore+1
movzx esi,byte [lbl_yscore]
mov ecx,btcolor
mcall
int 0x40
mov esi,ecx ;color
mov edx,ebx ;pos
add edx,80 shl 16
487,7 → 486,7
mov ebx,0x50000 ;type
mov ecx,[score] ;inp
mov eax,47
mcall
int 0x40
jmp .nomessage
.winmessage:
mov eax,4
496,11 → 495,11
movzx esi,byte [lbl_win]
mov ecx,btcolor
add ecx,0x10000000
mcall
int 0x40
mov ebx,152 shl 16 +217
add edx,esi
mov ecx,btcolor
mcall
int 0x40
.nomessage:
popa
ret
520,7 → 519,7
movsx edx, byte [map]
add edx,9 ;button-id = map-pos + 10;gen_image inkrements
add edx,0x50000000 ;no button image - no esi need
mcall
int 0x40
pop edx
push ebx
push ecx
527,7 → 526,7
mov eax,7
mov ebx,0x10000
mov ecx,32 shl 16 +32
mcall
int 0x40
pop ecx
pop ebx
add edx,33 shl 16
550,7 → 549,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
int 0x40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
558,8 → 557,8
mov ecx,100*65536+420 ; [y start] *65536 + [y size]
mov edx,bgcolor ; color of work area RRGGBB,8->color gl
or edx,0x13000000
mov edi,title
mcall
mov edi,header
int 0x40
 
mov eax,8
mov ebx,84*65536+72
566,13 → 565,13
mov ecx,28*65536+15
mov edx,2
mov esi,btcolor
mcall
int 0x40
add ebx,76 shl 16
inc edx
mcall
int 0x40
add ebx,76 shl 16
inc edx
mcall
int 0x40
 
mov eax,4
mov ebx,26 shl 16 +32
579,20 → 578,20
mov ecx,fgcolor
mov edx,lbl_toolbar+1
movsx esi, byte [lbl_toolbar]
mcall
int 0x40
mov ebx,18 shl 16 +398
mov edx,lbl_score+1
movsx esi, byte [lbl_score]
mcall
int 0x40
mov ebx,350 shl 16 +405
mov ecx,fg3color
mov edx,lbl_copy+1
movsx esi,byte [lbl_copy]
mcall
int 0x40
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
int 0x40
 
popa
ret
601,7 → 600,7
; DATA AREA
 
 
title db 'PIPES',0
header db 'PIPES',0
lbl_gameover:
db 19
db 'G a m e O v e r !'