Subversion Repositories Kolibri OS

Rev

Rev 272 | Rev 485 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 272 Rev 316
Line 7... Line 7...
7
;   Compile with FASM for Menuet (requires .INC files - see DATA Section)
7
;   Compile with FASM for Menuet (requires .INC files - see DATA Section)
8
;
8
;
9
;   Willow - greatly srinked code size by using GIF texture and FPU to calculate sine table
9
;   Willow - greatly srinked code size by using GIF texture and FPU to calculate sine table
10
;
10
;
11
;   !!!! Don't use GIF.INC in your apps - it's modified for FREE3D !!!!
11
;   !!!! Don't use GIF.INC in your apps - it's modified for FREE3D !!!!
-
 
12
;
-
 
13
;   Heavyiron - new 0-function of drawing window from kolibri (do not work correctly with menuet)
Line 12... Line 14...
12
 
14
 
13
TEX_SIZE equ 64*64*4
15
TEX_SIZE equ 64*64*4
14
ceil = sinus+16*1024
16
ceil = sinus+16*1024
15
wall = ceil+TEX_SIZE*1
17
wall = ceil+TEX_SIZE*1
Line 27... Line 29...
27
 
29
 
28
               db     'MENUET01'              ; 8 byte id
30
               db     'MENUET01'              ; 8 byte id
29
               dd     0x01                    ; header version
31
               dd     0x01                    ; header version
30
               dd     START                   ; start of code
32
               dd     START                   ; start of code
31
               dd     I_END                   ; size of image
33
               dd     I_END                   ; size of image
32
               dd     APP_MEM;0x300000                ; memory for app
34
               dd     APP_MEM;0x100000        ; memory for app
33
               dd     APP_MEM;0x300000                ; esp
35
               dd     APP_MEM;0x100000        ; esp
34
               dd     0x0 , 0x0               ; I_Param , I_Icon
36
               dd     0x0 , 0x0               ; I_Param , I_Icon
35
include 'lang.inc'
37
include 'lang.inc'
36
include 'macros.inc'
38
include 'macros.inc'
37
COLOR_ORDER equ OTHER
39
COLOR_ORDER equ OTHER
Line 305... Line 307...
305
 
307
 
306
                                   ; DRAW WINDOW
308
                                   ; DRAW WINDOW
307
    mov  eax,0                     ; function 0 : define and draw window
309
    mov  eax,0                     ; function 0 : define and draw window
308
    mov  ebx,50*65536+649         ; [x start] *65536 + [x size]
310
    mov  ebx,50*65536+649         ; [x start] *65536 + [x size]
309
    mov  ecx,50*65536+504         ; [y start] *65536 + [y size]
311
    mov  ecx,50*65536+504         ; [y start] *65536 + [y size]
310
    mov  edx,0x02ffffff            ; color of work area RRGGBB,8->color gl
-
 
311
    mov  esi,0x80777777            ; color of grab bar  RRGGBB,8->color gl
-
 
312
    mov  edi,0x00777777            ; color of frames    RRGGBB
312
    mov  edx,0x33ffffff            ; color of work area RRGGBB,8->color gl
313
    int  0x40
-
 
314
 
-
 
315
                                   ; WINDOW LABEL
-
 
316
    mov  eax,4                     ; function 4 : write text to window
-
 
317
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
-
 
318
    mov  ecx,0x00ddeeff            ; color of text RRGGBB
-
 
319
    mov  edx,labelt                ; pointer to text beginning
-
 
320
    mov  esi,labellen-labelt       ; text length
313
    mov  edi,header
Line 321... Line -...
321
    int  0x40
-
 
322
 
-
 
323
                                   ; CLOSE BUTTON
-
 
324
    mov  eax,8                     ; function 8 : define and draw button
-
 
325
    mov  ebx,(649-19)*65536+12     ; [x start] *65536 + [x size]
-
 
326
    mov  ecx,5*65536+12            ; [y start] *65536 + [y size]
-
 
327
    mov  edx,1                     ; button id
-
 
328
    mov  esi,0x777777              ; button color RRGGBB
-
 
329
    int  0x40
-
 
330
 
314
    int  0x40
331
 
315
 
332
    mov  eax,12                    ; function 12:tell os about windowdraw
316
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 333... Line 317...
333
    mov  ebx,2                     ; 2, end of draw
317
    mov  ebx,2                     ; 2, end of draw
Line 824... Line 808...
824
; **** put image !!!!!****
808
; **** put image !!!!!****
825
; ***********************
809
; ***********************
826
    mov eax,7
810
    mov eax,7
827
    mov ebx,0x80000
811
    mov ebx,0x80000
828
    mov ecx,640*65536+480
812
    mov ecx,640*65536+480
829
    mov edx,5*65536+20
813
    xor edx,edx
830
    int 0x40
814
    int 0x40
Line 831... Line 815...
831
 
815
 
Line 832... Line 816...
832
    ret
816
    ret
Line 1005... Line 989...
1005
vpx:
989
vpx:
1006
dd 0x0001FFFF ; initial player position * 0xFFFF
990
dd 0x0001FFFF ; initial player position * 0xFFFF
1007
 vpy:
991
 vpy:
1008
dd 0x0001FFFF
992
dd 0x0001FFFF
Line 1009... Line -...
1009
 
-
 
1010
labelt:
993
 
Line 1011... Line -...
1011
      db   'FISHEYE RAYCASTING ENGINE ETC. FREE3D'
-
 
1012
 
994
header    db   'FISHEYE RAYCASTING ENGINE ETC. FREE3D',0
1013
labellen:
995
 
1014
sindegree dd 0.0
996
sindegree dd 0.0
1015
sininc    dd 0.0017453292519943295769236907684886
997
sininc    dd 0.0017453292519943295769236907684886
1016
sindiv    dd 6553.5
998
sindiv    dd 6553.5