Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7648 → Rev 7647

/programs/demos/eyes/trunk/eyes.asm
5,8 → 5,12
;
; Position of "eyes" is fixed. To close "eyes" just click on them.
;
; NOTE: quite big timeout is used to disable blinking when redrawing.
; If "eyes" blink on your system, enlarge the TIMEOUT. If not, you can
; decrease it due to more realistic movement.
;
 
TIMEOUT equ 3
TIMEOUT equ 5
 
; EXECUTABLE HEADER
 
35,7 → 39,9
 
call draw_eyes ; draw those funny "eyes"
 
mcall 23,TIMEOUT ; wait for event with timeout
mov eax,23 ; wait for event with timeout
mov ebx,TIMEOUT
mcall
 
cmp eax,1 ; redraw ?
jnz no_draw
53,11 → 59,13
; EVENTS
 
key:
mcall 2 ; just read and ignore
mov eax,2 ; just read and ignore
mcall
jmp still
 
button: ; analyze button
mcall -1 ; exit
mov eax,-1 ; this is button 1 - we have only one button :-)
mcall
jmp still
 
; -====- declarations -====-
92,20 → 100,29
 
redraw_overlap: ; label for redraw event (without checkmouse)
 
mcall 12,1
mov eax,12
mov ebx,1
mcall
 
xor eax,eax ; define window
mov ebx,[win_ebx]
mov ecx,[win_ecx]
mov edx,0x11000000 ; do not draw window, just define its area
xor edx,edx
xor esi,esi
xor edi,edi
mcall
 
mcall 8,60,45,1+0x40000000 ; define closebutton
mov eax,8 ; define closebutton
mov ebx,60
mov ecx,45
mov edx,1
mcall
 
mov eax,7
mov ebx,skindata
mcall 7,,60*65536+30,15
mov ecx,60*65536+30
mov edx,15
mcall
 
mov eax,15
mov ebx,30
113,7 → 130,9
add eax,30
call draw_eye_point
 
mcall 12,2
mov eax,12
mov ebx,2
mcall
 
ret