Subversion Repositories Kolibri OS

Rev

Rev 255 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 heavyiron 1
;load cursors from memory
2
;IN
3
; eax- pointer to memory for ID of cursors
4
;OUT
5
; not returned value
6
 
7
load_cursors:
8
 
9
      mov [PointerToCursorsID],eax
10
 
11
      mov eax, 37
12
      mov ebx, 4
13
      mov ecx,brush_cursor
14
      mov edx,1
485 heavyiron 15
      mcall
255 heavyiron 16
 
17
      mov ebx,[PointerToCursorsID]
18
      mov [ebx],eax
19
      add [PointerToCursorsID],4
20
 
21
      mov eax, 37
22
      mov ebx, 4
23
      mov ecx,flood_fill_cursor
24
      mov edx,1
485 heavyiron 25
      mcall
255 heavyiron 26
 
27
      mov ebx,[PointerToCursorsID]
28
      mov [ebx],eax
29
      add [PointerToCursorsID],4
30
 
31
      mov eax, 37
32
      mov ebx, 4
33
      mov ecx,lastik_cursor
34
      mov edx,1
485 heavyiron 35
      mcall
255 heavyiron 36
 
37
      mov ebx,[PointerToCursorsID]
38
      mov [ebx],eax
39
      add [PointerToCursorsID],4
40
 
41
 
42
      mov eax, 37
43
      mov ebx, 4
44
      mov ecx,other_cursor
45
      mov edx,1
485 heavyiron 46
      mcall
255 heavyiron 47
 
48
 
49
      mov ebx,[PointerToCursorsID]
50
      mov [ebx],eax
51
      add [PointerToCursorsID],4
52
 
53
      mov eax, 37
54
      mov ebx, 4
55
      mov ecx,pencil_cursor
56
      mov edx,1
485 heavyiron 57
      mcall
255 heavyiron 58
 
59
 
60
      mov ebx,[PointerToCursorsID]
61
      mov [ebx],eax
62
      add [PointerToCursorsID],4
63
 
64
      mov eax, 37
65
      mov ebx, 4
66
      mov ecx,pipette_cursor
67
      mov edx,1
485 heavyiron 68
      mcall
255 heavyiron 69
 
70
      mov ebx,[PointerToCursorsID]
71
      mov [ebx],eax
72
      add [PointerToCursorsID],4
73
 
74
      mov eax, 37
75
      mov ebx, 4
76
      mov ecx,spray_cursor
77
      mov edx,1
485 heavyiron 78
      mcall
255 heavyiron 79
 
80
      mov ebx,[PointerToCursorsID]
81
      mov [ebx],eax
82
      add [PointerToCursorsID],4
83
 
84
      mov eax, 37
85
      mov ebx, 4
86
      mov ecx,zoom_cursor
87
      mov edx,1
485 heavyiron 88
      mcall
255 heavyiron 89
 
90
      mov ebx,[PointerToCursorsID]
91
      mov [ebx],eax
92
      add [PointerToCursorsID],4
93
 
94
      ret
95
 
96
;set cirsor
97
;IN
98
;eax- pointer to IDs of cursors
99
;ebx- number(ID) of current instrument
100
 
101
set_cursor:
102
 
103
      mov [PointerToCursorsID],eax
104
 
105
      cmp ebx,10
106
      jne no_1_l
107
       mov eax,5
108
       jmp che
109
      no_1_l:
110
 
111
      cmp ebx,11
112
      jne no_2_l
113
       mov eax,1
114
       jmp che
115
      no_2_l:
116
 
117
      cmp ebx,12
118
      jne no_3_l
119
       mov eax,7
120
       jmp che
121
      no_3_l:
122
 
123
      cmp ebx,13
124
      jne no_4_l
125
       mov eax,3
126
       jmp che
127
      no_4_l:
128
 
129
      cmp ebx,14
130
      jne no_5_l
131
       mov eax,2
132
       jmp che
133
      no_5_l:
134
 
135
      cmp ebx,15
136
      jne no_6_l
137
       mov eax,6
138
       jmp che
139
      no_6_l:
140
 
141
       cmp ebx,16
142
      jne no_7_l
143
       mov eax,4
144
       jmp che
