Subversion Repositories Kolibri OS

Rev

Rev 6341 | Rev 6359 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6341 Rev 6357
Line 241... Line 241...
241
	add	ebx,[OffsetYWorkScreen]
241
	add	ebx,[OffsetYWorkScreen]
242
	dec	edi
242
	dec	edi
243
	jnz	screen_y
243
	jnz	screen_y
Line 244... Line 244...
244
 
244
 
245
fps:
-
 
246
	;mcall	18,14
245
fps:
247
	mov	ebx,[ScreenPointer]
246
	mov	ebx,[ScreenPointer]
248
	mov	ecx,[WorkScreen_SizeX]
247
	mov	ecx,[WorkScreen_SizeX]
249
	mov	edx,[WorkScreen_SizeY]
248
	mov	edx,[WorkScreen_SizeY]
250
	shl	ecx,16
249
	shl	ecx,16
-
 
250
	add	ecx,edx
251
	add	ecx,edx
251
	mov	edx,((ci_edit_wnd_x_pos+ci_edit_wnd_border) shl 16)\
252
	mov	edx,8*65536+20+15+49+5+1
-
 
253
 
252
		+ (ci_edit_wnd_y_pos+ci_edit_wnd_border)
254
	mcall SF_PUT_IMAGE
253
	mcall SF_PUT_IMAGE
255
	ret
254
	ret
256
;----------------------------------------------------------
255
;----------------------------------------------------------
257
;--------------------clear screen--------------------------
256
;--------------------clear screen--------------------------
Line 288... Line 287...
288
;-----------------------------------------------------------
287
;-----------------------------------------------------------
289
;calculate position work screen on a picture
288
;calculate position work screen on a picture
290
;-----------------------------------------------------------
289
;-----------------------------------------------------------
291
CalculatePositionScreen:
290
CalculatePositionScreen:
292
	mov	eax,[Picture_SizeX]
291
	mov eax,[Picture_SizeX]
293
	mov	ebx,[Picture_SizeY]
-
 
294
	mov	ecx,[CounterX]
292
	sub eax,[CounterX]
295
	mov	edx,[CounterY]
-
 
296
	sub	eax,ecx
-
 
297
	sub	ebx,edx
-
 
298
	cmp	[PosX],eax
293
	cmp [PosX],eax
299
	jle	no_limit_screen_x
294
	jle @f
300
	mov	[PosX],eax
295
		mov [PosX],eax
301
 
-
 
302
no_limit_screen_x:
-
 
303
	cmp	[PosY],ebx
-
 
304
	jle	no_limit_screen_y
-
 
305
	mov	[PosY],ebx
-
 
306
 
296
	@@:
307
no_limit_screen_y:
-
 
308
	cmp	[PosX],0
297
	cmp [PosX],0
309
	jns	no_minimum_screen_x
298
	jns @f
310
	mov	[PosX],0
299
		mov [PosX],0
311
 
300
	@@:
-
 
301
	mov ebx,[Picture_SizeY]
-
 
302
	sub ebx,[CounterY]
-
 
303
	cmp [PosY],ebx
-
 
304
	jle @f
312
no_minimum_screen_x:
305
		mov [PosY],ebx
-
 
306
	@@:
313
	cmp	[PosY],0
307
	cmp [PosY],0
314
	jns	no_minimum_screen_y
308
	jns @f
315
	mov	[PosY],0
309
		mov [PosY],0
316
 
310
	@@:
317
no_minimum_screen_y:
-
 
318
	ret
311
	ret
319
;-----------------------------------------------------------
312
;-----------------------------------------------------------
320
;-----------calculate cordinats on work picture--------------
313
;-----------calculate cordinats on work picture--------------
321
;-----------------------------------------------------------
314
;-----------------------------------------------------------
322
GetScreenCordinats:
315
GetScreenCordinats:
323
	mov	eax,[MouseX]
316
	mov eax,[MouseX]
324
	mov	ebx,[MouseY]
317
	mov ebx,[MouseY]
-
 
318
	sub eax,ci_edit_wnd_x_pos+ci_edit_wnd_border
325
	sub	eax,9
319
	cmp eax,0
-
 
320
	jge @f
-
 
321
		xor eax,eax
-
 
322
	@@:
-
 
323
	sub ebx,ci_edit_wnd_y_pos+ci_edit_wnd_border
326
	sub	ebx,87
324
	cmp ebx,0
-
 
325
	jge @f
-
 
326
		xor ebx,ebx
-
 
327
	@@:
327
	mov	ecx,[k]
328
	mov ecx,[k]
328
	cdq
329
	cdq
329
	idiv	ecx
330
	idiv ecx
330
	mov	[ScreenX],eax
331
	mov [ScreenX],eax
331
	mov	eax,ebx
332
	mov eax,ebx