Subversion Repositories Kolibri OS

Rev

Rev 6359 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6359 Rev 6360
Line 198... Line 198...
198
	dec	ecx
198
	dec	ecx
199
	dec	ebx
199
	dec	ebx
200
	call	draw_line
200
	call	draw_line
201
	ret
201
	ret
202
;----------------------------------------------------------
202
;----------------------------------------------------------
203
rectangle:
203
;input:
204
no_light_rectangle:
204
; eax - rectangle X
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]
-
 
216
	mcall SF_DRAW_RECT
-
 
217
	ret
-
 
218
;----------------------------------------------------------
-
 
219
draw_conture:
-
 
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
205
; ebx - rectangle Y
235
;line	2
-
 
236
	mov	edx,[color_line1]
-
 
237
	mov	ebx,[line_x]
-
 
238
	mov	ecx,[line_y]
206
; ecx - point X
239
	shl	ebx,16
-
 
240
	shl	ecx,16
-
 
241
	add	ebx,[line_x]
-
 
242
	add	ecx,[line_y]
207
; edx - point 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]
208
; esi - rectangle size X
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]
209
; edi - rectangle size Y
256
	call	draw_line
-
 
257
;line	4
210
;output:
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]
211
; eax - 1 if point in rectangle
268
	call	draw_line
-
 
269
	ret
-
 
270
;----------------------------------------------------------
-
 
271
columnus:
212
columnus:
272
	sub	eax,ecx
213
	sub	eax,ecx
273
	jns	no_columnus
214
	jns	@f
274
	neg	eax
215
	neg	eax
275
	cmp	eax,esi
216
	cmp	eax,esi
276
	ja	no_columnus
217
	ja	@f
277
	sub	ebx,edx
218
	sub	ebx,edx
278
	jns	no_columnus
219
	jns	@f
279
	neg	ebx
220
	neg	ebx
280
	cmp	ebx,edi
221
	cmp	ebx,edi
281
	ja	no_columnus
222
	ja	@f
282
	mov	eax,1
223
	mov	eax,1
283
	jmp	columnus_true
224
	jmp	columnus_true
284
no_columnus:
225
@@:
285
	xor	eax,eax
226
	xor	eax,eax
286
columnus_true:
227
columnus_true:
287
	ret
228
	ret
288
;----------------------------------------------------------
229
;----------------------------------------------------------
289
print_text:
230
print_text: