/programs/demos/free3d04/trunk/free3d04.asm |
---|
9,8 → 9,6 |
; Willow - greatly srinked code size by using GIF texture and FPU to calculate sine table |
; |
; !!!! Don't use GIF.INC in your apps - it's modified for FREE3D !!!! |
; |
; Heavyiron - new 0-function of drawing window from kolibri (do not work correctly with menuet) |
TEX_SIZE equ 64*64*4 |
ceil = sinus+16*1024 |
31,8 → 29,8 |
dd 0x01 ; header version |
dd START ; start of code |
dd I_END ; size of image |
dd APP_MEM;0x100000 ; memory for app |
dd APP_MEM;0x100000 ; esp |
dd APP_MEM;0x300000 ; memory for app |
dd APP_MEM;0x300000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Icon |
include 'lang.inc' |
include 'macros.inc' |
309,10 → 307,28 |
mov eax,0 ; function 0 : define and draw window |
mov ebx,50*65536+649 ; [x start] *65536 + [x size] |
mov ecx,50*65536+504 ; [y start] *65536 + [y size] |
mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
mov edi,header |
mov edx,0x02ffffff ; color of work area RRGGBB,8->color gl |
mov esi,0x80777777 ; color of grab bar RRGGBB,8->color gl |
mov edi,0x00777777 ; color of frames RRGGBB |
int 0x40 |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x00ddeeff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
; CLOSE BUTTON |
mov eax,8 ; function 8 : define and draw button |
mov ebx,(649-19)*65536+12 ; [x start] *65536 + [x size] |
mov ecx,5*65536+12 ; [y start] *65536 + [y size] |
mov edx,1 ; button id |
mov esi,0x777777 ; button color RRGGBB |
int 0x40 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
810,7 → 826,7 |
mov eax,7 |
mov ebx,0x80000 |
mov ecx,640*65536+480 |
xor edx,edx |
mov edx,5*65536+20 |
int 0x40 |
ret |
991,8 → 1007,10 |
vpy: |
dd 0x0001FFFF |
header db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D',0 |
labelt: |
db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D' |
labellen: |
sindegree dd 0.0 |
sininc dd 0.0017453292519943295769236907684886 |
sindiv dd 6553.5 |
/programs/demos/3dcube2/trunk/3DCUBE2.ASM |
---|
49,7 → 49,7 |
; cmp eax,3 ; button in buffer ? |
jz button |
fps 230,8,cl_White,cl_Black |
fps 280,8,cl_White,cl_Black |
main_loop: |
104,18 → 104,26 |
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 |
mov edx,0x03000000 ;0x03 use skinned window |
int 0x40 |
mov eax,4 ;Out Text |
mov ebx,8*65536+8 ;x start*65536+y start |
mov ecx,0x00ffffff ;color White |
mov edx,head_label |
mov esi,hl_end-head_label |
int 0x40 |
mov eax,12 ;End |
mov ebx,2 |
int 0x40 |
ret |
header db '3D TEST SAMPLE FOR MENUETOS',0 |
head_label: db "3D TEST SAMPLE FOR MENUETOS" |
hl_end: |
; Draw faces procedure |
draw_faces: |
/programs/demos/bgitest/trunk/bgitest.asm |
---|
64,7 → 64,7 |
dd START |
dd I_END |
dd 0x100000 |
dd 0x100000 |
dd 0x0cfff0 |
dd 0x0 |
not1strun dd 0x0 |
223,19 → 223,12 |
jmp still |
draw_window: |
mov eax,48 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
mov eax,12 |
mov ebx,1 |
int 0x40 |
xor eax,eax |
mov ebx,10*65536+_X*2+30 |
mov ebx,10*65536+_X*2 |
mov ecx,100*65536+_Y*2 |
mov edx,0x03261212 |
mov esi,0x805080d0 |
244,8 → 237,7 |
mov eax,4 |
mov ebx,8*65536+8 |
mov ecx,[sc.grab_text] |
or ecx,0x10000000 |
mov ecx,0x10ddeeff |
mov edx,title |
mov esi,title_end-title |
cmp [help],2 |
447,5 → 439,5 |
help db ? |
pinfo: |
times 1024 db ? |
sc system_colors |
rb 10000 ; reserve, unless process info will corrupt our fonts (why?) |
I_END: |
/programs/demos/trantest/trunk/trantest.asm |
---|
87,7 → 87,7 |
xor eax,eax ;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 ;0x13 use skinned window |
mov edx,0x13000000 ;0x33 use skinned window |
mov edi,header |
int 0x40 |
/programs/demos/bcdclk/bcdclk/bcdclk.asm |
---|
13,8 → 13,8 |
dd 0x01 |
dd START |
dd I_END |
dd 0x1000 |
dd 0x1000 |
dd 0x100000 |
dd 0x7fff0 |
dd 0x0 , 0x0 |
include "lang.inc" |
22,7 → 22,7 |
START: |
red: |
call drawwindow |
still: |
42,13 → 42,17 |
jmp still |
red: ; redraw |
call drawwindow |
jmp still |
button: |
mov al,17 ; get id |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
jne noclose |
or eax,-1 ; close this program |
mov eax,-1 ; close this program |
int 0x40 |
noclose: |
73,7 → 77,7 |
mov ebx,74*65536+10 |
mov edi,dg1 |
digitlp: |
mov ecx,10*65536+10 |
mov ecx,30*65536+10 |
xor esi,esi |
plotlp: |
xor edx,edx |
118,15 → 122,24 |
mov ebx,1 ; start redraw |
int 0x40 |
xor eax,eax ; window |
mov ebx,100*65536+107 |
mov ecx,100*65536+105 |
mov edx,0x33400088 |
mov edi,header |
mov eax,0 ; window |
mov ebx,100*65536+100 |
mov ecx,100*65536+100 |
mov edx,0x83400088 |
mov esi,0x805080d0 |
mov edi,0x000000ff |
int 0x40 |
call drawclock |
mov eax,4 ; text |
mov ebx,8*65536+8 |
mov ecx,0x10ddeeff |
mov edx,title |
mov esi,titlend-title |
int 0x40 |
mov eax,12 |
mov ebx,2 ; end redraw |
int 0x40 |
133,6 → 146,12 |
ret |
header db 'BCD Clock',0 |
I_END: |
dg1: db ? |
title: |
db 'BCD Clock' |
titlend: |
dg1: db ? |
I_END: |
/programs/demos/colorref/trunk/colorref.asm |
---|
148,9 → 148,16 |
mov eax,0 ; DRAW WINDOW |
mov ebx,1*65536+200 ; [x start] *65536 + [x size] |
mov ecx,200*65536+240 ; [y start] *65536 + [y size] |
mov edx,0x13000000 ; work area color (type II) |
mov edi,header ; frame color |
mov edx,0x03000000 ; work area color (type II) |
mov esi,0x82a0a0a0 ; grab bar color (w/glide) |
mov edi,0x82bbbbbb ; frame color |
int 0x40 |
mov eax,4 ; WINDOW LABEL |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0xeeeeee ; color of text (white) |
mov edx,prog_name ; pointer to header |
mov esi,namelen-prog_name ; text length |
int 0x40 |
call palette ; display color palette |
318,7 → 325,9 |
; ********** DATA DEFINITIONS AREA *********** |
; ********************************************* |
header db 'COLOR REFERENCE H>HELP',0 |
prog_name: |
db 'COLOR REFERENCE H>HELP' |
namelen: |
picks: |
dd 31,2 ; selected top/bot colors |
/programs/demos/cslide/trunk/cslide.asm |
---|
79,9 → 79,17 |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+200 ; [x start] *65536 + [x size] |
mov ecx,100*65536+200 ; [y start] *65536 + [y size] |
mov edx,0x13ffffff ; color of work area RRGGBB,8->color gl |
mov edi,header ; WINDOW LABEL |
mov edx,0x03ffffff ; color of work area RRGGBB,8->color gl |
mov esi,0x806688cc |
mov edi,0x006688cc |
int 0x40 |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x00ddeeff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
call draw_slider_info |
374,5 → 382,10 |
;************************************************** |
; DATA AREA |
header db 'Color Slider',0 |
I_END: |
labelt: db 'Color Slider' |
labellen: |
I_END: |
/programs/demos/movback/trunk/movback.asm |
---|
38,7 → 38,7 |
mov eax,7 |
mov ebx,virtual_screen_32 |
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y |
xor edx,edx |
mov edx,(5 shl 16)+23 |
int 0x40 |
jmp .event_loop |
50,16 → 50,22 |
xor eax,eax |
mov ebx,(100 shl 16)+(WND_SIZE_X+9) |
mov ecx,(100 shl 16)+(WND_SIZE_Y+28) |
mov edx,0x33000000 |
mov edi,header |
mov edx,0x03000000 |
int 0x40 |
mov eax,7 |
mov ebx,virtual_screen_32 |
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y |
xor edx,edx |
mov edx,(5 shl 16)+23 |
int 0x40 |
mov eax,4 |
mov ebx,0x00060006 |
mov ecx,0x10ffffff |
mov edx,window_title |
mov esi,window_title_len |
int 0x40 |
mov eax,12 |
mov ebx,2 |
int 0x40 |
160,7 → 166,9 |
delta_angle dd 0.0245436926066 ; pi/128 |
scale_sin dd 128.0 |
header db 'MoveBack',0 |
window_title: |
db 'MoveBack' |
window_title_len = $ - window_title |
UDATA |
ver_counter dd ? |
/programs/demos/plasma/trunk/plasma.asm |
---|
31,7 → 31,7 |
mov al,7 |
mov ebx,virtual_screen_32 |
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y |
xor edx,edx |
mov edx,(4 shl 16)+24 |
int 0x40 |
call rotate_pal |
jmp .event_loop |
45,17 → 45,23 |
xor eax,eax |
mov ebx,(100 shl 16)+(WND_SIZE_X+8) |
mov ecx,(100 shl 16)+(WND_SIZE_Y+25) |
mov edx,0x33000000 |
mov edi,header |
mov ecx,(100 shl 16)+(WND_SIZE_Y+28) |
mov edx,0x03000000 |
int 0x40 |
mov al,7 |
mov ebx,virtual_screen_32 |
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y |
xor edx,edx |
mov edx,(4 shl 16)+24 |
int 0x40 |
mov al,4 |
mov ebx,0x00060006 |
mov ecx,0x10ffffff |
mov edx,window_title |
mov esi,window_title_len |
int 0x40 |
pop eax |
and ebx,2 ; bit 1 is set |
int 0x40 |
161,7 → 167,9 |
DATA |
_multiplier dd 63.5 |
header db 'Plasma',0 |
window_title: |
db 'Plasma' |
window_title_len = $ - window_title |
UDATA |
_fpom32 rd 1 |
/programs/demos/timer/trunk/timer.asm |
---|
1,5 → 1,5 |
; |
; TIMER (show how much system works) |
; TIMER |
; |
; Compile with flat assembler |
; |
53,6 → 53,11 |
; ********************************************* |
draw_clock: |
mov eax, 13 ; clear area |
mov ebx, 10*65536+55 |
mov ecx, 30*65536+10 |
mov edx, [sc.work] |
int 0x40 |
mov eax, 26 ; get system counter |
mov ebx, 9 |
79,10 → 84,9 |
mov eax,47 ; HH |
mov esi,[sc.work_text] |
or esi,0x50000000 |
mov edi,[sc.work] |
or esi,0x10000000 |
mov ebx,0x00020000 |
mov edx,15*65536+5 |
mov edx,10*65536+30 |
int 0x40 |
pop eax ; MM |
118,14 → 122,32 |
int 0x40 |
; DRAW WINDOW |
xor eax,eax ; function 0 : define and draw window |
mov ebx,100*65536+100 ; [x start] *65536 + [x size] |
mov ecx,100*65536+40 ; [y start] *65536 + [y size] |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+75 ; [x start] *65536 + [x size] |
mov ecx,100*65536+45 ; [y start] *65536 + [y size] |
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl |
or edx,0x33000000 |
mov edi,header |
mov esi,[sc.grab] ; color of grab bar RRGGBB,8->color gl |
or esi,0x80000000 |
mov edi,[sc.frame] ; color of frames RRGGBB |
int 0x40 |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,6*65536+7 ; [x start] *65536 + [y start] |
mov ecx,[sc.grab_text] ; font 1 & color ( 0xF0RRGGBB ) |
or ecx,0x10000000 |
mov edx,header ; pointer to text beginning |
mov esi,header.len ; text length |
int 0x40 |
; CLOSE BUTTON |
mov eax,8 ; function 8 : define and draw button |
mov ebx,(75-16)*65536+12 ; [x start] *65536 + [x size] |
mov ecx,4*65536+12 ; [y start] *65536 + [y size] |
mov edx,1 ; button id |
mov esi,[sc.grab_button] ; button color RRGGBB |
int 0x40 |
call draw_clock |
mov eax,12 ; function 12:tell os about windowdraw |
138,9 → 160,13 |
; DATA AREA |
if lang eq ru |
header db ' ',0 |
header: |
db ' ' |
.len = $ - header |
else |
header db 'TIMER',0 |
header: |
db 'TIMER' |
.len = $ - header |
end if |
/programs/demos/transp/trunk/transp.asm |
---|
24,9 → 24,7 |
mov [procinfo.x_size], 200 |
mov [procinfo.y_start], 80 |
mov [procinfo.y_size], 300 |
call draw_window |
red: |
call get_transparent |
call draw_window ; at first, draw the window |
still: |
40,20 → 38,26 |
je key |
cmp eax,3 ; button in buffer ? |
je button |
jmp still |
red: ; redraw |
call get_transparent |
call draw_window |
jmp still |
key: ; key |
mov al,2 ; just read it and ignore |
mov eax,2 ; just read it and ignore |
int 0x40 |
jmp still |
button: ; button |
mov al,17 ; get id |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
jne noclose |
or eax,-1 ; close this program |
mov eax,-1 ; close this program |
int 0x40 |
noclose: |
71,19 → 75,29 |
mov ebx,1 ; 1, start of draw |
int 0x40 |
; DRAW WINDOW |
xor eax,eax ; function 0 : define and draw window |
mov eax,0 ; function 0 : define and draw window |
mov ebx,[procinfo.x_start] |
shl ebx,16 |
add ebx,[procinfo.x_size] |
dec ebx |
mov ecx,[procinfo.y_start] |
shl ecx,16 |
add ecx,[procinfo.y_size] |
mov edx,0x33000000 ; color of work area RRGGBB,8->color gl |
mov edi,header ; WINDOW LABEL |
dec ecx |
mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
int 0x40 |
call draw_transparent |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x10ddeeff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
; call draw_transparent |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
102,7 → 116,7 |
mov ecx,[procinfo.x_size] |
shl ecx,16 |
add ecx,[procinfo.y_size] |
xor edx,edx |
mov edx,4*65536+22 |
int 0x40 |
popa |
117,6 → 131,10 |
mov ebx,I_END |
mov ecx,-1 |
int 0x40 |
; mov eax,[I_END+34] |
; mov [x_start],eax |
; mov eax,[I_END+38] |
; mov [y_start],eax |
mov eax,14 |
int 0x40 |
150,6 → 168,8 |
mov eax,35 |
int 0x40 |
; shr eax,1 |
; and eax,0x7f7f7f |
or eax, 0x4e4e4e |
mov ebx,[esp+4] |
193,7 → 213,9 |
scx dd 640 |
header db 'Transparent',0 |
labelt: |
db 'EXAMPLE APPLICATION' |
labellen: |
I_END: |
procinfo process_information |
/programs/demos/tube/trunk/tube.asm |
---|
5,8 → 5,6 |
; Menuet port by VT |
appname equ 'TUBE - FPU' |
use32 |
org 0x0 |
15,7 → 13,7 |
dd START |
dd I_END |
dd 0x40000 |
dd 0x40000 |
dd 0x3ff00 |
dd 0,0 |
include 'macros.inc' |
49,7 → 47,7 |
cmp eax,0 |
je still |
or eax,-1 |
mov eax,-1 |
int 0x40 |
177,7 → 175,7 |
mov eax,7 |
mov ecx,320*65536+160 |
xor edx,edx |
mov edx,10*65536+27 |
mov ebx,0x10000 |
int 0x40 |
194,13 → 192,21 |
mov ebx,1 |
int 0x40 |
xor eax,eax |
mov ebx,100*65536+329 |
mov ecx,100*65536+186 |
mov edx,0x33000000 |
mov edi,header |
mov eax,0 |
mov ebx,100*65536+339 |
mov ecx,100*65536+198 |
mov edx,0x03225588 |
mov esi,0x0 |
mov esi,0x0 |
int 0x40 |
mov eax,4 |
mov ebx,8*65536+8 |
mov ecx,0xffffff |
mov edx,labeltext |
mov esi,19 |
int 0x40 |
mov eax,12 |
mov ebx,2 |
int 0x40 |
208,7 → 214,7 |
popa |
ret |
header db appname,0 |
labeltext db 'TUBE.ASM - with FPU' |
db 41,0,0xC3,0x3C |