Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 485 → Rev 484

/programs/demos/3dcube2/trunk/3DCUBE2.ASM
24,17 → 24,20
SCREEN_Y equ 200
 
include 'lang.inc'
include '..\..\..\macros.inc'
include 'ascl.inc'
include 'ascgl.inc'
 
include 'macros.inc'
START:
call draw_window
call init_sin_cos
 
still:
; mov eax,23 ; wait for system event with 10 ms timeout
; mov ebx,1 ; wait 10 ms, then continue
; int 0x40
 
mov eax,11
mcall
int 0x40
 
dec eax
; cmp eax,1 ; window redraw request ?
81,36 → 84,36
jmp still
key:
mov eax,2
mcall
int 0x40
jmp still
button:
mov eax,17
mcall
int 0x40
cmp ah,1
jne still
exit:
mov eax,-1
mcall
int 0x40
 
;Draw window
draw_window:
mov eax,12 ;Start
mov ebx,1
mcall
int 0x40
 
mov eax,0 ;Draw window
mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size
mov ecx,100*65536+(SCREEN_Y+26) ;y start*65536+y size
mov edx,0x13000000 ;0x03 use skinned window
mov edi,title
mcall
mov edi,header
int 0x40
 
mov eax,12 ;End
mov ebx,2
mcall
int 0x40
ret
 
title db '3D TEST SAMPLE FOR MENUETOS',0
header db '3D TEST SAMPLE FOR MENUETOS',0
 
 
; Draw faces procedure
179,7 → 182,7
mov ecx,SCREEN_X*65536+SCREEN_Y
mov edx,5*65536+22
mov ax,7
mcall
int 0x40
 
;White background
mov edi,scrbuf
575,7 → 578,7
pushad
mov eax,37
mov ebx,1
mcall
int 0x40
mov ebx,eax
shr eax,16
and ebx,0xffff