Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 316 → Rev 485

/programs/demos/3dcube2/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/3dcube2/trunk/3DCUBE2.ASM
24,20 → 24,17
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
int 0x40
mcall
 
dec eax
; cmp eax,1 ; window redraw request ?
84,36 → 81,36
jmp still
key:
mov eax,2
int 0x40
mcall
jmp still
button:
mov eax,17
int 0x40
mcall
cmp ah,1
jne still
exit:
mov eax,-1
int 0x40
mcall
 
;Draw window
draw_window:
mov eax,12 ;Start
mov ebx,1
int 0x40
mcall
 
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,header
int 0x40
mov edi,title
mcall
 
mov eax,12 ;End
mov ebx,2
int 0x40
mcall
ret
 
header db '3D TEST SAMPLE FOR MENUETOS',0
title db '3D TEST SAMPLE FOR MENUETOS',0
 
 
; Draw faces procedure
182,7 → 179,7
mov ecx,SCREEN_X*65536+SCREEN_Y
mov edx,5*65536+22
mov ax,7
int 0x40
mcall
 
;White background
mov edi,scrbuf
578,7 → 575,7
pushad
mov eax,37
mov ebx,1
int 0x40
mcall
mov ebx,eax
shr eax,16
and ebx,0xffff
/programs/demos/3dcube2/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/demos/3dcube2/trunk/ascl.inc
36,9 → 36,9
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
or 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/demos/3dcube2/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@pause
/programs/demos/3dcube2/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@pause