Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2574 → Rev 2575

/kernel/trunk/video/cursors.inc
835,10 → 835,10
;--------------------------------------
push eax ebx
; offset X
mov ecx, [X_UNDER_subtraction_CUR_hot_x]
movzx ecx, word [X_UNDER_subtraction_CUR_hot_x]
sub eax, ecx ; x1
; offset Y
mov ecx, [Y_UNDER_subtraction_CUR_hot_y]
movzx ecx, word [Y_UNDER_subtraction_CUR_hot_y]
sub ebx, ecx ; y1
;--------------------------------------
; ebx = offset y
874,31 → 874,26
; eax = new color
;--------------------------------------
; check for Y
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
jb .no_mouse_area
 
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
jae .no_mouse_area
 
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
jb .no_mouse_area
 
rol ecx, 16
;--------------------------------------
; check for X
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
jae .no_mouse_area
 
sub cx, [X_UNDER_subtraction_CUR_hot_x]
jb .no_mouse_area
 
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
jae .no_mouse_area
ror ecx, 16
;--------------------------------------
align 4
.1:
push eax
; offset X
mov ax, [X_UNDER_subtraction_CUR_hot_x]
sub cx, ax ; x1
ror ecx, 16
; offset Y
mov ax, [Y_UNDER_subtraction_CUR_hot_y]
sub cx, ax ; y1
;--------------------------------------
; ecx = (offset x) shl 16 + (offset y)
push ebx
905,10 → 900,23
mov ebx, ecx
shr ebx, 16 ; x
and ecx, 0xffff ; y
 
cmp ecx, [cur.h]
jae @f
 
cmp ebx, [cur.w]
jb .ok
;--------------------------------------
align 4
@@:
; DEBUGF 1, "K : SHIT HAPPENS: %x %x \n", ecx,ebx
pop ebx
jmp .sh ; SORRY! SHIT HAPPENS!
;--------------------------------------
align 4
.ok:
; ecx = offset y
; ebx = offset x
mov eax, [esp + 4]
 
push ebx ecx
imul ecx, [cur.w] ;y
add ecx, ebx
948,6 → 956,10
ret
;--------------------------------------
align 4
.sh:
mov ecx, -1
;--------------------------------------
align 4
@@:
pop eax
;--------------------------------------