Subversion Repositories Kolibri OS

Rev

Rev 2503 | Rev 2576 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2503 Rev 2575
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 2503 $
8
$Revision: 2575 $
9
 
9
 
10
 
10
 
Line 833... Line 833...
833
        cmp     ax, [X_UNDER_sub_CUR_hot_x_add_curh]
833
        cmp     ax, [X_UNDER_sub_CUR_hot_x_add_curh]
834
        jae     .no_mouse_area
834
        jae     .no_mouse_area
835
;--------------------------------------
835
;--------------------------------------
836
        push    eax ebx
836
        push    eax ebx
837
; offset X
837
; offset X
838
        mov     ecx, [X_UNDER_subtraction_CUR_hot_x]
838
        movzx   ecx, word [X_UNDER_subtraction_CUR_hot_x]
839
        sub     eax, ecx        ; x1
839
        sub     eax, ecx        ; x1
840
; offset Y
840
; offset Y
841
        mov     ecx, [Y_UNDER_subtraction_CUR_hot_y]
841
        movzx   ecx, word [Y_UNDER_subtraction_CUR_hot_y]
842
        sub     ebx, ecx        ; y1
842
        sub     ebx, ecx        ; y1
843
;--------------------------------------
843
;--------------------------------------
844
; ebx = offset y
844
; ebx = offset y
845
; eax = offset x
845
; eax = offset x
846
        imul    ebx, [cur.w]     ;y
846
        imul    ebx, [cur.w]     ;y
Line 872... Line 872...
872
; eax = color
872
; eax = color
873
; out:
873
; out:
874
; eax = new color
874
; eax = new color
875
;--------------------------------------
875
;--------------------------------------
876
; check for Y
876
; check for Y
877
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
-
 
878
        jb      .no_mouse_area
-
 
879
 
-
 
880
        cmp     cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
877
        cmp     cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
881
        jae     .no_mouse_area
878
        jae     .no_mouse_area
Line -... Line 879...
-
 
879
 
-
 
880
        sub     cx, [Y_UNDER_subtraction_CUR_hot_y]
-
 
881
        jb      .no_mouse_area
882
 
882
 
883
        rol     ecx, 16
883
        rol     ecx, 16
884
;--------------------------------------
884
;--------------------------------------
885
; check for X
-
 
886
        cmp     cx, [X_UNDER_subtraction_CUR_hot_x]
-
 
887
        jb      .no_mouse_area
-
 
888
 
885
; check for X
889
        cmp     cx, [X_UNDER_sub_CUR_hot_x_add_curh]
886
        cmp     cx, [X_UNDER_sub_CUR_hot_x_add_curh]
-
 
887
        jae     .no_mouse_area
-
 
888
 
-
 
889
        sub     cx, [X_UNDER_subtraction_CUR_hot_x]
-
 
890
        jb      .no_mouse_area
-
 
891
 
890
        jae     .no_mouse_area
892
        ror     ecx, 16
891
;--------------------------------------
893
;--------------------------------------
892
align 4
894
align 4
893
.1:
895
.1:
894
        push    eax
-
 
895
; offset X
-
 
896
        mov     ax, [X_UNDER_subtraction_CUR_hot_x]
-
 
897
        sub     cx, ax        ; x1
-
 
898
        ror     ecx, 16
-
 
899
; offset Y
-
 
900
        mov     ax, [Y_UNDER_subtraction_CUR_hot_y]
-
 
901
        sub     cx, ax        ; y1
896
        push    eax
902
;--------------------------------------
897
;--------------------------------------
903
; ecx = (offset x) shl 16 + (offset y)
898
; ecx = (offset x) shl 16 + (offset y)
904
        push    ebx
899
        push    ebx
905
        mov     ebx, ecx
900
        mov     ebx, ecx
906
        shr     ebx, 16        ; x
901
        shr     ebx, 16        ; x
-
 
902
        and     ecx, 0xffff    ; y
-
 
903
 
-
 
904
        cmp     ecx, [cur.h]
-
 
905
        jae     @f
-
 
906
 
-
 
907
        cmp     ebx, [cur.w]
-
 
908
        jb      .ok
-
 
909
;--------------------------------------
-
 
910
align 4
-
 
911
@@:
-
 
912
;        DEBUGF  1, "K : SHIT HAPPENS: %x %x \n", ecx,ebx
-
 
913
        pop     ebx
-
 
914
        jmp     .sh   ; SORRY! SHIT HAPPENS!
-
 
915
;--------------------------------------
-
 
916
align 4
907
        and     ecx, 0xffff    ; y
917
.ok:
908
; ecx = offset y
918
; ecx = offset y
909
; ebx = offset x
-
 
910
        mov     eax, [esp + 4]
-
 
911
 
919
; ebx = offset x
912
        push    ebx ecx
920
        push    ebx ecx
913
        imul    ecx, [cur.w]    ;y
921
        imul    ecx, [cur.w]    ;y
914
        add     ecx, ebx
922
        add     ecx, ebx
915
        mov     ebx, ecx
923
        mov     ebx, ecx
Line 946... Line 954...
946
 
954
 
947
        pop     ecx
955
        pop     ecx
948
        ret
956
        ret
949
;--------------------------------------
957
;--------------------------------------
-
 
958
align 4
-
 
959
.sh:
-
 
960
        mov     ecx, -1
-
 
961
;--------------------------------------
950
align 4
962
align 4
951
@@:
963
@@:
952
        pop     eax
964
        pop     eax
953
;--------------------------------------
965
;--------------------------------------
954
align 4
966
align 4