Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5154 → Rev 5153

/kernel/trunk/hid/mousedrv.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24,12 → 24,16
uglobal
;--------------------------------------
align 4
mousecount dd ?
mousedata dd ?
Y_UNDER_sub_CUR_hot_y_add_curh dw ?
Y_UNDER_subtraction_CUR_hot_y dw ?
X_UNDER_sub_CUR_hot_x_add_curh dw ?
X_UNDER_subtraction_CUR_hot_x dw ?
mousecount dd 0x0
mousedata dd 0x0
Y_UNDER_sub_CUR_hot_y_add_curh:
dw 0
Y_UNDER_subtraction_CUR_hot_y:
dw 0
X_UNDER_sub_CUR_hot_x_add_curh:
dw 0
X_UNDER_subtraction_CUR_hot_x:
dw 0
endg
 
iglobal
40,12 → 44,9
dd 3
mouse_timer_ticks dd 0
endg
 
;-----------------------------------------------------------------------------
 
align 4
draw_mouse_under:
 
; return old picture
cmp [_display.restore_cursor], 0
je @F
56,12 → 57,14
stdcall [_display.restore_cursor], eax, ebx
popad
ret
 
;--------------------------------------
align 4
@@:
pushad
xor ecx, ecx
xor edx, edx
 
;--------------------------------------
align 4
mres:
movzx eax, word [X_UNDER]
movzx ebx, word [Y_UNDER]
94,9 → 97,7
jnz mres
popad
ret
 
;-----------------------------------------------------------------------------
 
align 4
save_draw_mouse:
cmp [_display.move_cursor], 0
176,9 → 177,7
add ebx, edx
push ecx
or ecx, 0x04000000 ; don't load to mouseunder area
push eax ebx edx edi
call [GETPIXEL]
pop edi edx ebx eax
call getpixel
mov [COLOR_TEMP], ecx
pop ecx
mov eax, edx
230,9 → 229,7
add esp, 8
popad
ret
 
;-----------------------------------------------------------------------------
 
align 4
combine_colors:
; in
247,7 → 244,7
push edx
push ecx
xor ecx, ecx
; byte 0
; byte 2
mov eax, 0xff
sub al, [esi+0]
mov ebx, [esp]
301,9 → 298,7
pop ebx
pop eax
ret
 
;-----------------------------------------------------------------------------
 
align 4
check_mouse_area_for_getpixel:
; in:
346,14 → 341,13
or ecx, 0xff000000
pop ebx eax
ret
 
;--------------------------------------
align 4
.no_mouse_area:
xor ecx, ecx
pop ebx eax
ret
 
;-----------------------------------------------------------------------------
 
align 4
check_mouse_area_for_putpixel:
; in:
373,7 → 367,7
sub cx, [Y_UNDER] ; [MOUSE_Y]
mov ax, cx
shl eax, 16
 
;--------------------------------------
; check for X
mov ax, [X_UNDER] ; [MOUSE_X]
shr ecx, 16
385,7 → 379,7
; offset X
sub cx, [X_UNDER] ; [MOUSE_X]
mov ax, cx
 
;--------------------------------------
; eax = (offset y) shl 16 + (offset x)
 
pop ecx
417,15 → 411,17
add esi, 16*24*3
call combine_colors
pop edi esi
;--------------------------------------
align 4
.end:
mov eax, ecx
ret
 
;--------------------------------------
align 4
.no_mouse_area:
pop eax
ret
 
;-----------------------------------------------------------------------------
 
align 4
__sys_draw_pointer:
pushad
437,14 → 433,14
je @f
mov [redrawmouse_unconditional], 0
jmp redrawmouse
;--------------------------------------
align 4
@@:
cmp eax, ecx
jne redrawmouse
cmp ebx, edx
je nodmp
 
;--------------------------------------
 
align 4
redrawmouse:
pushfd
472,14 → 468,16
mov [X_UNDER_subtraction_CUR_hot_x], ax
add eax, [cur.w]
mov [X_UNDER_sub_CUR_hot_x_add_curh], ax
;--------------------------------------
align 4
@@:
popfd
;--------------------------------------
align 4
nodmp:
popad
ret
 
;-----------------------------------------------------------------------------
 
align 4
proc set_mouse_data stdcall uses edx, BtnState:dword, XMoving:dword, YMoving:dword, VScroll:dword, HScroll:dword
 
540,9 → 538,7
call wakeup_osloop
ret
endp
 
;-----------------------------------------------------------------------------
 
align 4
mouse_acceleration:
push eax
554,5 → 550,8
;push edx
imul eax, [mouse_speed_factor]
;pop edx
;--------------------------------------
align 4
@@:
ret
;-----------------------------------------------------------------------------