Rev 431 | Rev 479 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 431 | Rev 473 | ||
---|---|---|---|
1 | $Revision: 431 $ |
1 | $Revision: 473 $ |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;; ;; |
3 | ;; ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 | 8 | ||
9 | ; check mouse |
9 | ; check mouse |
10 | ; |
10 | ; |
11 | ; |
11 | ; |
12 | ; FB00 -> FB0F mouse memory 00 chunk count - FB0A-B x - FB0C-D y |
12 | ; FB00 -> FB0F mouse memory 00 chunk count - FB0A-B x - FB0C-D y |
13 | ; FB10 -> FB17 mouse color mem |
13 | ; FB10 -> FB17 mouse color mem |
14 | ; FB21 x move |
14 | ; FB21 x move |
15 | ; FB22 y move |
15 | ; FB22 y move |
16 | ; FB30 color temp |
16 | ; FB30 color temp |
17 | ; FB28 high bits temp |
17 | ; FB28 high bits temp |
18 | ; FB4A -> FB4D FB4A-B x-under - FB4C-D y-under |
18 | ; FB4A -> FB4D FB4A-B x-under - FB4C-D y-under |
19 | ; FC00 -> FCFE com1/ps2 buffer |
19 | ; FC00 -> FCFE com1/ps2 buffer |
20 | ; FCFF com1/ps2 buffer count starting from FC00 |
20 | ; FCFF com1/ps2 buffer count starting from FC00 |
21 | 21 | ||
22 | uglobal |
22 | uglobal |
23 | mousecount dd 0x0 |
23 | mousecount dd 0x0 |
24 | mousedata dd 0x0 |
24 | mousedata dd 0x0 |
25 | endg |
25 | endg |
- | 26 | ||
26 | 27 | iglobal |
|
27 | mouse_delay dd 10 |
28 | mouse_delay dd 10 |
- | 29 | mouse_speed_factor dw 3 |
|
28 | mouse_speed_factor dw 3 |
30 | endg |
29 | - | ||
30 | include 'm_ps2.inc' |
31 | |
31 | include 'm_com1.inc' |
32 | include 'm_ps2.inc' |
32 | include 'm_com2.inc' |
33 | include 'm_com.inc' |
33 | 34 | ||
34 | 35 | ||
35 | ;test_mario79: |
36 | ;test_mario79: |
36 | ; push esi |
37 | ; push esi |
37 | ; push eax |
38 | ; push eax |
38 | ; mov [write_error_to],process_test_m79+43 |
39 | ; mov [write_error_to],process_test_m79+43 |
39 | ; movzx eax,al ;[DevErrorCode] |
40 | ; movzx eax,al ;[DevErrorCode] |
40 | ; call writehex |
41 | ; call writehex |
41 | ; mov esi,process_test_m79 |
42 | ; mov esi,process_test_m79 |
42 | ; call sys_msg_board_str |
43 | ; call sys_msg_board_str |
43 | ; pop eax |
44 | ; pop eax |
44 | ; pop esi |
45 | ; pop esi |
45 | ; ret |
46 | ; ret |
46 | ;process_test_m79 db 'K : Process - test Mario79 error 00000000',13,10,0 |
47 | ;process_test_m79 db 'K : Process - test Mario79 error 00000000',13,10,0 |
47 | 48 | ||
48 | draw_mouse_under: |
49 | draw_mouse_under: |
49 | ; return old picture |
50 | ; return old picture |
50 | 51 | ||
51 | cmp [set_hw_cursor], 0 |
52 | cmp [set_hw_cursor], 0 |
52 | jz @F |
53 | jz @F |
53 | pushad |
54 | pushad |
54 | movzx eax,word [X_UNDER] |
55 | movzx eax,word [X_UNDER] |
55 | movzx ebx,word [Y_UNDER] |
56 | movzx ebx,word [Y_UNDER] |
56 | stdcall [hw_restore], eax, ebx |
57 | stdcall [hw_restore], eax, ebx |
57 | popad |
58 | popad |
58 | ret |
59 | ret |
59 | @@: |
60 | @@: |
60 | pushad |
61 | pushad |
61 | xor ecx,ecx |
62 | xor ecx,ecx |
62 | xor edx,edx |
63 | xor edx,edx |
63 | align 4 |
64 | align 4 |
64 | mres: |
65 | mres: |
65 | movzx eax,word [X_UNDER] |
66 | movzx eax,word [X_UNDER] |
66 | movzx ebx,word [Y_UNDER] |
67 | movzx ebx,word [Y_UNDER] |
67 | add eax,ecx |
68 | add eax,ecx |
68 | add ebx,edx |
69 | add ebx,edx |
69 | push ecx |
70 | push ecx |
70 | push edx |
71 | push edx |
71 | push eax |
72 | push eax |
72 | push ebx |
73 | push ebx |
73 | mov eax,edx |
74 | mov eax,edx |
74 | shl eax,6 |
75 | shl eax,6 |
75 | shl ecx,2 |
76 | shl ecx,2 |
76 | add eax,ecx |
77 | add eax,ecx |
77 | add eax,mouseunder |
78 | add eax,mouseunder |
78 | mov ecx,[eax] |
79 | mov ecx,[eax] |
79 | pop ebx |
80 | pop ebx |
80 | pop eax |
81 | pop eax |
81 | mov edi, 1 ;force |
82 | mov edi, 1 ;force |
82 | call [putpixel] |
83 | call [putpixel] |
83 | pop edx |
84 | pop edx |
84 | pop ecx |
85 | pop ecx |
85 | inc ecx |
86 | inc ecx |
86 | cmp ecx, 16 |
87 | cmp ecx, 16 |
87 | jnz mres |
88 | jnz mres |
88 | xor ecx, ecx |
89 | xor ecx, ecx |
89 | inc edx |
90 | inc edx |
90 | cmp edx, 24 |
91 | cmp edx, 24 |
91 | jnz mres |
92 | jnz mres |
92 | popad |
93 | popad |
93 | ret |
94 | ret |
94 | 95 | ||
95 | save_draw_mouse: |
96 | save_draw_mouse: |
96 | 97 | ||
97 | cmp [set_hw_cursor], 0 |
98 | cmp [set_hw_cursor], 0 |
98 | jz @F |
99 | jz @F |
99 | pushad |
100 | pushad |
100 | 101 | ||
101 | mov [X_UNDER],ax |
102 | mov [X_UNDER],ax |
102 | mov [Y_UNDER],bx |
103 | mov [Y_UNDER],bx |
103 | movzx eax,word [MOUSE_Y] |
104 | movzx eax,word [MOUSE_Y] |
104 | movzx ebx,word [MOUSE_X] |
105 | movzx ebx,word [MOUSE_X] |
105 | push eax |
106 | push eax |
106 | push ebx |
107 | push ebx |
107 | 108 | ||
108 | mov ecx, [ScreenWidth] |
109 | mov ecx, [ScreenWidth] |
109 | inc ecx |
110 | inc ecx |
110 | mul ecx |
111 | mul ecx |
111 | 112 | ||
112 | movzx edx, byte [display_data+ebx+eax] |
113 | movzx edx, byte [display_data+ebx+eax] |
113 | shl edx, 8 |
114 | shl edx, 8 |
114 | mov ecx, [edx+SLOT_BASE+APPDATA.cursor] |
115 | mov ecx, [edx+SLOT_BASE+APPDATA.cursor] |
115 | 116 | ||
116 | cmp [ecx+CURSOR.magic], 'CURS' |
117 | cmp [ecx+CURSOR.magic], 'CURS' |
117 | jne .fail |
118 | jne .fail |
118 | ; cmp [ecx+CURSOR.size], CURSOR_SIZE |
119 | ; cmp [ecx+CURSOR.size], CURSOR_SIZE |
119 | ; jne .fail |
120 | ; jne .fail |
120 | push ecx |
121 | push ecx |
121 | call [set_hw_cursor] |
122 | call [set_hw_cursor] |
122 | popad |
123 | popad |
123 | ret |
124 | ret |
124 | .fail: |
125 | .fail: |
125 | mov ecx, [def_cursor] |
126 | mov ecx, [def_cursor] |
126 | mov [edx+SLOT_BASE+APPDATA.cursor], ecx |
127 | mov [edx+SLOT_BASE+APPDATA.cursor], ecx |
127 | push ecx |
128 | push ecx |
128 | call [set_hw_cursor] |
129 | call [set_hw_cursor] |
129 | popad |
130 | popad |
130 | ret |
131 | ret |
131 | 132 | ||
132 | @@: |
133 | @@: |
133 | pushad |
134 | pushad |
134 | ; save & draw |
135 | ; save & draw |
135 | mov [X_UNDER],ax |
136 | mov [X_UNDER],ax |
136 | mov [Y_UNDER],bx |
137 | mov [Y_UNDER],bx |
137 | push eax |
138 | push eax |
138 | push ebx |
139 | push ebx |
139 | mov ecx,0 |
140 | mov ecx,0 |
140 | mov edx,0 |
141 | mov edx,0 |
141 | align 4 |
142 | align 4 |
142 | drm: |
143 | drm: |
143 | push eax |
144 | push eax |
144 | push ebx |
145 | push ebx |
145 | push ecx |
146 | push ecx |
146 | push edx |
147 | push edx |
147 | ; helloworld |
148 | ; helloworld |
148 | push ecx |
149 | push ecx |
149 | add eax,ecx ; save picture under mouse |
150 | add eax,ecx ; save picture under mouse |
150 | add ebx,edx |
151 | add ebx,edx |
151 | push ecx |
152 | push ecx |
152 | call getpixel |
153 | call getpixel |
153 | mov [COLOR_TEMP],ecx |
154 | mov [COLOR_TEMP],ecx |
154 | pop ecx |
155 | pop ecx |
155 | mov eax,edx |
156 | mov eax,edx |
156 | shl eax,6 |
157 | shl eax,6 |
157 | shl ecx,2 |
158 | shl ecx,2 |
158 | add eax,ecx |
159 | add eax,ecx |
159 | add eax,mouseunder |
160 | add eax,mouseunder |
160 | mov ebx,[COLOR_TEMP] |
161 | mov ebx,[COLOR_TEMP] |
161 | mov [eax],ebx |
162 | mov [eax],ebx |
162 | pop ecx |
163 | pop ecx |
163 | mov edi,edx ; y cycle |
164 | mov edi,edx ; y cycle |
164 | shl edi,4 ; *16 bytes per row |
165 | shl edi,4 ; *16 bytes per row |
165 | add edi,ecx ; x cycle |
166 | add edi,ecx ; x cycle |
166 | mov esi, edi |
167 | mov esi, edi |
167 | add edi, esi |
168 | add edi, esi |
168 | add edi, esi ; *3 |
169 | add edi, esi ; *3 |
169 | add edi,[MOUSE_PICTURE] ; we have our str address |
170 | add edi,[MOUSE_PICTURE] ; we have our str address |
170 | mov esi, edi |
171 | mov esi, edi |
171 | add esi, 16*24*3 |
172 | add esi, 16*24*3 |
172 | push ecx |
173 | push ecx |
173 | mov ecx, [COLOR_TEMP] |
174 | mov ecx, [COLOR_TEMP] |
174 | call combine_colors |
175 | call combine_colors |
175 | mov [MOUSE_COLOR_MEM], ecx |
176 | mov [MOUSE_COLOR_MEM], ecx |
176 | pop ecx |
177 | pop ecx |
177 | pop edx |
178 | pop edx |
178 | pop ecx |
179 | pop ecx |
179 | pop ebx |
180 | pop ebx |
180 | pop eax |
181 | pop eax |
181 | add eax,ecx ; we have x coord+cycle |
182 | add eax,ecx ; we have x coord+cycle |
182 | add ebx,edx ; and y coord+cycle |
183 | add ebx,edx ; and y coord+cycle |
183 | push ecx |
184 | push ecx |
184 | mov ecx, [MOUSE_COLOR_MEM] |
185 | mov ecx, [MOUSE_COLOR_MEM] |
185 | mov edi, 1 |
186 | mov edi, 1 |
186 | call [putpixel] |
187 | call [putpixel] |
187 | pop ecx |
188 | pop ecx |
188 | mov ebx,[esp+0] ; pure y coord again |
189 | mov ebx,[esp+0] ; pure y coord again |
189 | mov eax,[esp+4] ; and x |
190 | mov eax,[esp+4] ; and x |
190 | inc ecx ; +1 cycle |
191 | inc ecx ; +1 cycle |
191 | cmp ecx,16 ; if more than 16 |
192 | cmp ecx,16 ; if more than 16 |
192 | jnz drm |
193 | jnz drm |
193 | xor ecx, ecx |
194 | xor ecx, ecx |
194 | inc edx |
195 | inc edx |
195 | cmp edx,24 |
196 | cmp edx,24 |
196 | jnz drm |
197 | jnz drm |
197 | add esp,8 |
198 | add esp,8 |
198 | popad |
199 | popad |
199 | ret |
200 | ret |
200 | 201 | ||
201 | 202 | ||
202 | combine_colors: |
203 | combine_colors: |
203 | ; in |
204 | ; in |
204 | ; ecx - color ( 00 RR GG BB ) |
205 | ; ecx - color ( 00 RR GG BB ) |
205 | ; edi - ref to new color byte |
206 | ; edi - ref to new color byte |
206 | ; esi - ref to alpha byte |
207 | ; esi - ref to alpha byte |
207 | ; |
208 | ; |
208 | ; out |
209 | ; out |
209 | ; ecx - new color ( roughly (ecx*[esi]>>8)+([edi]*[esi]>>8) ) |
210 | ; ecx - new color ( roughly (ecx*[esi]>>8)+([edi]*[esi]>>8) ) |
210 | push eax |
211 | push eax |
211 | push ebx |
212 | push ebx |
212 | push edx |
213 | push edx |
213 | push ecx |
214 | push ecx |
214 | xor ecx, ecx |
215 | xor ecx, ecx |
215 | ; byte 2 |
216 | ; byte 2 |
216 | mov eax, 0xff |
217 | mov eax, 0xff |
217 | sub al, [esi+0] |
218 | sub al, [esi+0] |
218 | mov ebx, [esp] |
219 | mov ebx, [esp] |
219 | shr ebx, 16 |
220 | shr ebx, 16 |
220 | and ebx, 0xff |
221 | and ebx, 0xff |
221 | mul ebx |
222 | mul ebx |
222 | shr eax, 8 |
223 | shr eax, 8 |
223 | add ecx, eax |
224 | add ecx, eax |
224 | xor eax, eax |
225 | xor eax, eax |
225 | xor ebx, ebx |
226 | xor ebx, ebx |
226 | mov al, [edi+0] |
227 | mov al, [edi+0] |
227 | mov bl, [esi+0] |
228 | mov bl, [esi+0] |
228 | mul ebx |
229 | mul ebx |
229 | shr eax, 8 |
230 | shr eax, 8 |
230 | add ecx, eax |
231 | add ecx, eax |
231 | shl ecx, 8 |
232 | shl ecx, 8 |
232 | ; byte 1 |
233 | ; byte 1 |
233 | mov eax, 0xff |
234 | mov eax, 0xff |
234 | sub al, [esi+1] |
235 | sub al, [esi+1] |
235 | mov ebx, [esp] |
236 | mov ebx, [esp] |
236 | shr ebx, 8 |
237 | shr ebx, 8 |
237 | and ebx, 0xff |
238 | and ebx, 0xff |
238 | mul ebx |
239 | mul ebx |
239 | shr eax, 8 |
240 | shr eax, 8 |
240 | add ecx, eax |
241 | add ecx, eax |
241 | xor eax, eax |
242 | xor eax, eax |
242 | xor ebx, ebx |
243 | xor ebx, ebx |
243 | mov al, [edi+1] |
244 | mov al, [edi+1] |
244 | mov bl, [esi+1] |
245 | mov bl, [esi+1] |
245 | mul ebx |
246 | mul ebx |
246 | shr eax, 8 |
247 | shr eax, 8 |
247 | add ecx, eax |
248 | add ecx, eax |
248 | shl ecx, 8 |
249 | shl ecx, 8 |
249 | ; byte 2 |
250 | ; byte 2 |
250 | mov eax, 0xff |
251 | mov eax, 0xff |
251 | sub al, [esi+2] |
252 | sub al, [esi+2] |
252 | mov ebx, [esp] |
253 | mov ebx, [esp] |
253 | and ebx, 0xff |
254 | and ebx, 0xff |
254 | mul ebx |
255 | mul ebx |
255 | shr eax, 8 |
256 | shr eax, 8 |
256 | add ecx, eax |
257 | add ecx, eax |
257 | xor eax, eax |
258 | xor eax, eax |
258 | xor ebx, ebx |
259 | xor ebx, ebx |
259 | mov al, [edi+2] |
260 | mov al, [edi+2] |
260 | mov bl, [esi+2] |
261 | mov bl, [esi+2] |
261 | mul ebx |
262 | mul ebx |
262 | shr eax, 8 |
263 | shr eax, 8 |
263 | add ecx, eax |
264 | add ecx, eax |
264 | pop eax |
265 | pop eax |
265 | pop edx |
266 | pop edx |
266 | pop ebx |
267 | pop ebx |
267 | pop eax |
268 | pop eax |
268 | ret |
269 | ret |
269 | 270 | ||
270 | 271 | ||
271 | __sys_disable_mouse: |
272 | __sys_disable_mouse: |
272 | cmp dword [MOUSE_VISIBLE],dword 0 |
273 | cmp dword [MOUSE_VISIBLE],dword 0 |
273 | je @f |
274 | je @f |
274 | ret |
275 | ret |
275 | @@: |
276 | @@: |
276 | pushad |
277 | pushad |
277 | cmp [CURRENT_TASK],dword 1 |
278 | cmp [CURRENT_TASK],dword 1 |
278 | je disable_m |
279 | je disable_m |
279 | mov edx,[CURRENT_TASK] |
280 | mov edx,[CURRENT_TASK] |
280 | shl edx,5 |
281 | shl edx,5 |
281 | add edx,window_data |
282 | add edx,window_data |
282 | movzx eax, word [MOUSE_X] |
283 | movzx eax, word [MOUSE_X] |
283 | movzx ebx, word [MOUSE_Y] |
284 | movzx ebx, word [MOUSE_Y] |
284 | mov ecx,[ScreenWidth] |
285 | mov ecx,[ScreenWidth] |
285 | inc ecx |
286 | inc ecx |
286 | imul ecx,ebx |
287 | imul ecx,ebx |
287 | add ecx,eax |
288 | add ecx,eax |
288 | add ecx, display_data |
289 | add ecx, display_data |
289 | mov eax, [CURRENT_TASK] |
290 | mov eax, [CURRENT_TASK] |
290 | movzx ebx, byte [ecx] |
291 | movzx ebx, byte [ecx] |
291 | cmp eax,ebx |
292 | cmp eax,ebx |
292 | je yes_mouse_disable |
293 | je yes_mouse_disable |
293 | movzx ebx, byte [ecx+16] |
294 | movzx ebx, byte [ecx+16] |
294 | cmp eax,ebx |
295 | cmp eax,ebx |
295 | je yes_mouse_disable |
296 | je yes_mouse_disable |
296 | mov ebx,[ScreenWidth] |
297 | mov ebx,[ScreenWidth] |
297 | inc ebx |
298 | inc ebx |
298 | imul ebx,10 |
299 | imul ebx,10 |
299 | add ecx,ebx |
300 | add ecx,ebx |
300 | movzx ebx, byte [ecx] |
301 | movzx ebx, byte [ecx] |
301 | cmp eax,ebx |
302 | cmp eax,ebx |
302 | je yes_mouse_disable |
303 | je yes_mouse_disable |
303 | movzx ebx, byte [ecx+16] |
304 | movzx ebx, byte [ecx+16] |
304 | cmp eax,ebx |
305 | cmp eax,ebx |
305 | je yes_mouse_disable |
306 | je yes_mouse_disable |
306 | jmp no_mouse_disable |
307 | jmp no_mouse_disable |
307 | yes_mouse_disable: |
308 | yes_mouse_disable: |
308 | mov edx,[CURRENT_TASK] |
309 | mov edx,[CURRENT_TASK] |
309 | shl edx,5 |
310 | shl edx,5 |
310 | add edx,window_data |
311 | add edx,window_data |
311 | movzx eax, word [MOUSE_X] |
312 | movzx eax, word [MOUSE_X] |
312 | movzx ebx, word [MOUSE_Y] |
313 | movzx ebx, word [MOUSE_Y] |
313 | mov ecx,[edx+0] ; mouse inside the area ? |
314 | mov ecx,[edx+0] ; mouse inside the area ? |
314 | add eax,14 |
315 | add eax,14 |
315 | cmp eax,ecx |
316 | cmp eax,ecx |
316 | jb no_mouse_disable |
317 | jb no_mouse_disable |
317 | sub eax,14 |
318 | sub eax,14 |
318 | add ecx,[edx+8] |
319 | add ecx,[edx+8] |
319 | cmp eax,ecx |
320 | cmp eax,ecx |
320 | jg no_mouse_disable |
321 | jg no_mouse_disable |
321 | mov ecx,[edx+4] |
322 | mov ecx,[edx+4] |
322 | add ebx,20 |
323 | add ebx,20 |
323 | cmp ebx,ecx |
324 | cmp ebx,ecx |
324 | jb no_mouse_disable |
325 | jb no_mouse_disable |
325 | sub ebx,20 |
326 | sub ebx,20 |
326 | add ecx,[edx+12] |
327 | add ecx,[edx+12] |
327 | cmp ebx,ecx |
328 | cmp ebx,ecx |
328 | jg no_mouse_disable |
329 | jg no_mouse_disable |
329 | disable_m: |
330 | disable_m: |
330 | cmp dword [MOUSE_VISIBLE],dword 0 |
331 | cmp dword [MOUSE_VISIBLE],dword 0 |
331 | jne no_mouse_disable |
332 | jne no_mouse_disable |
332 | pushf |
333 | pushf |
333 | cli |
334 | cli |
334 | call draw_mouse_under |
335 | call draw_mouse_under |
335 | popf |
336 | popf |
336 | mov [MOUSE_VISIBLE],dword 1 |
337 | mov [MOUSE_VISIBLE],dword 1 |
337 | no_mouse_disable: |
338 | no_mouse_disable: |
338 | popad |
339 | popad |
339 | ret |
340 | ret |
340 | 341 | ||
341 | __sys_draw_pointer: |
342 | __sys_draw_pointer: |
342 | cmp [mouse_pause],0 |
343 | cmp [mouse_pause],0 |
343 | je @f |
344 | je @f |
344 | ret |
345 | ret |
345 | @@: |
346 | @@: |
346 | push eax |
347 | push eax |
347 | mov eax,[timer_ticks] |
348 | mov eax,[timer_ticks] |
348 | sub eax,[MouseTickCounter] |
349 | sub eax,[MouseTickCounter] |
349 | cmp eax,1 |
350 | cmp eax,1 |
350 | ja @f |
351 | ja @f |
351 | pop eax |
352 | pop eax |
352 | ret |
353 | ret |
353 | @@: |
354 | @@: |
354 | mov eax,[timer_ticks] |
355 | mov eax,[timer_ticks] |
355 | mov [MouseTickCounter],eax |
356 | mov [MouseTickCounter],eax |
356 | pop eax |
357 | pop eax |
357 | pushad |
358 | pushad |
358 | cmp dword [MOUSE_VISIBLE],dword 0 ; mouse visible ? |
359 | cmp dword [MOUSE_VISIBLE],dword 0 ; mouse visible ? |
359 | je chms00 |
360 | je chms00 |
360 | mov [MOUSE_VISIBLE], dword 0 |
361 | mov [MOUSE_VISIBLE], dword 0 |
361 | movzx ebx,word [MOUSE_Y] |
362 | movzx ebx,word [MOUSE_Y] |
362 | movzx eax,word [MOUSE_X] |
363 | movzx eax,word [MOUSE_X] |
363 | pushfd |
364 | pushfd |
364 | cli |
365 | cli |
365 | call save_draw_mouse |
366 | call save_draw_mouse |
366 | popfd |
367 | popfd |
367 | nodmu2: |
368 | nodmu2: |
368 | popad |
369 | popad |
369 | ret |
370 | ret |
370 | chms00: |
371 | chms00: |
371 | movzx ecx,word [X_UNDER] |
372 | movzx ecx,word [X_UNDER] |
372 | movzx edx,word [Y_UNDER] |
373 | movzx edx,word [Y_UNDER] |
373 | movzx ebx,word [MOUSE_Y] |
374 | movzx ebx,word [MOUSE_Y] |
374 | movzx eax,word [MOUSE_X] |
375 | movzx eax,word [MOUSE_X] |
375 | cmp eax,ecx |
376 | cmp eax,ecx |
376 | jne redrawmouse |
377 | jne redrawmouse |
377 | cmp ebx,edx |
378 | cmp ebx,edx |
378 | jne redrawmouse |
379 | jne redrawmouse |
379 | jmp nodmp |
380 | jmp nodmp |
380 | redrawmouse: |
381 | redrawmouse: |
381 | pushfd |
382 | pushfd |
382 | cli |
383 | cli |
383 | call draw_mouse_under |
384 | call draw_mouse_under |
384 | call save_draw_mouse |
385 | call save_draw_mouse |
385 | popfd |
386 | popfd |
386 | nodmp: |
387 | nodmp: |
387 | popad |
388 | popad |
388 | ret |
389 | ret |