243,14 → 243,13 |
jnz screen_y |
|
fps: |
;mcall 18,14 |
mov ebx,[ScreenPointer] |
mov ecx,[WorkScreen_SizeX] |
mov edx,[WorkScreen_SizeY] |
shl ecx,16 |
add ecx,edx |
mov edx,8*65536+20+15+49+5+1 |
|
mov edx,((ci_edit_wnd_x_pos+ci_edit_wnd_border) shl 16)\ |
+ (ci_edit_wnd_y_pos+ci_edit_wnd_border) |
mcall SF_PUT_IMAGE |
ret |
;---------------------------------------------------------- |
290,31 → 289,25 |
;----------------------------------------------------------- |
CalculatePositionScreen: |
mov eax,[Picture_SizeX] |
mov ebx,[Picture_SizeY] |
mov ecx,[CounterX] |
mov edx,[CounterY] |
sub eax,ecx |
sub ebx,edx |
sub eax,[CounterX] |
cmp [PosX],eax |
jle no_limit_screen_x |
jle @f |
mov [PosX],eax |
|
no_limit_screen_x: |
@@: |
cmp [PosX],0 |
jns @f |
mov [PosX],0 |
@@: |
mov ebx,[Picture_SizeY] |
sub ebx,[CounterY] |
cmp [PosY],ebx |
jle no_limit_screen_y |
jle @f |
mov [PosY],ebx |
|
no_limit_screen_y: |
cmp [PosX],0 |
jns no_minimum_screen_x |
mov [PosX],0 |
|
no_minimum_screen_x: |
@@: |
cmp [PosY],0 |
jns no_minimum_screen_y |
jns @f |
mov [PosY],0 |
|
no_minimum_screen_y: |
@@: |
ret |
;----------------------------------------------------------- |
;-----------calculate cordinats on work picture-------------- |
322,8 → 315,16 |
GetScreenCordinats: |
mov eax,[MouseX] |
mov ebx,[MouseY] |
sub eax,9 |
sub ebx,87 |
sub eax,ci_edit_wnd_x_pos+ci_edit_wnd_border |
cmp eax,0 |
jge @f |
xor eax,eax |
@@: |
sub ebx,ci_edit_wnd_y_pos+ci_edit_wnd_border |
cmp ebx,0 |
jge @f |
xor ebx,ebx |
@@: |
mov ecx,[k] |
cdq |
idiv ecx |