Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
180 heavyiron 1
;-----------------------------------------------------
2
draw_volume_rectangle:
3
 
4
 mov [line_x],eax
5
 mov [line_y],ebx
6
 mov [line_size_x],ecx
7
 mov [line_size_y],edx
8
 
9
 cmp esi,1
10
 jne no_volume_light_rectangle
11
 
255 heavyiron 12
 mov [color_rectangle],0xc7cbcf
13
 mov [color_line1],0xaeabae
14
 mov [color_line2],0xffffff
15
 mov [color_line3],0xc7cbcf
180 heavyiron 16
 jmp exit_colors
17
 
18
 no_volume_light_rectangle:
19
 
20
 cmp esi,2
21
 jne no_pressed_rectangle
22
 
255 heavyiron 23
 mov [color_rectangle],0x666666
24
 mov [color_line1],0xaeabae
25
 mov [color_line2],0x666666
26
 mov [color_line3],0x666666
180 heavyiron 27
 
28
 jmp exit_colors
29
 
30
 no_pressed_rectangle:
31
 
32
 cmp esi,3
33
 jne no_pressed_panel
34
 
255 heavyiron 35
 mov [color_rectangle],0xc7cbcf
36
 mov [color_line1],0xaeabae
180 heavyiron 37
 mov [color_line2],7000
255 heavyiron 38
 mov [color_line3],0xffffff
180 heavyiron 39
 jmp exit_colors
40
 
41
 no_pressed_panel:
42
 
43
 cmp esi,4
44
 jne no_pressed_light_panel
45
 
46
 mov [color_rectangle],0xffffff
255 heavyiron 47
 mov [color_line1],0xaeabae
180 heavyiron 48
 mov [color_line2],7000
255 heavyiron 49
 mov [color_line3],0xffffff
180 heavyiron 50
 jmp exit_colors
51
 
52
 no_pressed_light_panel:
53
 
54
 cmp esi,5
55
 jne no_light_pressed_rectangle
56
 
255 heavyiron 57
 mov [color_rectangle],0x666666
58
 mov [color_line1],0xaeabae
59
 mov [color_line2],0x666666
60
 mov [color_line3],0x666666
180 heavyiron 61
 
62
 jmp exit_colors
63
 
64
 no_light_pressed_rectangle:
65
 
66
 cmp esi,6
67
 jne no_work_rectangle
68
 
255 heavyiron 69
 mov [color_rectangle],0xc7cbcf
70
 mov [color_line1],0xaeabae
71
 mov [color_line2],0xc7cbcf
72
 mov [color_line3],0xc7cbcf
180 heavyiron 73
 jmp exit_colors
74
 
75
 no_work_rectangle:
76
 
77
 cmp esi,7
78
 jne no_work_rectangle_2
79
 
255 heavyiron 80
 mov [color_rectangle],0xc7cbcf
81
 mov [color_line1],0xc7cbcf
82
 mov [color_line2],0xc7cbcf
83
 mov [color_line3],0xc7cbcf
180 heavyiron 84
 jmp exit_colors
85
 
86
 no_work_rectangle_2:
87
 
88
 exit_colors:
89
 ;draw rectangle
90
 mov ebx,[line_x]
91
 mov ecx,[line_y]
92
 shl ebx,16
93
 shl ecx,16
94
 add ebx,[line_size_x]
95
 add ecx,[line_size_y]
96
 mov edx,[color_rectangle]
97
 call draw_rectangle
98
 ;line 1
99
 mov edx,[color_line1]
100
 mov ebx,[line_x]
101
 mov ecx,[line_y]
102
 shl ebx,16
103
 shl ecx,16
104
 add ebx,[line_x]
105
 add ecx,[line_y]
106
 add ebx,[line_size_x]
107
 call draw_line
108
 ;line 2
109
 mov edx,[color_line1]
110
 mov ebx,[line_x]
111
 mov ecx,[line_y]
112
 shl ebx,16
113
 shl ecx,16
114
 add ebx,[line_x]
115
 add ecx,[line_y]
116
 add ecx,[line_size_y]
117
 call draw_line
118
 ;line 3
119
 mov edx,[color_line1]
120
 mov ebx,[line_x]
121
 mov ecx,[line_y]
122
 add ecx,[line_size_y]
123
 shl ebx,16
124
 shl ecx,16
125
 add ebx,[line_x]
126
 add ecx,[line_y]
127
 add ebx,[line_size_x]
128
 add ecx,[line_size_y]
129
 call draw_line
130
 ;line 4
131
 mov edx,[color_line1]
132
 mov ebx,[line_x]
133
 mov ecx,[line_y]
134
 add ebx,[line_size_x]
135
 shl ebx,16
136
 shl ecx,16
137
 add ebx,[line_x]
138
 add ecx,[line_y]
139
 add ebx,[line_size_x]
140
 add ecx,[line_size_y]
141
 call draw_line
142
 ;light line 1
143
 mov edx,[color_line2]
144
 mov ebx,[line_x]
145
 mov ecx,[line_y]
146
 inc ebx
147
 inc ecx
148
 shl ebx,16
149
 shl ecx,16
150
 add ebx,[line_x]
151
 add ecx,[line_y]
152
 add ebx,[line_size_x]
153
 dec ebx
154
 inc ecx
155
 call draw_line
156
 ;light line 2
157
 mov edx,[color_line2]
158
 mov ebx,[line_x]
159
 mov ecx,[line_y]
160
 inc ebx
161
 inc ecx
162
 shl ebx,16
163
 shl ecx,16
164
 add ebx,[line_x]
165
 add ecx,[line_y]
166
 add ecx,[line_size_y]
167
 dec ecx
168
 inc ebx
169
 call draw_line
170
 ;light line 3
171
 mov edx,[color_line3]
172
 mov ebx,[line_x]
173
 mov ecx,[line_y]
174
 add ebx,[line_size_x]
175
 dec ebx
176
 inc ecx
177
 shl ebx,16
178
 shl ecx,16
179
 add ebx,[line_x]
180
 add ecx,[line_y]
181
 add ebx,[line_size_x]
182
 add ecx,[line_size_y]
183
 dec ebx
184
 dec ecx
185
 call draw_line
186
 ;light line 4
187
 mov edx,[color_line3]
188
 mov ebx,[line_x]
189
 mov ecx,[line_y]
190
 add ecx,[line_size_y]
191
 inc ebx
192
 dec ecx
193
 shl ebx,16
194
 shl ecx,16
195
 add ebx,[line_x]
196
 add ecx,[line_y]
197
 add ecx,[line_size_y]
198
 add ebx,[line_size_x]
199
 dec ecx
200
 dec ebx
201
 call draw_line
202
 
203
 ret
204
;----------------------------------------------------------
205
rectangle:
206
 
207
 no_light_rectangle:
208
 mov [line_x],eax
209
 mov [line_y],ebx
210
 mov [line_size_x],ecx
211
 mov [line_size_y],edx
212
 mov edx,esi
213
 mov eax,13
214
 mov ebx,[line_x]
215
 mov ecx,[line_y]
216
 shl ebx,16
217
 shl ecx,16
218
 add ebx,[line_size_x]
219
 add ecx,[line_size_y]
220
 int 0x40
221
 ret
222
;----------------------------------------------------------
223
draw_conture:
224
 
225
 mov [line_x],eax
226
 mov [line_y],ebx
227
 mov [line_size_x],ecx
228
 mov [line_size_y],edx
229
 
255 heavyiron 230
 mov [color_line1],0xaeabae
180 heavyiron 231
 
255 heavyiron 232
 
180 heavyiron 233
 ;line 1
234
 mov edx,[color_line1]
235
 mov ebx,[line_x]
236
 mov ecx,[line_y]
237
 shl ebx,16
238
 shl ecx,16
239
 add ebx,[line_x]
240
 add ecx,[line_y]
241
 add ebx,[line_size_x]
242
 call draw_line
243
 ;line 2
244
 mov edx,[color_line1]
245
 mov ebx,[line_x]
246
 mov ecx,[line_y]
247
 shl ebx,16
248
 shl ecx,16
249
 add ebx,[line_x]
250
 add ecx,[line_y]
251
 add ecx,[line_size_y]
252
 call draw_line
253
 ;line 3
254
 mov edx,[color_line1]
255
 mov ebx,[line_x]
256
 mov ecx,[line_y]
257
 add ecx,[line_size_y]
258
 shl ebx,16
259
 shl ecx,16
260
 add ebx,[line_x]
261
 add ecx,[line_y]
262
 add ebx,[line_size_x]
263
 add ecx,[line_size_y]
264
 call draw_line
265
 ;line 4
266
 mov edx,[color_line1]
267
 mov ebx,[line_x]
268
 mov ecx,[line_y]
269
 add ebx,[line_size_x]
270
 shl ebx,16
271
 shl ecx,16
272
 add ebx,[line_x]
273
 add ecx,[line_y]
274
 add ebx,[line_size_x]
275
 add ecx,[line_size_y]
276
 call draw_line
277
 
278
 ret
279
;----------------------------------------------------------
280
columnus:
281
 
282
 sub eax,ecx
283
 jns no_columnus
284
 neg eax
285
 cmp eax,esi
286
 ja no_columnus
287
 sub ebx,edx
288
 jns no_columnus
289
 neg ebx
290
 cmp ebx,edi
291
 ja no_columnus
292
 mov eax,1
293
 jmp columnus_true
294
 no_columnus:
295
 xor eax,eax
296
 columnus_true:
297
 ret
298
;----------------------------------------------------------
299
print_text:
300
 mov [text_x],eax
301
 mov [text_y],ebx
302
 mov eax,4
303
 mov ebx,[text_x]
304
 shl ebx,16
305
 add ebx,[text_y]
306
 int 0x40
307
 ret
308
;----------------------------------------------------------
309
draw_rectangle:
310
 mov eax,13
311
 int 0x40
312
 ret
313
;------------------------
314
draw_line:
315
 mov eax,38
316
 int 0x40
317
 ret
318
;----------------------------------------------------------
319
;lightlin 12508927
320
;lines    5669590
255 heavyiron 321
;workpan  9350879
180 heavyiron 322
;btnpress 9089258
323
line_x		dd 0
324
line_y		dd 0
325
line_size_x	dd 0
326
line_size_y	dd 0
327
color_line1	dd 0
328
color_line2	dd 0
329
color_line3	dd 0
330
color_rectangle dd 0
331
;--------------------
332
text_x		dd 0
333
text_y		dd 0
334
;--------------------