2007-03-26 16:18:08 +04:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
2008-12-29 00:21:41 +03:00
|
|
|
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
|
2007-03-26 16:18:08 +04:00
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2007-07-27 17:52:03 +04:00
|
|
|
$Revision$
|
|
|
|
|
|
|
|
|
2006-01-06 14:46:26 +03:00
|
|
|
; check mouse
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; FB00 -> FB0F mouse memory 00 chunk count - FB0A-B x - FB0C-D y
|
|
|
|
; FB10 -> FB17 mouse color mem
|
|
|
|
; FB21 x move
|
|
|
|
; FB22 y move
|
|
|
|
; FB30 color temp
|
|
|
|
; FB28 high bits temp
|
|
|
|
; FB4A -> FB4D FB4A-B x-under - FB4C-D y-under
|
|
|
|
; FC00 -> FCFE com1/ps2 buffer
|
|
|
|
; FCFF com1/ps2 buffer count starting from FC00
|
|
|
|
|
|
|
|
uglobal
|
|
|
|
mousecount dd 0x0
|
|
|
|
mousedata dd 0x0
|
|
|
|
endg
|
|
|
|
|
2007-05-02 16:06:10 +04:00
|
|
|
iglobal
|
2008-03-13 23:23:15 +03:00
|
|
|
mouse_delay dd 10
|
2007-05-08 15:32:58 +04:00
|
|
|
mouse_speed_factor: dd 3
|
|
|
|
mouse_timer_ticks dd 0
|
2007-05-02 16:06:10 +04:00
|
|
|
endg
|
2006-08-13 17:02:57 +04:00
|
|
|
|
2008-03-13 23:23:15 +03:00
|
|
|
;include 'm_com.inc'
|
2006-01-06 14:46:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
;test_mario79:
|
|
|
|
; push esi
|
|
|
|
; push eax
|
|
|
|
; mov [write_error_to],process_test_m79+43
|
|
|
|
; movzx eax,al ;[DevErrorCode]
|
|
|
|
; call writehex
|
|
|
|
; mov esi,process_test_m79
|
|
|
|
; call sys_msg_board_str
|
|
|
|
; pop eax
|
|
|
|
; pop esi
|
|
|
|
; ret
|
|
|
|
;process_test_m79 db 'K : Process - test Mario79 error 00000000',13,10,0
|
|
|
|
|
|
|
|
draw_mouse_under:
|
2008-03-13 23:23:15 +03:00
|
|
|
; return old picture
|
|
|
|
|
|
|
|
cmp [set_hw_cursor], 0
|
|
|
|
jz @F
|
|
|
|
pushad
|
|
|
|
movzx eax,word [X_UNDER]
|
|
|
|
movzx ebx,word [Y_UNDER]
|
|
|
|
stdcall [hw_restore], eax, ebx
|
|
|
|
popad
|
|
|
|
ret
|
2006-11-20 10:06:00 +03:00
|
|
|
@@:
|
2008-03-13 23:23:15 +03:00
|
|
|
pushad
|
|
|
|
xor ecx,ecx
|
|
|
|
xor edx,edx
|
|
|
|
align 4
|
2006-08-12 19:21:53 +04:00
|
|
|
mres:
|
2008-03-13 23:23:15 +03:00
|
|
|
movzx eax,word [X_UNDER]
|
|
|
|
movzx ebx,word [Y_UNDER]
|
|
|
|
add eax,ecx
|
|
|
|
add ebx,edx
|
|
|
|
push ecx
|
|
|
|
push edx
|
|
|
|
push eax
|
|
|
|
push ebx
|
|
|
|
mov eax,edx
|
|
|
|
shl eax,6
|
|
|
|
shl ecx,2
|
|
|
|
add eax,ecx
|
|
|
|
add eax,mouseunder
|
|
|
|
mov ecx,[eax]
|
|
|
|
pop ebx
|
|
|
|
pop eax
|
|
|
|
mov edi, 1 ;force
|
|
|
|
call [putpixel]
|
|
|
|
pop edx
|
|
|
|
pop ecx
|
|
|
|
inc ecx
|
|
|
|
cmp ecx, 16
|
|
|
|
jnz mres
|
|
|
|
xor ecx, ecx
|
|
|
|
inc edx
|
|
|
|
cmp edx, 24
|
|
|
|
jnz mres
|
|
|
|
popad
|
|
|
|
ret
|
2006-01-06 14:46:26 +03:00
|
|
|
|
|
|
|
save_draw_mouse:
|
2006-11-20 10:06:00 +03:00
|
|
|
|
2008-03-13 23:23:15 +03:00
|
|
|
cmp [set_hw_cursor], 0
|
|
|
|
je .no_hw_cursor
|
|
|
|
pushad
|
2006-11-27 13:07:51 +03:00
|
|
|
|
2008-03-13 23:23:15 +03:00
|
|
|
mov [X_UNDER],ax
|
|
|
|
mov [Y_UNDER],bx
|
|
|
|
movzx eax,word [MOUSE_Y]
|
|
|
|
movzx ebx,word [MOUSE_X]
|
|
|
|
push eax
|
|
|
|
push ebx
|
2006-11-27 13:07:51 +03:00
|
|
|
|
2008-03-13 23:23:15 +03:00
|
|
|
mov ecx, [Screen_Max_X]
|
|
|
|
inc ecx
|
|
|
|
mul ecx
|
2007-03-06 00:37:28 +03:00
|
|
|
|
2008-03-13 23:23:15 +03:00
|
|
|
movzx edx, byte [display_data+ebx+eax]
|
|
|
|
shl edx, 8
|
2008-06-09 16:12:09 +04:00
|
|
|
mov esi, [edx+SLOT_BASE+APPDATA.cursor]
|
2006-12-05 11:31:44 +03:00
|
|
|
|
2008-06-09 16:12:09 +04:00
|
|
|
cmp esi, [current_cursor]
|
2008-03-13 23:23:15 +03:00
|
|
|
je .draw
|
2007-09-20 15:19:03 +04:00
|
|
|
|
2008-06-09 16:12:09 +04:00
|
|
|
; cmp [esi+CURSOR.magic], 'CURS'
|
|
|
|
; jne .fail
|
2007-09-20 15:19:03 +04:00
|
|
|
|
2008-06-09 16:12:09 +04:00
|
|
|
push esi
|
2008-03-13 23:23:15 +03:00
|
|
|
call [select_hw_cursor]
|
2008-06-09 16:12:09 +04:00
|
|
|
mov [current_cursor], esi
|
2007-09-20 15:19:03 +04:00
|
|
|
.draw:
|
2008-06-09 16:12:09 +04:00
|
|
|
stdcall [set_hw_cursor], esi
|
2008-03-13 23:23:15 +03:00
|
|
|
popad
|
|
|
|
ret
|
2006-12-05 11:31:44 +03:00
|
|
|
.fail:
|
2008-03-13 23:23:15 +03:00
|
|
|
mov ecx, [def_cursor]
|
|
|
|
mov [edx+SLOT_BASE+APPDATA.cursor], ecx
|
2008-06-09 16:12:09 +04:00
|
|
|
stdcall [set_hw_cursor], ecx ; stdcall: [esp]=ebx,eax
|
2008-03-13 23:23:15 +03:00
|
|
|
popad
|
|
|
|
ret
|
2006-12-05 11:31:44 +03:00
|
|
|
|
2007-09-20 15:19:03 +04:00
|
|
|
.no_hw_cursor:
|
2008-03-13 23:23:15 +03:00
|
|
|
pushad
|
|
|
|
; save & draw
|
|
|
|
mov [X_UNDER],ax
|
|
|
|
mov [Y_UNDER],bx
|
|
|
|
push eax
|
|
|
|
push ebx
|
|
|
|
mov ecx,0
|
|
|
|
mov edx,0
|
|
|
|
align 4
|
2006-08-12 19:21:53 +04:00
|
|
|
drm:
|
2008-03-13 23:23:15 +03:00
|
|
|
push eax
|
|
|
|
push ebx
|
|
|
|
push ecx
|
|
|
|
push edx
|
|
|
|
; helloworld
|
|
|
|
push ecx
|
|
|
|
add eax,ecx ; save picture under mouse
|
|
|
|
add ebx,edx
|
|
|
|
push ecx
|
|
|
|
call getpixel
|
|
|
|
mov [COLOR_TEMP],ecx
|
|
|
|
pop ecx
|
|
|
|
mov eax,edx
|
|
|
|
shl eax,6
|
|
|
|
shl ecx,2
|
|
|
|
add eax,ecx
|
|
|
|
add eax,mouseunder
|
|
|
|
mov ebx,[COLOR_TEMP]
|
|
|
|
mov [eax],ebx
|
|
|
|
pop ecx
|
|
|
|
mov edi,edx ; y cycle
|
|
|
|
shl edi,4 ; *16 bytes per row
|
|
|
|
add edi,ecx ; x cycle
|
|
|
|
mov esi, edi
|
|
|
|
add edi, esi
|
|
|
|
add edi, esi ; *3
|
|
|
|
add edi,[MOUSE_PICTURE] ; we have our str address
|
|
|
|
mov esi, edi
|
|
|
|
add esi, 16*24*3
|
|
|
|
push ecx
|
|
|
|
mov ecx, [COLOR_TEMP]
|
|
|
|
call combine_colors
|
|
|
|
mov [MOUSE_COLOR_MEM], ecx
|
|
|
|
pop ecx
|
|
|
|
pop edx
|
|
|
|
pop ecx
|
|
|
|
pop ebx
|
|
|
|
pop eax
|
|
|
|
add eax,ecx ; we have x coord+cycle
|
|
|
|
add ebx,edx ; and y coord+cycle
|
|
|
|
push ecx
|
|
|
|
mov ecx, [MOUSE_COLOR_MEM]
|
|
|
|
mov edi, 1
|
|
|
|
call [putpixel]
|
|
|
|
pop ecx
|
|
|
|
mov ebx,[esp+0] ; pure y coord again
|
|
|
|
mov eax,[esp+4] ; and x
|
|
|
|
inc ecx ; +1 cycle
|
|
|
|
cmp ecx,16 ; if more than 16
|
|
|
|
jnz drm
|
|
|
|
xor ecx, ecx
|
|
|
|
inc edx
|
|
|
|
cmp edx,24
|
|
|
|
jnz drm
|
|
|
|
add esp,8
|
|
|
|
popad
|
|
|
|
ret
|
2006-01-06 14:46:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
combine_colors:
|
|
|
|
; in
|
|
|
|
; ecx - color ( 00 RR GG BB )
|
|
|
|
; edi - ref to new color byte
|
|
|
|
; esi - ref to alpha byte
|
|
|
|
;
|
|
|
|
; out
|
|
|
|
; ecx - new color ( roughly (ecx*[esi]>>8)+([edi]*[esi]>>8) )
|
|
|
|
push eax
|
|
|
|
push ebx
|
|
|
|
push edx
|
|
|
|
push ecx
|
|
|
|
xor ecx, ecx
|
2008-03-13 23:23:15 +03:00
|
|
|
; byte 2
|
2006-01-06 14:46:26 +03:00
|
|
|
mov eax, 0xff
|
|
|
|
sub al, [esi+0]
|
|
|
|
mov ebx, [esp]
|
|
|
|
shr ebx, 16
|
|
|
|
and ebx, 0xff
|
|
|
|
mul ebx
|
|
|
|
shr eax, 8
|
|
|
|
add ecx, eax
|
2006-08-12 19:21:53 +04:00
|
|
|
xor eax, eax
|
|
|
|
xor ebx, ebx
|
|
|
|
mov al, [edi+0]
|
|
|
|
mov bl, [esi+0]
|
2006-01-06 14:46:26 +03:00
|
|
|
mul ebx
|
|
|
|
shr eax, 8
|
|
|
|
add ecx, eax
|
|
|
|
shl ecx, 8
|
2008-03-13 23:23:15 +03:00
|
|
|
; byte 1
|
2006-01-06 14:46:26 +03:00
|
|
|
mov eax, 0xff
|
|
|
|
sub al, [esi+1]
|
|
|
|
mov ebx, [esp]
|
|
|
|
shr ebx, 8
|
|
|
|
and ebx, 0xff
|
|
|
|
mul ebx
|
|
|
|
shr eax, 8
|
|
|
|
add ecx, eax
|
2006-08-12 19:21:53 +04:00
|
|
|
xor eax, eax
|
|
|
|
xor ebx, ebx
|
|
|
|
mov al, [edi+1]
|
|
|
|
mov bl, [esi+1]
|
2006-01-06 14:46:26 +03:00
|
|
|
mul ebx
|
|
|
|
shr eax, 8
|
|
|
|
add ecx, eax
|
|
|
|
shl ecx, 8
|
2008-03-13 23:23:15 +03:00
|
|
|
; byte 2
|
2006-01-06 14:46:26 +03:00
|
|
|
mov eax, 0xff
|
|
|
|
sub al, [esi+2]
|
|
|
|
mov ebx, [esp]
|
|
|
|
and ebx, 0xff
|
|
|
|
mul ebx
|
|
|
|
shr eax, 8
|
|
|
|
add ecx, eax
|
2006-08-12 19:21:53 +04:00
|
|
|
xor eax, eax
|
|
|
|
xor ebx, ebx
|
|
|
|
mov al, [edi+2]
|
|
|
|
mov bl, [esi+2]
|
2006-01-06 14:46:26 +03:00
|
|
|
mul ebx
|
|
|
|
shr eax, 8
|
|
|
|
add ecx, eax
|
|
|
|
pop eax
|
|
|
|
pop edx
|
|
|
|
pop ebx
|
|
|
|
pop eax
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
__sys_disable_mouse:
|
2007-03-01 23:32:19 +03:00
|
|
|
cmp dword [MOUSE_VISIBLE],dword 0
|
2006-01-13 21:30:12 +03:00
|
|
|
je @f
|
|
|
|
ret
|
2006-11-20 10:06:00 +03:00
|
|
|
@@:
|
2006-01-13 21:30:12 +03:00
|
|
|
pushad
|
2007-02-28 11:52:06 +03:00
|
|
|
cmp [CURRENT_TASK],dword 1
|
2006-01-06 14:46:26 +03:00
|
|
|
je disable_m
|
2007-02-28 11:52:06 +03:00
|
|
|
mov edx,[CURRENT_TASK]
|
2006-01-06 14:46:26 +03:00
|
|
|
shl edx,5
|
|
|
|
add edx,window_data
|
2007-03-01 23:32:19 +03:00
|
|
|
movzx eax, word [MOUSE_X]
|
|
|
|
movzx ebx, word [MOUSE_Y]
|
2008-02-22 15:38:59 +03:00
|
|
|
mov ecx,[Screen_Max_X]
|
2006-01-06 14:46:26 +03:00
|
|
|
inc ecx
|
|
|
|
imul ecx,ebx
|
|
|
|
add ecx,eax
|
|
|
|
add ecx, display_data
|
2007-02-28 11:52:06 +03:00
|
|
|
mov eax, [CURRENT_TASK]
|
2006-01-06 14:46:26 +03:00
|
|
|
movzx ebx, byte [ecx]
|
|
|
|
cmp eax,ebx
|
|
|
|
je yes_mouse_disable
|
|
|
|
movzx ebx, byte [ecx+16]
|
|
|
|
cmp eax,ebx
|
|
|
|
je yes_mouse_disable
|
2008-02-22 15:38:59 +03:00
|
|
|
mov ebx,[Screen_Max_X]
|
2006-01-06 14:46:26 +03:00
|
|
|
inc ebx
|
|
|
|
imul ebx,10
|
|
|
|
add ecx,ebx
|
|
|
|
movzx ebx, byte [ecx]
|
|
|
|
cmp eax,ebx
|
|
|
|
je yes_mouse_disable
|
|
|
|
movzx ebx, byte [ecx+16]
|
|
|
|
cmp eax,ebx
|
|
|
|
je yes_mouse_disable
|
|
|
|
jmp no_mouse_disable
|
2006-08-12 19:21:53 +04:00
|
|
|
yes_mouse_disable:
|
2007-02-28 11:52:06 +03:00
|
|
|
mov edx,[CURRENT_TASK]
|
2006-01-06 14:46:26 +03:00
|
|
|
shl edx,5
|
|
|
|
add edx,window_data
|
2007-03-01 23:32:19 +03:00
|
|
|
movzx eax, word [MOUSE_X]
|
|
|
|
movzx ebx, word [MOUSE_Y]
|
2008-03-13 23:23:15 +03:00
|
|
|
mov ecx,[edx+0] ; mouse inside the area ?
|
2008-02-15 15:28:43 +03:00
|
|
|
add eax,10
|
2006-01-06 14:46:26 +03:00
|
|
|
cmp eax,ecx
|
|
|
|
jb no_mouse_disable
|
2008-02-15 15:28:43 +03:00
|
|
|
sub eax,10
|
2006-01-06 14:46:26 +03:00
|
|
|
add ecx,[edx+8]
|
|
|
|
cmp eax,ecx
|
|
|
|
jg no_mouse_disable
|
|
|
|
mov ecx,[edx+4]
|
2008-02-15 15:28:43 +03:00
|
|
|
add ebx,14
|
2006-01-06 14:46:26 +03:00
|
|
|
cmp ebx,ecx
|
|
|
|
jb no_mouse_disable
|
2008-02-15 15:28:43 +03:00
|
|
|
sub ebx,14
|
2006-01-06 14:46:26 +03:00
|
|
|
add ecx,[edx+12]
|
|
|
|
cmp ebx,ecx
|
|
|
|
jg no_mouse_disable
|
2006-08-12 19:21:53 +04:00
|
|
|
disable_m:
|
2007-03-01 23:32:19 +03:00
|
|
|
cmp dword [MOUSE_VISIBLE],dword 0
|
2006-08-12 19:21:53 +04:00
|
|
|
jne no_mouse_disable
|
2007-03-06 00:37:28 +03:00
|
|
|
pushf
|
2006-01-13 21:30:12 +03:00
|
|
|
cli
|
2006-08-12 19:21:53 +04:00
|
|
|
call draw_mouse_under
|
2007-03-06 00:37:28 +03:00
|
|
|
popf
|
2007-03-01 23:32:19 +03:00
|
|
|
mov [MOUSE_VISIBLE],dword 1
|
2006-08-12 19:21:53 +04:00
|
|
|
no_mouse_disable:
|
2006-01-06 14:46:26 +03:00
|
|
|
popad
|
|
|
|
ret
|
|
|
|
|
|
|
|
__sys_draw_pointer:
|
2008-03-13 23:23:15 +03:00
|
|
|
cmp [mouse_pause],0
|
|
|
|
je @f
|
|
|
|
ret
|
2006-08-12 19:21:53 +04:00
|
|
|
@@:
|
2008-03-13 23:23:15 +03:00
|
|
|
push eax
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
sub eax,[MouseTickCounter]
|
|
|
|
cmp eax,1
|
|
|
|
ja @f
|
|
|
|
pop eax
|
|
|
|
ret
|
2006-08-12 19:21:53 +04:00
|
|
|
@@:
|
2008-03-13 23:23:15 +03:00
|
|
|
mov eax,[timer_ticks]
|
|
|
|
mov [MouseTickCounter],eax
|
|
|
|
pop eax
|
|
|
|
pushad
|
|
|
|
cmp dword [MOUSE_VISIBLE],dword 0 ; mouse visible ?
|
|
|
|
je chms00
|
|
|
|
mov [MOUSE_VISIBLE], dword 0
|
|
|
|
movzx ebx,word [MOUSE_Y]
|
|
|
|
movzx eax,word [MOUSE_X]
|
|
|
|
pushfd
|
|
|
|
cli
|
|
|
|
call save_draw_mouse
|
|
|
|
popfd
|
2006-08-12 19:21:53 +04:00
|
|
|
nodmu2:
|
2008-03-13 23:23:15 +03:00
|
|
|
popad
|
|
|
|
ret
|
2006-08-12 19:21:53 +04:00
|
|
|
chms00:
|
2008-03-13 23:23:15 +03:00
|
|
|
movzx ecx,word [X_UNDER]
|
|
|
|
movzx edx,word [Y_UNDER]
|
|
|
|
movzx ebx,word [MOUSE_Y]
|
|
|
|
movzx eax,word [MOUSE_X]
|
|
|
|
cmp eax,ecx
|
|
|
|
jne redrawmouse
|
|
|
|
cmp ebx,edx
|
|
|
|
jne redrawmouse
|
|
|
|
jmp nodmp
|
2006-08-12 19:21:53 +04:00
|
|
|
redrawmouse:
|
2008-03-13 23:23:15 +03:00
|
|
|
pushfd
|
|
|
|
cli
|
|
|
|
call draw_mouse_under
|
|
|
|
call save_draw_mouse
|
|
|
|
popfd
|
2006-08-12 19:21:53 +04:00
|
|
|
nodmp:
|
2008-03-13 23:23:15 +03:00
|
|
|
popad
|
|
|
|
ret
|
2006-08-12 19:21:53 +04:00
|
|
|
|
2007-05-08 15:32:58 +04:00
|
|
|
proc set_mouse_data stdcall, BtnState:dword, XMoving:dword, YMoving:dword, VScroll:dword, HScroll:dword
|
2007-09-20 15:19:03 +04:00
|
|
|
|
2007-05-08 15:32:58 +04:00
|
|
|
mov eax,[BtnState]
|
|
|
|
mov [BTN_DOWN],eax
|
|
|
|
|
|
|
|
mov eax,[XMoving]
|
|
|
|
call mouse_acceleration
|
2008-03-13 23:23:15 +03:00
|
|
|
add ax,[MOUSE_X] ;[XCoordinate]
|
2007-05-08 15:32:58 +04:00
|
|
|
cmp ax,0
|
|
|
|
jge @@M1
|
|
|
|
mov eax,0
|
|
|
|
jmp @@M2
|
|
|
|
@@M1:
|
2008-02-22 15:38:59 +03:00
|
|
|
cmp ax,[Screen_Max_X] ;ScreenLength
|
2008-03-13 23:23:15 +03:00
|
|
|
jl @@M2
|
2008-02-22 15:38:59 +03:00
|
|
|
mov ax,[Screen_Max_X] ;ScreenLength-1
|
2007-05-08 15:32:58 +04:00
|
|
|
|
|
|
|
@@M2:
|
2008-03-13 23:23:15 +03:00
|
|
|
mov [MOUSE_X],ax ;[XCoordinate]
|
2007-05-08 15:32:58 +04:00
|
|
|
|
|
|
|
mov eax,[YMoving]
|
|
|
|
neg eax
|
|
|
|
call mouse_acceleration
|
|
|
|
|
2008-03-13 23:23:15 +03:00
|
|
|
add ax,[MOUSE_Y] ;[YCoordinate]
|
2007-05-08 15:32:58 +04:00
|
|
|
cmp ax,0
|
|
|
|
jge @@M3
|
|
|
|
mov ax,0
|
|
|
|
jmp @@M4
|
|
|
|
@@M3:
|
2008-02-22 15:38:59 +03:00
|
|
|
cmp ax,[Screen_Max_Y] ;ScreenHeigth
|
2008-03-13 23:23:15 +03:00
|
|
|
jl @@M4
|
2008-02-22 15:38:59 +03:00
|
|
|
mov ax,[Screen_Max_Y] ;ScreenHeigth-1
|
2007-05-08 15:32:58 +04:00
|
|
|
|
|
|
|
@@M4:
|
2008-03-13 23:23:15 +03:00
|
|
|
mov [MOUSE_Y],ax ;[YCoordinate]
|
2007-05-08 15:32:58 +04:00
|
|
|
|
|
|
|
mov eax,[VScroll]
|
|
|
|
add [MOUSE_SCROLL_V],ax
|
2007-09-20 15:19:03 +04:00
|
|
|
|
2007-05-08 15:32:58 +04:00
|
|
|
mov eax,[HScroll]
|
|
|
|
add [MOUSE_SCROLL_H],ax
|
|
|
|
|
|
|
|
mov [mouse_active],1
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
mov [mouse_timer_ticks],eax
|
|
|
|
ret
|
|
|
|
endp
|
|
|
|
|
|
|
|
mouse_acceleration:
|
2008-03-13 23:23:15 +03:00
|
|
|
push eax
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
sub eax,[mouse_timer_ticks]
|
|
|
|
cmp eax,[mouse_delay]
|
|
|
|
pop eax
|
|
|
|
ja @f
|
|
|
|
;push edx
|
|
|
|
imul eax,[mouse_speed_factor]
|
|
|
|
;pop edx
|
2007-05-08 15:32:58 +04:00
|
|
|
@@:
|
2008-03-13 23:23:15 +03:00
|
|
|
ret
|
2007-05-08 15:32:58 +04:00
|
|
|
|