2006-12-29 15:50:24 +01:00
|
|
|
;-----------------------------------------------------------
|
|
|
|
;-----------instruments of menu-----------------------------
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
TakeInstruments:
|
2010-10-04 22:40:19 +02:00
|
|
|
;|||||||||||||||||||FILE||||||||||||||||||||||
|
|
|
|
cmp [number_panel],7
|
|
|
|
jne no_file
|
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< New >>>
|
2010-10-04 22:40:19 +02:00
|
|
|
cmp [number_menu],1
|
|
|
|
jne no_new
|
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
call dialog2_draw
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov edx,1000000000000000000000000000000b+1000
|
2016-03-15 23:30:18 +01:00
|
|
|
mcall SF_DEFINE_BUTTON,<177,40>,<115,14>,
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov edx,1000000000000000000000000000000b+1001
|
2016-03-21 18:29:30 +01:00
|
|
|
mcall ,,<139,14>,
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov edx,1000000000000000000000000000000b+1002
|
2016-03-21 18:29:30 +01:00
|
|
|
mcall ,,<170,15>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
no_activate_space:
|
2016-03-21 18:29:30 +01:00
|
|
|
mcall SF_SLEEP, 5 ;fix cpu use 100%
|
2016-03-15 23:30:18 +01:00
|
|
|
mcall SF_WAIT_EVENT
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
cmp eax,1 ;redraw window
|
|
|
|
jne @f
|
|
|
|
call dialog2_draw
|
|
|
|
jmp no_activate_space
|
|
|
|
@@:
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
cmp eax,3 ;press button
|
|
|
|
jne no_activate_space
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-15 23:30:18 +01:00
|
|
|
mcall SF_GET_BUTTON
|
2010-10-04 22:40:19 +02:00
|
|
|
shr eax,8
|
|
|
|
|
|
|
|
cmp eax,1000
|
|
|
|
jl no_activate_space
|
|
|
|
|
|
|
|
cmp eax,1000
|
|
|
|
jne no_picture_size_x
|
|
|
|
|
|
|
|
mov eax,180
|
|
|
|
mov ebx,119
|
|
|
|
mov ecx,5
|
|
|
|
call dialog_line
|
|
|
|
|
|
|
|
mov eax,string_
|
|
|
|
mov ebx,13
|
|
|
|
call find_symvol
|
|
|
|
|
|
|
|
dec eax
|
|
|
|
mov [length_number],eax
|
|
|
|
mov eax,string_
|
2016-03-21 18:29:30 +01:00
|
|
|
call str_to_int
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov [Picture_SizeX],eax
|
|
|
|
jmp no_activate_space
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_picture_size_x:
|
|
|
|
cmp eax,1001
|
|
|
|
jne no_picture_size_y
|
|
|
|
|
|
|
|
mov eax,180
|
|
|
|
mov ebx,119+24
|
|
|
|
mov ecx,5
|
|
|
|
call dialog_line
|
|
|
|
|
|
|
|
mov eax,string_
|
|
|
|
mov ebx,13
|
|
|
|
call find_symvol
|
|
|
|
|
|
|
|
dec eax
|
|
|
|
mov [length_number],eax
|
|
|
|
mov eax,string_
|
2016-03-21 18:29:30 +01:00
|
|
|
call str_to_int
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov [Picture_SizeY],eax
|
|
|
|
jmp no_activate_space
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_picture_size_y:
|
|
|
|
cmp eax,1002
|
|
|
|
jne no_activate_space
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
exit_new:
|
|
|
|
mov edx,11100000000000000000000000000000b+1002
|
2016-03-21 18:29:30 +01:00
|
|
|
mcall SF_DEFINE_BUTTON,<177,40>,<170,15>
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
mov edx,11100000000000000000000000000000b+1001
|
2016-03-21 18:29:30 +01:00
|
|
|
mcall ,,<139,14>
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
mov edx,11100000000000000000000000000000b+1000
|
|
|
|
mcall ,,<115,14>
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
;get memory for new picture
|
2016-03-21 18:29:30 +01:00
|
|
|
call GetMemory
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
and [save_flag],0
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
call cleare_work_arrea
|
|
|
|
call drawwin
|
2010-10-04 22:40:19 +02:00
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_new:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Open >>>
|
2010-10-04 22:40:19 +02:00
|
|
|
cmp [number_menu],2
|
|
|
|
jne no_open
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-09-30 15:20:36 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
mov [OpenDialog_data.type],0 ; open
|
|
|
|
|
|
|
|
push dword OpenDialog_data
|
|
|
|
call [OpenDialog_Start]
|
|
|
|
|
|
|
|
cmp [OpenDialog_data.status],1
|
|
|
|
jne still
|
|
|
|
;---------------------------------------------------------------------
|
2016-03-15 23:30:18 +01:00
|
|
|
mcall SF_SET_EVENTS_MASK,0x80000027 ;100111b
|
2010-09-30 15:20:36 +02:00
|
|
|
|
2016-03-12 21:39:39 +01:00
|
|
|
call load_picture
|
2016-03-15 23:30:18 +01:00
|
|
|
call drawwin
|
2016-03-12 21:39:39 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_open:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Save >>>
|
2010-10-04 22:40:19 +02:00
|
|
|
cmp [number_menu],3
|
|
|
|
jne no_save_
|
|
|
|
|
|
|
|
mov al,[save_flag]
|
|
|
|
test al,al
|
|
|
|
jz no_save_file
|
|
|
|
jmp save_enter
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_save_file:
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_save_:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Save as >>>
|
2010-10-04 22:40:19 +02:00
|
|
|
cmp [number_menu],4
|
|
|
|
jne no_save
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
; savedialog drawwin,save1,save2,file_path
|
2010-10-01 15:09:54 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; replace extension to '.bmp'
|
|
|
|
push eax esi
|
|
|
|
mov esi,[OpenDialog_data.filename_area]
|
|
|
|
xor eax,eax
|
|
|
|
cld
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
test eax,eax
|
|
|
|
jnz @r
|
2010-10-04 22:40:19 +02:00
|
|
|
sub esi,5
|
2010-10-01 15:09:54 +02:00
|
|
|
cmp [esi],byte '.'
|
|
|
|
jne @f
|
2010-10-04 22:40:19 +02:00
|
|
|
mov [esi],dword '.bmp'
|
2010-10-01 15:09:54 +02:00
|
|
|
@@:
|
|
|
|
pop esi eax
|
2010-09-30 15:20:36 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
mov [OpenDialog_data.type],1 ; save
|
2016-03-21 18:29:30 +01:00
|
|
|
stdcall [OpenDialog_Start],OpenDialog_data
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2010-09-30 15:20:36 +02:00
|
|
|
cmp [OpenDialog_data.status],1
|
|
|
|
jne still
|
|
|
|
;---------------------------------------------------------------------
|
2010-10-04 22:40:19 +02:00
|
|
|
save1:
|
|
|
|
save_enter:
|
2016-03-15 23:30:18 +01:00
|
|
|
mcall SF_SET_EVENTS_MASK,0x80000027 ;100111b
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
call analizing_picture_to_palette
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
;eax => number of colors in picture
|
|
|
|
mov ebx,[PointerToPicture]
|
|
|
|
mov ecx,[PointerToEditBufer]
|
|
|
|
mov edx,[PointerToPalette]
|
|
|
|
mov esi,[Picture_SizeX]
|
|
|
|
mov edi,[Picture_SizeY]
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
call coding_bmp
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
mov eax,file_path
|
|
|
|
mov ecx,ebx
|
|
|
|
mov ebx,[PointerToEditBufer]
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
call save_file
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
mov [save_flag],1
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
call drawwin
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
;save2:
|
|
|
|
; and [number_panel],0
|
|
|
|
; and [number_menu],0
|
|
|
|
; jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_save:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Exit >>>
|
2010-10-04 22:40:19 +02:00
|
|
|
cmp [number_menu],5
|
|
|
|
jne no_exit_program
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2016-03-17 20:03:33 +01:00
|
|
|
mcall SF_TERMINATE_PROCESS
|
2010-10-04 22:40:19 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_exit_program:
|
|
|
|
no_file:
|
|
|
|
;|||||||||||||||||||||||||||||EDIT|||||||||||||||||||||||||
|
|
|
|
cmp [number_panel],6
|
2016-03-21 18:29:30 +01:00
|
|
|
jne no_edit
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Undo >>>
|
2010-10-04 22:40:19 +02:00
|
|
|
cmp [number_menu],1
|
|
|
|
jne no_undo
|
|
|
|
|
2016-03-17 20:03:33 +01:00
|
|
|
cmp [number_undo],2 ;2 - maximum undo count
|
|
|
|
jge no_undo
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-17 20:03:33 +01:00
|
|
|
;rotate bufers -1
|
|
|
|
inc [number_undo]
|
|
|
|
mov eax,[PointerToPicture]
|
|
|
|
mov ebx,[PointerToCopyPicture]
|
|
|
|
mov ecx,[PointerToCopyPicture2]
|
|
|
|
mov [PointerToPicture],ebx
|
|
|
|
mov [PointerToCopyPicture],ecx
|
|
|
|
mov [PointerToCopyPicture2],eax
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-17 20:03:33 +01:00
|
|
|
call MovePictureToWorkScreen
|
2016-03-21 18:29:30 +01:00
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
jmp still
|
2010-10-04 22:40:19 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_undo:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Redo >>>
|
|
|
|
cmp [number_menu],2
|
|
|
|
jne no_redo
|
|
|
|
|
|
|
|
cmp [number_undo],0
|
|
|
|
je no_redo
|
|
|
|
|
|
|
|
;rotate bufers +1
|
|
|
|
dec [number_undo]
|
|
|
|
mov eax,[PointerToPicture]
|
|
|
|
mov ebx,[PointerToCopyPicture]
|
|
|
|
mov ecx,[PointerToCopyPicture2]
|
|
|
|
mov [PointerToPicture],ecx
|
|
|
|
mov [PointerToCopyPicture],eax
|
|
|
|
mov [PointerToCopyPicture2],ebx
|
|
|
|
|
|
|
|
call MovePictureToWorkScreen
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_redo:
|
|
|
|
; <<< Copy >>>
|
|
|
|
cmp [number_menu],3
|
2010-10-04 22:40:19 +02:00
|
|
|
jne no_copy
|
|
|
|
|
|
|
|
cmp [instrument_used],1
|
|
|
|
jne no_copy
|
|
|
|
cmp [Activate_instrument],0
|
|
|
|
jne no_copy
|
|
|
|
|
|
|
|
mov eax,[OldX]
|
|
|
|
mov ebx,[OldY]
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_x]
|
|
|
|
jl no_remove_x_copy
|
|
|
|
|
|
|
|
mov ecx,[rectangular_shade_x]
|
|
|
|
mov [OldX],ecx ; OldX <-----> rectangulare_shade_x
|
|
|
|
mov [rectangular_shade_x],eax
|
|
|
|
|
|
|
|
no_remove_x_copy:
|
|
|
|
cmp ebx,[rectangular_shade_y]
|
|
|
|
jl no_remove_y_copy
|
|
|
|
|
|
|
|
mov ecx,[rectangular_shade_y]
|
|
|
|
mov [OldY],ecx ; OldY <-----> rectangulare_shade_y
|
|
|
|
mov [rectangular_shade_y],ebx
|
|
|
|
|
|
|
|
no_remove_y_copy:
|
|
|
|
mov eax,[OldX]
|
|
|
|
mov ebx,[OldY]
|
|
|
|
mov ecx,[rectangular_shade_x]
|
|
|
|
mov edx,[rectangular_shade_y]
|
|
|
|
inc eax
|
|
|
|
inc ebx
|
|
|
|
dec ecx
|
|
|
|
dec edx
|
|
|
|
|
|
|
|
mov [x],eax
|
|
|
|
mov [y],ebx
|
|
|
|
mov esi,eax
|
|
|
|
mov edi,ebx
|
|
|
|
mov [Dx_],1
|
|
|
|
mov [Dy_],1
|
|
|
|
|
|
|
|
sub ecx,eax
|
|
|
|
jnz no_signum_fill_r_x_copy
|
|
|
|
|
|
|
|
mov [Dx_],-1
|
|
|
|
|
|
|
|
no_signum_fill_r_x_copy:
|
|
|
|
sub edx,ebx
|
|
|
|
jnz no_signum_fill_r_y_copy
|
|
|
|
|
|
|
|
mov [Dy_],-1
|
|
|
|
|
|
|
|
no_signum_fill_r_y_copy:
|
|
|
|
mov ebx,[rectangular_shade_y]
|
|
|
|
sub ebx,edi
|
|
|
|
|
|
|
|
mov edx,[PointerToEditBufer]
|
|
|
|
mov [y],edi
|
|
|
|
|
|
|
|
loop_fill_rectangle_y_copy:
|
|
|
|
mov [x],esi
|
|
|
|
|
|
|
|
loop_fill_rectangle_x_copy:
|
|
|
|
push esi edi
|
|
|
|
mov eax,[PointerToPicture]
|
|
|
|
mov ebx,[Picture_SizeX]
|
|
|
|
mov esi,[x]
|
|
|
|
mov edi,[y]
|
|
|
|
call GetColorOfPixel
|
|
|
|
mov [edx],ax
|
|
|
|
shr eax,16
|
|
|
|
mov [edx+2],al
|
|
|
|
pop edi esi
|
|
|
|
|
|
|
|
add edx,3
|
|
|
|
mov eax,[x]
|
|
|
|
add eax,[Dx_]
|
|
|
|
mov [x],eax
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_x]
|
|
|
|
jl loop_fill_rectangle_x_copy
|
|
|
|
|
|
|
|
mov eax,[y]
|
|
|
|
add eax,[Dy_]
|
|
|
|
mov [y],eax
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_y]
|
|
|
|
jl loop_fill_rectangle_y_copy
|
|
|
|
|
|
|
|
call MovePictureToWorkScreen
|
|
|
|
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
mov [DrawSprite_flag],1
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_copy:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Paste >>>
|
|
|
|
cmp [number_menu],4
|
2010-10-04 22:40:19 +02:00
|
|
|
jne no_paste
|
|
|
|
|
|
|
|
cmp [instrument_used],1
|
|
|
|
jne no_paste
|
|
|
|
|
|
|
|
cmp [Activate_instrument],0
|
|
|
|
jne no_paste
|
|
|
|
|
|
|
|
mov eax,[OldX]
|
|
|
|
mov ebx,[OldY]
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_x]
|
|
|
|
jl no_remove_x_paste
|
|
|
|
|
|
|
|
mov ecx,[rectangular_shade_x]
|
|
|
|
mov [OldX],ecx ; OldX <-----> rectangulare_shade_x
|
|
|
|
mov [rectangular_shade_x],eax
|
|
|
|
|
|
|
|
no_remove_x_paste:
|
|
|
|
cmp ebx,[rectangular_shade_y]
|
|
|
|
jl no_remove_y_paste
|
|
|
|
|
|
|
|
mov ecx,[rectangular_shade_y]
|
|
|
|
mov [OldY],ecx ; OldY <-----> rectangulare_shade_y
|
|
|
|
mov [rectangular_shade_y],ebx
|
|
|
|
|
|
|
|
no_remove_y_paste:
|
|
|
|
mov eax,[OldX]
|
|
|
|
mov ebx,[OldY]
|
|
|
|
mov ecx,[rectangular_shade_x]
|
|
|
|
mov edx,[rectangular_shade_y]
|
|
|
|
inc eax
|
|
|
|
inc ebx
|
|
|
|
dec ecx
|
|
|
|
dec edx
|
|
|
|
|
|
|
|
mov [x],eax
|
|
|
|
mov [y],ebx
|
|
|
|
mov esi,eax
|
|
|
|
mov edi,ebx
|
|
|
|
mov [Dx_],1
|
|
|
|
mov [Dy_],1
|
|
|
|
|
|
|
|
sub ecx,eax
|
|
|
|
jnz no_signum_fill_r_x_paste
|
|
|
|
|
|
|
|
mov [Dx_],-1
|
|
|
|
|
|
|
|
no_signum_fill_r_x_paste:
|
|
|
|
sub edx,ebx
|
|
|
|
jnz no_signum_fill_r_y_paste
|
|
|
|
|
|
|
|
mov [Dy_],-1
|
|
|
|
|
|
|
|
no_signum_fill_r_y_paste:
|
|
|
|
mov edx,[PointerToEditBufer]
|
|
|
|
mov [y],edi
|
|
|
|
|
|
|
|
loop_fill_rectangle_y_paste:
|
|
|
|
mov [x],esi
|
|
|
|
|
|
|
|
loop_fill_rectangle_x_paste:
|
|
|
|
push esi edi
|
|
|
|
mov ecx,[edx]
|
|
|
|
and ecx,0xffffff ;color
|
|
|
|
mov eax,[PointerToPicture]
|
|
|
|
mov ebx,[Picture_SizeX]
|
|
|
|
mov esi,[x]
|
|
|
|
mov edi,[y]
|
|
|
|
call PutPixel
|
|
|
|
pop edi esi
|
|
|
|
|
|
|
|
add edx,3
|
|
|
|
|
|
|
|
mov eax,[x]
|
|
|
|
add eax,[Dx_]
|
|
|
|
mov [x],eax
|
|
|
|
cmp eax,[rectangular_shade_x]
|
|
|
|
jl loop_fill_rectangle_x_paste
|
|
|
|
|
|
|
|
mov eax,[y]
|
|
|
|
add eax,[Dy_]
|
|
|
|
mov [y],eax
|
|
|
|
cmp eax,[rectangular_shade_y]
|
|
|
|
jl loop_fill_rectangle_y_paste
|
|
|
|
|
|
|
|
call MovePictureToWorkScreen
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
mov [Paste_flag],1
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_paste:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Cut >>>
|
|
|
|
cmp [number_menu],5
|
2010-10-04 22:40:19 +02:00
|
|
|
jne no_cut
|
|
|
|
|
|
|
|
cmp [instrument_used],1
|
|
|
|
jne no_cut
|
|
|
|
|
|
|
|
cmp [Activate_instrument],0
|
|
|
|
jne no_cut
|
|
|
|
|
|
|
|
mov eax,[OldX]
|
|
|
|
mov ebx,[OldY]
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_x]
|
|
|
|
jl no_remove_x_cut
|
|
|
|
|
|
|
|
mov ecx,[rectangular_shade_x]
|
|
|
|
mov [OldX],ecx ; OldX <-----> rectangulare_shade_x
|
|
|
|
mov [rectangular_shade_x],eax
|
|
|
|
|
|
|
|
no_remove_x_cut:
|
|
|
|
cmp ebx,[rectangular_shade_y]
|
|
|
|
jl no_remove_y_cut
|
|
|
|
|
|
|
|
mov ecx,[rectangular_shade_y]
|
|
|
|
mov [OldY],ecx ; OldY <-----> rectangulare_shade_y
|
|
|
|
mov [rectangular_shade_y],ebx
|
|
|
|
|
|
|
|
no_remove_y_cut:
|
|
|
|
mov eax,[OldX]
|
|
|
|
mov ebx,[OldY]
|
|
|
|
mov ecx,[rectangular_shade_x]
|
|
|
|
mov edx,[rectangular_shade_y]
|
|
|
|
inc eax
|
|
|
|
inc ebx
|
|
|
|
dec ecx
|
|
|
|
dec edx
|
|
|
|
|
|
|
|
mov [x],eax
|
|
|
|
mov [y],ebx
|
|
|
|
mov esi,eax
|
|
|
|
mov edi,ebx
|
|
|
|
mov [Dx_],1
|
|
|
|
mov [Dy_],1
|
|
|
|
|
|
|
|
sub ecx,eax
|
|
|
|
jnz no_signum_fill_r_x
|
|
|
|
|
|
|
|
mov [Dx_],-1
|
|
|
|
|
|
|
|
no_signum_fill_r_x:
|
|
|
|
sub edx,ebx
|
|
|
|
jnz no_signum_fill_r_y
|
|
|
|
|
|
|
|
mov [Dy_],-1
|
|
|
|
|
|
|
|
no_signum_fill_r_y:
|
|
|
|
mov [y],edi
|
|
|
|
|
|
|
|
loop_fill_rectangle_y:
|
|
|
|
mov [x],esi
|
|
|
|
|
|
|
|
loop_fill_rectangle_x:
|
|
|
|
push esi edi
|
|
|
|
mov eax,[PointerToPicture]
|
|
|
|
mov ebx,[Picture_SizeX]
|
|
|
|
mov ecx,dword 0xffffff
|
|
|
|
mov esi,[x]
|
|
|
|
mov edi,[y]
|
|
|
|
call PutPixel
|
|
|
|
pop edi esi
|
|
|
|
|
|
|
|
mov eax,[x]
|
|
|
|
add eax,[Dx_]
|
|
|
|
mov [x],eax
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_x]
|
|
|
|
jl loop_fill_rectangle_x
|
|
|
|
|
|
|
|
mov eax,[y]
|
|
|
|
add eax,[Dy_]
|
|
|
|
mov [y],eax
|
|
|
|
|
|
|
|
cmp eax,[rectangular_shade_y]
|
|
|
|
jl loop_fill_rectangle_y
|
|
|
|
|
|
|
|
call MovePictureToWorkScreen
|
|
|
|
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_cut:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< Cleare all >>>
|
|
|
|
cmp [number_menu],6
|
2010-10-04 22:40:19 +02:00
|
|
|
jne no_cleare_all
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
call cleare_work_arrea
|
|
|
|
call MovePictureToWorkScreen
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
no_cleare_all:
|
2016-03-21 18:29:30 +01:00
|
|
|
; <<< To allocate all >>>
|
|
|
|
cmp [number_menu],7
|
|
|
|
jne still ;no_to_allocate_all
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov [OldX],1
|
|
|
|
mov [OldY],1
|
|
|
|
mov eax,[Picture_SizeX]
|
|
|
|
mov ebx,[Picture_SizeY]
|
|
|
|
dec eax
|
|
|
|
dec ebx
|
|
|
|
mov [rectangular_shade_x],eax
|
|
|
|
mov [rectangular_shade_y],ebx
|
|
|
|
mov [instrument_used],1
|
|
|
|
mov [Activate_instrument],1
|
|
|
|
mov [Current_instrument],30
|
|
|
|
mov [crossing],0
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
; call TakeButtonInstruments
|
|
|
|
; call MovePictureToWorkScreen
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
;no_to_allocate_all:
|
2016-03-21 18:29:30 +01:00
|
|
|
no_edit:
|
|
|
|
;|||||||||||||||||||||||||INSTRUMENTS||||||||||||||||||||||
|
|
|
|
cmp [number_panel],5
|
|
|
|
jne no_instruments
|
|
|
|
; <<< Pencil >>>
|
|
|
|
cmp [number_menu],1
|
|
|
|
jne no_pencil
|
|
|
|
|
|
|
|
; ... todo ...
|
|
|
|
|
|
|
|
and [number_panel],0
|
|
|
|
and [number_menu],0
|
|
|
|
no_pencil:
|
|
|
|
no_instruments:
|
|
|
|
jmp still
|
2010-10-04 22:40:19 +02:00
|
|
|
;---------------------------------------------------------------------
|