Subversion Repositories Kolibri OS

Rev

Rev 485 | Rev 6359 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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