145
      no_7_l:
146
 
147
      cmp ebx,17
148
      jne no_8_l
149
       mov eax,4
150
       jmp che
151
      no_8_l:
152
 
153
      cmp ebx,18
154
      jne no_9_l
155
       mov eax,4
156
       jmp che
157
      no_9_l:
158
 
159
       cmp ebx,19
160
      jne no_10_l
161
       mov eax,4
162
       jmp che
163
      no_10_l:
164
 
165
      cmp ebx,20
166
      jne no_11_l
167
       mov eax,4
168
       jmp che
169
      no_11_l:
170
 
171
      cmp ebx,21
172
      jne no_12_l
173
       mov eax,4
174
       jmp che
175
      no_12_l:
176
 
177
      cmp ebx,22
178
      jne no_13_l
179
       mov eax,4
180
       jmp che
181
      no_13_l:
182
 
183
      cmp ebx,23
184
      jne no_14_l
185
       mov eax,4
186
       jmp che
187
      no_14_l:
188
 
189
      cmp ebx,24
190
      jne no_15_l
191
       mov eax,4
192
       jmp che
193
      no_15_l:
194
 
195
      cmp ebx,25
196
      jne no_16_l
197
       mov eax,4
198
       jmp che
199
      no_16_l:
200
 
201
      cmp ebx,26
202
      jne no_17_l
203
       mov eax,4
204
       jmp che
205
      no_17_l:
206
 
207
      cmp ebx,27
208
      jne no_18_l
209
       mov eax,4
210
       jmp che
211
      no_18_l:
212
 
213
      cmp ebx,28
214
      jne no_19_l
215
       mov eax,4
216
       jmp che
217
      no_19_l:
218
 
219
 
220
      cmp ebx,45
221
      jne no_25_l
222
       mov eax,8
223
       jmp che
224
      no_25_l:
225
 
226
      cmp ebx,46
227
      jne no_26_l
228
       mov eax,8
229
       jmp che
230
      no_26_l:
231
 
232
       cmp ebx,47
233
      jne no_27_l
234
       mov eax,8
235
       jmp che
236
      no_27_l:
237
 
238
      cmp ebx,48
239
      jne no_28_l
240
       mov eax,8
241
       jmp che
242
      no_28_l:
243
 
244
       cmp ebx,49
245
      jne no_29_l
246
       mov eax,8
247
       jmp che
248
      no_29_l:
249
 
250
 
251
      cmp ebx,50
252
      jne no_30_l
253
       mov eax,8
254
       jmp che
255
      no_30_l:
256
 
257
      cmp ebx,40
258
      je no_change_cursor
259
 
260
      cmp ebx,41
261
      je no_change_cursor
262
 
263
      cmp ebx,42
264
      je no_change_cursor
265
 
266
      cmp ebx,43
267
      je no_change_cursor
268
 
269
      cmp ebx,44
270
      je no_change_cursor
271
 
272
      cmp ebx,52
273
      je no_change_cursor
274
 
275
      cmp ebx,51
276
      je no_change_cursor
277
 
278
      cmp ebx,52
279
      je no_change_cursor
280
 
281
      che:
282
 
283
      dec eax
284
      shl eax,2
285
      mov ebx,[PointerToCursorsID]
286
      add eax,ebx
287
      mov ecx,[eax]
288
 
289
      mov eax, 37
290
      mov ebx, 5
485 heavyiron 291
      mcall
255 heavyiron 292
 
293
      no_change_cursor:
294
 
295
      ret
296
 
297
;delete cursors
298
;IN
299
;eax- pointer to IDs of cursors
300
;OUT
301
;not returned value
302
 
303
delete_cursors:
304
 
305
     mov [PointerToCursorsID],eax
306
     mov edx,8
307
 
308
  next_cursor_delete:
309
 
310
     mov eax,[PointerToCursorsID]
311
     mov ecx,[eax]
312
 
313
     mov eax,37
314
     mov ebx,6
485 heavyiron 315
     mcall
255 heavyiron 316
 
317
     add [PointerToCursorsID],4
318
 
319
     dec edx
320
     jnz next_cursor_delete
321
 
322
     ret
323
 
324
PointerToCursorsID  dd 0