Subversion Repositories Kolibri OS

Rev

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

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