Subversion Repositories Kolibri OS

Rev

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

Rev 431 Rev 480
Line 1... Line 1...
1
$Revision: 431 $
1
$Revision: 480 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                              ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
Line 64... Line 64...
64
         mov     AL,[SecondByte_2]
64
         mov     AL,[SecondByte_2]
65
        call     mouse_acceleration_ps2
65
        call     mouse_acceleration_ps2
66
        ; Âû÷èñëèòü íîâîå çíà÷åíèå êîîðäèíàòû
66
        ; Âû÷èñëèòü íîâîå çíà÷åíèå êîîðäèíàòû
67
        ; êóðñîðà ïî X
67
        ; êóðñîðà ïî X
68
        add     AX,[MOUSE_X]    ;[XCoordinate]
68
        add     AX,[MOUSE_X]    ;[XCoordinate]
69
        cmp     AX,0
-
 
70
        jge     @@M1
69
        jns     @@M1
71
        mov     AX,0
70
        xor     eax, eax
72
        jmp     @@M2
71
        jmp     @@M2
73
@@M1:
72
@@M1:
74
        cmp     AX,[ScreenWidth]   ;ScreenLength
73
        cmp     AX,[ScreenWidth]   ;ScreenLength
75
        jl      @@M2
74
        jl      @@M2
76
        mov     AX,[ScreenWidth]   ;ScreenLength-1
75
        mov     AX,[ScreenWidth]   ;ScreenLength-1
77
        dec     ax
-
 
78
@@M2:
76
@@M2:
79
        mov     [MOUSE_X],AX     ;[XCoordinate]
77
        mov     [MOUSE_X],AX     ;[XCoordinate]
Line 80... Line 78...
80
 
78
 
81
; Âû÷èñëÿåì íîâóþ Y-êîîðäèíàòó êóðñîðà
79
; Âû÷èñëÿåì íîâóþ Y-êîîðäèíàòó êóðñîðà
Line 92... Line 90...
92
        ; Âû÷èñëèòü íîâîå çíà÷åíèå êîîðäèíàòû êóðñîðà
90
        ; Âû÷èñëèòü íîâîå çíà÷åíèå êîîðäèíàòû êóðñîðà
93
        ; ïî Y (Y-êîîðäèíàòà ìûøè PS/2 íàïðàâëåíà
91
        ; ïî Y (Y-êîîðäèíàòà ìûøè PS/2 íàïðàâëåíà
94
        ; ïðîòèâîïîëîæíî ýêðàííîé)
92
        ; ïðîòèâîïîëîæíî ýêðàííîé)
95
        neg     AX
93
        neg     AX
96
        add     AX,[MOUSE_Y]   ;[YCoordinate]
94
        add     AX,[MOUSE_Y]   ;[YCoordinate]
97
        cmp     AX,0
-
 
98
        jge     @@M4
95
        jns     @@M4
99
        mov     AX,0
96
        xor     eax, eax
100
        jmp     @@M5
97
        jmp     @@M5
101
@@M4:
98
@@M4:
102
        cmp     AX,[ScreenHeight]  ;ScreenHeigth
99
        cmp     AX,[ScreenHeight]  ;ScreenHeigth
103
        jl      @@M5
100
        jl      @@M5
104
        mov     AX,[ScreenHeight] ;ScreenHeigth-1
101
        mov     AX,[ScreenHeight] ;ScreenHeigth-1
105
        dec     ax
-
 
106
@@M5:
102
@@M5:
107
        mov     [MOUSE_Y],AX     ;[YCoordinate]
103
        mov     [MOUSE_Y],AX     ;[YCoordinate]
Line 108... Line 104...
108
 
104
 
109
; Ïîêàçàòü êóðñîð â íîâîé ïîçèöèè
105
; Ïîêàçàòü êóðñîð â íîâîé ïîçèöèè