Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5153 → Rev 5154

/kernel/trunk/hid/mousedrv.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24,16 → 24,12
uglobal
;--------------------------------------
align 4
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
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 ?
endg
 
iglobal
44,9 → 40,12
dd 3
mouse_timer_ticks dd 0
endg
 
;-----------------------------------------------------------------------------
 
align 4
draw_mouse_under:
 
; return old picture
cmp [_display.restore_cursor], 0
je @F
57,14 → 56,12
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]
97,7 → 94,9
jnz mres
popad
ret
 
;-----------------------------------------------------------------------------
 
align 4
save_draw_mouse:
cmp [_display.move_cursor], 0
177,7 → 176,9
add ebx, edx
push ecx
or ecx, 0x04000000 ; don't load to mouseunder area
call getpixel
push eax ebx edx edi
call [GETPIXEL]
pop edi edx ebx eax
mov [COLOR_TEMP], ecx
pop ecx
mov eax, edx
229,7 → 230,9
add esp, 8
popad
ret
 
;-----------------------------------------------------------------------------
 
align 4
combine_colors:
; in
244,7 → 247,7
push edx
push ecx
xor ecx, ecx
; byte 2
; byte 0
mov eax, 0xff
sub al, [esi+0]
mov ebx, [esp]
298,7 → 301,9
pop ebx
pop eax
ret
 
;-----------------------------------------------------------------------------
 
align 4
check_mouse_area_for_getpixel:
; in:
341,13 → 346,14
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:
367,7 → 373,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
379,7 → 385,7
; offset X
sub cx, [X_UNDER] ;[MOUSE_X]
mov ax, cx
;--------------------------------------
 
; eax = (offset y) shl 16 + (offset x)
 
pop ecx
411,17 → 417,15
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
433,14 → 437,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
468,16 → 472,14
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
 
538,7 → 540,9
call wakeup_osloop
ret
endp
 
;-----------------------------------------------------------------------------
 
align 4
mouse_acceleration:
push eax
550,8 → 554,5
;push edx
imul eax, [mouse_speed_factor]
;pop edx
;--------------------------------------
align 4
@@:
ret
;-----------------------------------------------------------------------------