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 22... | Line 22... | ||
22 | MAX_TRIANGLES equ 12 |
22 | MAX_TRIANGLES equ 12 |
23 | SCREEN_X equ 320 |
23 | SCREEN_X equ 320 |
24 | SCREEN_Y equ 200 |
24 | SCREEN_Y equ 200 |
Line 25... | Line 25... | ||
25 | 25 | ||
- | 26 | include 'lang.inc' |
|
26 | include 'lang.inc' |
27 | include '..\..\..\macros.inc' |
27 | include 'ascl.inc' |
28 | include 'ascl.inc' |
28 | include 'ascgl.inc' |
- | |
- | 29 | include 'ascgl.inc' |
|
29 | include 'macros.inc' |
30 | |
30 | START: |
31 | START: |
31 | call draw_window |
32 | call draw_window |
Line 32... | Line 33... | ||
32 | call init_sin_cos |
33 | call init_sin_cos |
33 | - | ||
34 | still: |
- | |
35 | ; mov eax,23 ; wait for system event with 10 ms timeout |
- | |
36 | ; mov ebx,1 ; wait 10 ms, then continue |
- | |
37 | ; int 0x40 |
34 | |
38 | 35 | still: |
|
Line 39... | Line 36... | ||
39 | mov eax,11 |
36 | mov eax,11 |
40 | int 0x40 |
37 | mcall |
41 | 38 | ||
42 | dec eax |
39 | dec eax |
Line 82... | Line 79... | ||
82 | red: |
79 | red: |
83 | call draw_window |
80 | call draw_window |
84 | jmp still |
81 | jmp still |
85 | key: |
82 | key: |
86 | mov eax,2 |
83 | mov eax,2 |
87 | int 0x40 |
84 | mcall |
88 | jmp still |
85 | jmp still |
89 | button: |
86 | button: |
90 | mov eax,17 |
87 | mov eax,17 |
91 | int 0x40 |
88 | mcall |
92 | cmp ah,1 |
89 | cmp ah,1 |
93 | jne still |
90 | jne still |
94 | exit: |
91 | exit: |
95 | mov eax,-1 |
92 | mov eax,-1 |
96 | int 0x40 |
93 | mcall |
Line 97... | Line 94... | ||
97 | 94 | ||
98 | ;Draw window |
95 | ;Draw window |
99 | draw_window: |
96 | draw_window: |
100 | mov eax,12 ;Start |
97 | mov eax,12 ;Start |
101 | mov ebx,1 |
98 | mov ebx,1 |
Line 102... | Line 99... | ||
102 | int 0x40 |
99 | mcall |
103 | 100 | ||
104 | mov eax,0 ;Draw window |
101 | mov eax,0 ;Draw window |
105 | mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size |
102 | mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size |
106 | mov ecx,100*65536+(SCREEN_Y+26) ;y start*65536+y size |
103 | mov ecx,100*65536+(SCREEN_Y+26) ;y start*65536+y size |
107 | mov edx,0x13000000 ;0x03 use skinned window |
104 | mov edx,0x13000000 ;0x03 use skinned window |
Line 108... | Line 105... | ||
108 | mov edi,header |
105 | mov edi,title |
109 | int 0x40 |
106 | mcall |
110 | 107 | ||
111 | mov eax,12 ;End |
108 | mov eax,12 ;End |
Line 112... | Line 109... | ||
112 | mov ebx,2 |
109 | mov ebx,2 |
Line 113... | Line 110... | ||
113 | int 0x40 |
110 | mcall |
Line 114... | Line 111... | ||
114 | ret |
111 | ret |
Line 180... | Line 177... | ||
180 | ;outscrbuf |
177 | ;outscrbuf |
181 | mov ebx,scrbuf |
178 | mov ebx,scrbuf |
182 | mov ecx,SCREEN_X*65536+SCREEN_Y |
179 | mov ecx,SCREEN_X*65536+SCREEN_Y |
183 | mov edx,5*65536+22 |
180 | mov edx,5*65536+22 |
184 | mov ax,7 |
181 | mov ax,7 |
185 | int 0x40 |
182 | mcall |
Line 186... | Line 183... | ||
186 | 183 | ||
187 | ;White background |
184 | ;White background |
188 | mov edi,scrbuf |
185 | mov edi,scrbuf |
189 | mov ecx,(SCREEN_X*SCREEN_Y*3)/4 |
186 | mov ecx,(SCREEN_X*SCREEN_Y*3)/4 |
Line 576... | Line 573... | ||
576 | 573 | ||
577 | translate_points: |
574 | translate_points: |
578 | pushad |
575 | pushad |
579 | mov eax,37 |
576 | mov eax,37 |
580 | mov ebx,1 |
577 | mov ebx,1 |
581 | int 0x40 |
578 | mcall |
582 | mov ebx,eax |
579 | mov ebx,eax |
583 | shr eax,16 |
580 | shr eax,16 |
584 | and ebx,0xffff |
581 | and ebx,0xffff |
585 | cmp ax,SCREEN_X |
582 | cmp ax,SCREEN_X |