Rev 5572 | Rev 5575 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5572 | Rev 5573 | ||
---|---|---|---|
Line 63... | Line 63... | ||
63 | }; |
63 | }; |
Line 64... | Line 64... | ||
64 | 64 | ||
65 | /** |
65 | /** |
66 | * The structure of the mouse |
66 | * The structure of the mouse |
67 | * x - coordinate X |
67 | * x - coordinate X |
68 | * ó - coordinate Ó |
68 | * y - coordinate Y |
69 | * xx and yy - time coordinates |
69 | * xx and yy - time coordinates |
70 | * lkm - left mouse button |
70 | * lkm - left mouse button |
71 | * pkm - right mouse button |
71 | * pkm - right mouse button |
72 | * mkm - mouse wheel |
72 | * mkm - mouse wheel |
Line 80... | Line 80... | ||
80 | { |
80 | { |
81 | signed x,y,xx,yy,lkm,mkm,pkm,key,tmp,hor,vert,down,up,move; |
81 | signed x,y,xx,yy,lkm,mkm,pkm,key,tmp,hor,vert,down,up,move; |
82 | void get(); |
82 | void get(); |
83 | }; |
83 | }; |
Line -... | Line 84... | ||
- | 84 | ||
84 | 85 | //get new attributes mouse |
|
85 | :void mouse::get() |
86 | :void mouse::get() |
86 | { |
87 | { |
87 | EAX = 37; |
88 | EAX = 37; |
88 | EBX = 1; |
89 | EBX = 1; |
Line 124... | Line 125... | ||
124 | } |
125 | } |
Line 125... | Line 126... | ||
125 | 126 | ||
126 | //when you press the mouse button |
127 | //when you press the mouse button |
127 | else { |
128 | else { |
- | 129 | up = false; |
|
128 | up = false; |
130 | if(key) down = true; |
129 | down = key; |
131 | else down = false; |
130 | if(down)tmp=key; |
132 | if(down) tmp = key; |
131 | if((xx!=x)||(yy!=y)){ |
133 | if((xx!=x)||(yy!=y)){ |
132 | move = true; |
134 | move = true; |
133 | xx = x; |
135 | xx = x; |
134 | yy = y; |
136 | yy = y; |
135 | } |
137 | } |
136 | else move = false; |
138 | else move = false; |
Line -... | Line 139... | ||
- | 139 | } |
|
137 | } |
140 | |
138 | 141 | //scroll |
|
139 | EAX = 37; //áªà®«« |
142 | EAX = 37; |
140 | EBX = 7; |
143 | EBX = 7; |
141 | $int 0x40 |
144 | $int 0x40 |
142 | $mov ebx, eax |
145 | $mov ebx, eax |