Rev 316 | Rev 551 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 316 | Rev 485 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | dd I_END ; size of image |
33 | dd I_END ; size of image |
34 | dd APP_MEM;0x100000 ; memory for app |
34 | dd APP_MEM;0x100000 ; memory for app |
35 | dd APP_MEM;0x100000 ; esp |
35 | dd APP_MEM;0x100000 ; esp |
36 | dd 0x0 , 0x0 ; I_Param , I_Icon |
36 | dd 0x0 , 0x0 ; I_Param , I_Icon |
37 | include 'lang.inc' |
37 | include 'lang.inc' |
38 | include 'macros.inc' |
38 | include '..\..\..\macros.inc' |
39 | COLOR_ORDER equ OTHER |
39 | COLOR_ORDER equ OTHER |
40 | include 'gif.inc' |
40 | include 'gif.inc' |
Line 41... | Line 41... | ||
41 | 41 | ||
42 | START: ; start of execution |
42 | START: ; start of execution |
Line 61... | Line 61... | ||
61 | 61 | ||
62 | gamestart: |
62 | gamestart: |
63 | ; ******* MOUSE CHECK ******* |
63 | ; ******* MOUSE CHECK ******* |
64 | ; mov eax,37 ; check mouse (use mouse over window to navigate) |
64 | ; mov eax,37 ; check mouse (use mouse over window to navigate) |
65 | ; mov ebx,2 ; check mousebuttons |
65 | ; mov ebx,2 ; check mousebuttons |
66 | ; int 0x40 |
66 | ; mcall |
67 | ; cmp eax,0 ; only use mouse when button down |
67 | ; cmp eax,0 ; only use mouse when button down |
68 | ; je noneed ; deactivated cause of disappear-bug etc. |
68 | ; je noneed ; deactivated cause of disappear-bug etc. |
69 | mov eax,37 |
69 | mov eax,37 |
70 | mov ebx,1 ; check mouseposition |
70 | mov ebx,1 ; check mouseposition |
Line 71... | Line 71... | ||
71 | int 0x40 |
71 | mcall |
72 | 72 | ||
73 | mov ebx,eax |
73 | mov ebx,eax |
74 | shr eax,16 |
74 | shr eax,16 |
Line 97... | Line 97... | ||
97 | check_refresh: |
97 | check_refresh: |
Line 98... | Line 98... | ||
98 | 98 | ||
99 | ; mov eax,23 ; wait for system event with 10 ms timeout |
99 | ; mov eax,23 ; wait for system event with 10 ms timeout |
100 | ; mov ebx,1 ; thats max 100 FPS |
100 | ; mov ebx,1 ; thats max 100 FPS |
101 | mov eax,11 ; ask no wait for full speed |
101 | mov eax,11 ; ask no wait for full speed |
Line 102... | Line 102... | ||
102 | int 0x40 |
102 | mcall |
103 | 103 | ||
104 | cmp eax,1 ; window redraw request ? |
104 | cmp eax,1 ; window redraw request ? |
105 | je red2 |
105 | je red2 |
Line 124... | Line 124... | ||
124 | call draw_stuff |
124 | call draw_stuff |
125 | jmp gamestart |
125 | jmp gamestart |
Line 126... | Line 126... | ||
126 | 126 | ||
127 | key2: ; key |
127 | key2: ; key |
128 | mov eax,2 |
128 | mov eax,2 |
129 | int 0x40 |
129 | mcall |
130 | cmp al,1 |
130 | cmp al,1 |
Line 131... | Line 131... | ||
131 | je gamestart ; keybuffer empty |
131 | je gamestart ; keybuffer empty |
132 | 132 | ||
Line 282... | Line 282... | ||
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | button2: ; button |
285 | button2: ; button |
286 | mov eax,17 ; get id |
286 | mov eax,17 ; get id |
Line 287... | Line 287... | ||
287 | int 0x40 |
287 | mcall |
288 | cmp ah,1 ; button id=1 ? |
288 | cmp ah,1 ; button id=1 ? |
289 | jne gamestart |
289 | jne gamestart |
290 | 290 | ||
Line 291... | Line 291... | ||
291 | ; eo GAME mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm |
291 | ; eo GAME mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm |
292 | finish: |
292 | finish: |
293 | mov eax,-1 ; close this program |
293 | mov eax,-1 ; close this program |
Line 301... | Line 301... | ||
301 | 301 | ||
Line 302... | Line 302... | ||
302 | draw_window: |
302 | draw_window: |
303 | 303 | ||
304 | mov eax,12 ; function 12:tell os about windowdraw |
304 | mov eax,12 ; function 12:tell os about windowdraw |
Line 305... | Line 305... | ||
305 | mov ebx,1 ; 1, start of draw |
305 | mov ebx,1 ; 1, start of draw |
306 | int 0x40 |
306 | mcall |
307 | 307 | ||
308 | ; DRAW WINDOW |
308 | ; DRAW WINDOW |
309 | mov eax,0 ; function 0 : define and draw window |
309 | mov eax,0 ; function 0 : define and draw window |
310 | mov ebx,50*65536+649 ; [x start] *65536 + [x size] |
310 | mov ebx,50*65536+649 ; [x start] *65536 + [x size] |
311 | mov ecx,50*65536+504 ; [y start] *65536 + [y size] |
311 | mov ecx,50*65536+504 ; [y start] *65536 + [y size] |
Line 312... | Line 312... | ||
312 | mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
312 | mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
313 | mov edi,header |
313 | mov edi,title |
314 | int 0x40 |
314 | mcall |
Line 315... | Line 315... | ||
315 | 315 | ||
Line 316... | Line 316... | ||
316 | mov eax,12 ; function 12:tell os about windowdraw |
316 | mov eax,12 ; function 12:tell os about windowdraw |
317 | mov ebx,2 ; 2, end of draw |
317 | mov ebx,2 ; 2, end of draw |
Line 809... | Line 809... | ||
809 | ; *********************** |
809 | ; *********************** |
810 | mov eax,7 |
810 | mov eax,7 |
811 | mov ebx,0x80000 |
811 | mov ebx,0x80000 |
812 | mov ecx,640*65536+480 |
812 | mov ecx,640*65536+480 |
813 | xor edx,edx |
813 | xor edx,edx |
814 | int 0x40 |
814 | mcall |
Line 815... | Line 815... | ||
815 | 815 | ||
Line 816... | Line 816... | ||
816 | ret |
816 | ret |
Line 989... | Line 989... | ||
989 | vpx: |
989 | vpx: |
990 | dd 0x0001FFFF ; initial player position * 0xFFFF |
990 | dd 0x0001FFFF ; initial player position * 0xFFFF |
991 | vpy: |
991 | vpy: |
992 | dd 0x0001FFFF |
992 | dd 0x0001FFFF |
Line 993... | Line 993... | ||
993 | 993 | ||
Line 994... | Line 994... | ||
994 | header db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D',0 |
994 | title db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D',0 |
995 | 995 | ||
996 | sindegree dd 0.0 |
996 | sindegree dd 0.0 |
997 | sininc dd 0.0017453292519943295769236907684886 |
997 | sininc dd 0.0017453292519943295769236907684886 |