Subversion Repositories Kolibri OS

Rev

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

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