Rev 109 | Rev 551 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 485 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | ;---------------------------------------- |
6 | ;---------------------------------------- |
7 | ; Compile with FASM for Menuet |
7 | ; Compile with FASM for Menuet |
8 | ;---------------------------------------- |
8 | ;---------------------------------------- |
Line 9... | Line 9... | ||
9 | 9 | ||
- | 10 | include 'lang.inc' |
|
10 | include 'lang.inc' |
11 | include '..\..\..\macros.inc' |
11 | include 'ascl.inc' |
12 | include 'ascl.inc' |
12 | include 'ascgl.inc' |
13 | include 'ascgl.inc' |
Line 13... | Line 14... | ||
13 | include 'asjc.inc' |
14 | include 'asjc.inc' |
Line 62... | Line 63... | ||
62 | 63 | ||
63 | call fast_gfx ; <-- the main engine |
64 | call fast_gfx ; <-- the main engine |
Line 64... | Line 65... | ||
64 | .no_game: |
65 | .no_game: |
65 | 66 | ||
Line 66... | Line 67... | ||
66 | mov eax,11 |
67 | mov eax,11 |
67 | int 0x40 |
68 | mcall |
68 | 69 | ||
69 | cmp eax,1 ; redraw request ? |
70 | cmp eax,1 ; redraw request ? |
Line 79... | Line 80... | ||
79 | call draw_window |
80 | call draw_window |
80 | jmp still |
81 | jmp still |
Line 81... | Line 82... | ||
81 | 82 | ||
82 | key: ; key |
83 | key: ; key |
83 | mov eax,2 ; just read it and ignore |
84 | mov eax,2 ; just read it and ignore |
84 | int 0x40 |
85 | mcall |
85 | cmp ah,key_Esc ; if Esc ? |
86 | cmp ah,key_Esc ; if Esc ? |
86 | jne .no_q |
87 | jne .no_q |
87 | mov eax,-1 |
88 | or eax,-1 |
88 | int 0x40 |
89 | mcall |
Line 89... | Line 90... | ||
89 | .no_q: |
90 | .no_q: |
90 | 91 | ||
91 | if_e dword [mode],4,.end_if6 |
92 | if_e dword [mode],4,.end_if6 |
Line 115... | Line 116... | ||
115 | 116 | ||
Line 116... | Line 117... | ||
116 | jmp still |
117 | jmp still |
117 | 118 | ||
118 | button: ; button |
119 | button: ; button |
Line 119... | Line 120... | ||
119 | mov eax,17 ; get id |
120 | mov eax,17 ; get id |
120 | int 0x40 |
121 | mcall |
Line 121... | Line 122... | ||
121 | 122 | ||
122 | cmp ah,1 ; button id=1 ? |
123 | cmp ah,1 ; button id=1 ? |
123 | jne noclose |
124 | jne noclose |
Line 124... | Line 125... | ||
124 | 125 | ||
Line 125... | Line 126... | ||
125 | mov eax,-1 ; close this program |
126 | mov eax,-1 ; close this program |
Line 137... | Line 138... | ||
137 | 138 | ||
138 | mov eax,7 |
139 | mov eax,7 |
139 | mov ebx,screen |
140 | mov ebx,screen |
140 | mov ecx,X_SIZE*65536+Y_SIZE |
141 | mov ecx,X_SIZE*65536+Y_SIZE |
141 | mov edx,4*65536+20 |
142 | mov edx,4*65536+20 |
Line 142... | Line 143... | ||
142 | int 0x40 |
143 | mcall |
143 | 144 | ||
Line 144... | Line 145... | ||
144 | pop_abc |
145 | pop_abc |
Line 456... | Line 457... | ||
456 | .g_ok: |
457 | .g_ok: |
457 | call grad_fill_screen |
458 | call grad_fill_screen |
Line 458... | Line 459... | ||
458 | 459 | ||
459 | mov eax,37 ; get mouse position |
460 | mov eax,37 ; get mouse position |
460 | mov ebx,1 |
461 | mov ebx,1 |
461 | int 0x40 |
462 | mcall |
462 | shr eax,16 |
463 | shr eax,16 |
463 | mov [x],eax |
464 | mov [x],eax |
464 | add eax,[s_x] |
465 | add eax,[s_x] |
465 | cmp eax,X_SIZE ; controls if the pad is in the screen |
466 | cmp eax,X_SIZE ; controls if the pad is in the screen |