fix stack error in TakeButtonInstruments

git-svn-id: svn://kolibrios.org@6362 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2016-03-22 14:12:51 +00:00
parent b51837d38b
commit 46d18b25ac
5 changed files with 224 additions and 225 deletions

View File

@ -13,6 +13,7 @@ buttons:
jne @f jne @f
mov [finishing_crossing],1 mov [finishing_crossing],1
call TakeButtonInstruments call TakeButtonInstruments
jmp still
@@: @@:
mcall SF_GET_BUTTON mcall SF_GET_BUTTON
@ -92,5 +93,4 @@ buttons:
no_kontur__: no_kontur__:
call TakeButtonInstruments call TakeButtonInstruments
jmp still jmp still

View File

@ -232,7 +232,8 @@ mouse_in_work_arrea:
mov [PointerToCopyPicture2],ebx mov [PointerToCopyPicture2],ebx
;--------------end copy for undo------------- ;--------------end copy for undo-------------
no_undo___: no_undo___:
call TakeButtonInstruments call TakeButtonInstruments
jmp still
no_use_instruments: no_use_instruments:
mov eax,[Current_instrument] mov eax,[Current_instrument]

View File

@ -153,8 +153,39 @@ local .no_draw_pixel
;----------------------------------------------------------- ;-----------------------------------------------------------
;-----instruments of panel(icon's instruments)-------------- ;-----instruments of panel(icon's instruments)--------------
;----------------------------------------------------------- ;-----------------------------------------------------------
TakeButtonInstruments: ;input:
; [Current_instrument] - instrument code
;
; *** instrument codes ***
;10 - pensil
;11 - draw brush
;12 - spray
;13 - lastik
;14 - flood fill
;15 - pipetka
;16 - draw line
;17 - draw rectangle
;18 - draw circle
;19 - draw ellips
;20 - draw hard contour
;21 - allocation of a countour
;23 - reflection from left to right
;24 - reflection from up to down
;40 - brush 1
;41 - brush 2
;42 - brush 3
;43 - brush 4
;44 - brush 5
;45 - zoom 1
;46 - zoom 2
;47 - zoom 3
;48 - zoom 4
;49 - zoom 8
;50 - zoom 16
;51 - palette
align 4
TakeButtonInstruments:
mov eax,[Current_instrument] mov eax,[Current_instrument]
;*************************brush 1*********************** ;*************************brush 1***********************
@ -168,8 +199,7 @@ TakeButtonInstruments:
mov [Current_instrument],ebx mov [Current_instrument],ebx
mov [line_width],1 mov [line_width],1
ret
jmp still
no_brush1: no_brush1:
;*************************brush 2*********************** ;*************************brush 2***********************
@ -183,8 +213,7 @@ TakeButtonInstruments:
mov [Current_instrument],ebx mov [Current_instrument],ebx
mov [line_width],2 mov [line_width],2
ret
jmp still
no_brush2: no_brush2:
;*************************brush 3*********************** ;*************************brush 3***********************
@ -198,8 +227,7 @@ TakeButtonInstruments:
mov [Current_instrument],ebx mov [Current_instrument],ebx
mov [line_width],3 mov [line_width],3
ret
jmp still
no_brush3: no_brush3:
;*************************brush 4*********************** ;*************************brush 4***********************
@ -213,8 +241,7 @@ TakeButtonInstruments:
mov [Current_instrument],ebx mov [Current_instrument],ebx
mov [line_width],4 mov [line_width],4
ret
jmp still
no_brush4: no_brush4:
;*************************brush 5*********************** ;*************************brush 5***********************
@ -228,8 +255,7 @@ TakeButtonInstruments:
mov [Current_instrument],ebx mov [Current_instrument],ebx
mov [line_width],5 mov [line_width],5
ret
jmp still
no_brush5: no_brush5:
;*************************pensil************************ ;*************************pensil************************
@ -261,9 +287,6 @@ TakeButtonInstruments:
no_activated_later: no_activated_later:
; mov eax,[MaxWorkScreen_SizeX] ???
; mov ebx,[MaxWorkScreen_SizeY] ???
mov eax,[PointerToPicture] mov eax,[PointerToPicture]
mov ebx,[ReserveArray] mov ebx,[ReserveArray]
mov ecx,[Picture_SizeX] mov ecx,[Picture_SizeX]
@ -302,31 +325,9 @@ TakeButtonInstruments:
call MovePictureToWorkScreen call MovePictureToWorkScreen
mov [Activate_instrument],1 mov [Activate_instrument],1
jmp still ret
no_pensil: no_pensil:
;*************************pipetka***********************
cmp eax,15
jne no_pipetka
mov eax,[ScreenY]
mov ebx,[Picture_SizeX]
add eax,[PosY]
imul eax,ebx
add eax,[ScreenX]
add eax,[PosX]
lea eax,[eax+eax*2]
add eax,[PointerToPicture]
mov ebx,[eax]
and ebx,0xffffff
mov [Color],ebx
mcall SF_DRAW_RECT, ((ci_panel_x_pos+130) shl 16)+21,\
((ci_panel_y_pos+28) shl 16)+21, [Color]
jmp still
no_pipetka:
;*************************draw brush******************** ;*************************draw brush********************
cmp eax,11 cmp eax,11
jne no_brush jne no_brush
@ -475,9 +476,40 @@ TakeButtonInstruments:
mov eax,[Current_instrument] mov eax,[Current_instrument]
mov [Last_instrument],eax mov [Last_instrument],eax
jmp still ret
no_brush: no_brush:
;*************************pipetka***********************
cmp eax,15
jne no_pipetka
mov eax,[ScreenY]
mov ebx,[Picture_SizeX]
add eax,[PosY]
imul eax,ebx
add eax,[ScreenX]
add eax,[PosX]
lea eax,[eax+eax*2]
add eax,[PointerToPicture]
mov ebx,[eax]
and ebx,0xffffff
mov [Color],ebx
mcall SF_DRAW_RECT, ((ci_panel_x_pos+130) shl 16)+21,\
((ci_panel_y_pos+28) shl 16)+21, [Color]
ret
no_pipetka:
;************************lastik*************************
cmp eax,13
jne no_lastik
mov [Last_instrument],eax
mov [lastik_is_active],1
jmp lastik_in
no_lastik:
;************************Flood Fill********************* ;************************Flood Fill*********************
cmp eax,14 cmp eax,14
jne no_FloodFill jne no_FloodFill
@ -513,28 +545,17 @@ TakeButtonInstruments:
call flood_fill call flood_fill
call MovePictureToWorkScreen call MovePictureToWorkScreen
ret
jmp still
no_FloodFill: no_FloodFill:
;************************lastik************************* ;************************spray**************************
cmp eax,13
jne no_lastik
mov [Last_instrument],eax
mov [lastik_is_active],1
jmp lastik_in
no_lastik:
;*******************************************************
cmp eax,12 cmp eax,12
jne no_spray jne no_spray
cmp [Activate_instrument],0 cmp [Activate_instrument],0
jne no_null_spray jne no_null_spray
mov [Activate_instrument],1 mov [Activate_instrument],1
jmp still ret
no_null_spray: no_null_spray:
mov eax,[ScreenX] mov eax,[ScreenX]
@ -610,8 +631,7 @@ TakeButtonInstruments:
jl brush_y_spray jl brush_y_spray
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_spray: no_spray:
;************************palette************************ ;************************palette************************
@ -649,24 +669,22 @@ TakeButtonInstruments:
jnz next_rectangle jnz next_rectangle
wait_events: wait_events:
call event mcall SF_WAIT_EVENT
cmp eax,1 cmp eax,1
je still jne @f
ret
@@:
cmp eax,2 cmp eax,2
jne no_keys jne no_keys
mcall SF_GET_KEY
mcall SF_GET_KEY jmp wait_events
no_keys: no_keys:
cmp eax,3 cmp eax,3
jne no_buttons jne no_buttons
mcall SF_GET_BUTTON mcall SF_GET_BUTTON
jmp wait_events
no_buttons: no_buttons:
cmp eax,6 cmp eax,6
jne wait_events jne wait_events
@ -716,8 +734,7 @@ TakeButtonInstruments:
mov eax,[Last_instrument] mov eax,[Last_instrument]
mov [Current_instrument],eax mov [Current_instrument],eax
ret
jmp still
no_palette: no_palette:
;************************draw line********************** ;************************draw line**********************
@ -739,8 +756,9 @@ TakeButtonInstruments:
xor eax,eax xor eax,eax
mov ecx,mem_flood_f/4 mov ecx,mem_flood_f/4
mov edi,[ReserveArray] mov edi,[ReserveArray]
cld
rep stosd rep stosd
jmp still ret
no_new_line_xy: no_new_line_xy:
;put saved pixels ;put saved pixels
@ -782,7 +800,7 @@ TakeButtonInstruments:
draw_calc_pixels width_pixels draw_calc_pixels width_pixels
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_line: no_line:
;************************draw rectangle***************** ;************************draw rectangle*****************
@ -804,8 +822,9 @@ TakeButtonInstruments:
xor eax,eax xor eax,eax
mov ecx,mem_flood_f/4 mov ecx,mem_flood_f/4
mov edi,[ReserveArray] mov edi,[ReserveArray]
cld
rep stosd rep stosd
jmp still ret
no_new_rectangle_xy: no_new_rectangle_xy:
;put saved pixels ;put saved pixels
@ -847,7 +866,7 @@ TakeButtonInstruments:
draw_calc_pixels width_pixels_rectangle draw_calc_pixels width_pixels_rectangle
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_rectangle: no_rectangle:
;************************draw circle******************** ;************************draw circle********************
@ -869,8 +888,9 @@ TakeButtonInstruments:
xor eax,eax xor eax,eax
mov ecx,mem_flood_f/4 mov ecx,mem_flood_f/4
mov edi,[ReserveArray] mov edi,[ReserveArray]
cld
rep stosd rep stosd
jmp still ret
no_new_circle_xy: no_new_circle_xy:
;put saved pixels ;put saved pixels
@ -999,7 +1019,7 @@ TakeButtonInstruments:
draw_calc_pixels width_pixels draw_calc_pixels width_pixels
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_circle: no_circle:
;************************zoom 1************************* ;************************zoom 1*************************
@ -1009,7 +1029,7 @@ TakeButtonInstruments:
call scrollbar_move_00 call scrollbar_move_00
and [Current_instrument],0 and [Current_instrument],0
call drawwin call drawwin
jmp still ret
no_1_: no_1_:
;************************zoom 2************************* ;************************zoom 2*************************
@ -1019,10 +1039,9 @@ TakeButtonInstruments:
call drawwin call drawwin
call scrollbar_move_00 call scrollbar_move_00
and [Current_instrument],0 and [Current_instrument],0
jmp still ret
no_2_: no_2_:
;************************zoom 3************************* ;************************zoom 3*************************
cmp eax,47 cmp eax,47
jne no_3_ jne no_3_
@ -1030,7 +1049,7 @@ TakeButtonInstruments:
call drawwin call drawwin
call scrollbar_move_00 call scrollbar_move_00
and [Current_instrument],0 and [Current_instrument],0
jmp still ret
no_3_: no_3_:
;************************zoom 4************************* ;************************zoom 4*************************
@ -1040,7 +1059,7 @@ TakeButtonInstruments:
call drawwin call drawwin
call scrollbar_move_00 call scrollbar_move_00
and [Current_instrument],0 and [Current_instrument],0
jmp still ret
no_4_: no_4_:
;************************zoom 8************************* ;************************zoom 8*************************
@ -1050,7 +1069,7 @@ TakeButtonInstruments:
call drawwin call drawwin
call scrollbar_move_00 call scrollbar_move_00
and [Current_instrument],0 and [Current_instrument],0
jmp still ret
no_8_: no_8_:
;************************zoom 16************************ ;************************zoom 16************************
@ -1060,7 +1079,7 @@ TakeButtonInstruments:
call drawwin call drawwin
call scrollbar_move_00 call scrollbar_move_00
and [Current_instrument],0 and [Current_instrument],0
jmp still ret
no_16_: no_16_:
;***************allocation of a countour**************** ;***************allocation of a countour****************
@ -1090,8 +1109,9 @@ TakeButtonInstruments:
xor eax,eax xor eax,eax
mov ecx,mem_flood_f/4 mov ecx,mem_flood_f/4
mov edi,[ReserveArray] mov edi,[ReserveArray]
cld
rep stosd rep stosd
jmp still ret
no_new_allocation_xy: no_new_allocation_xy:
instrument_not_finished_work: instrument_not_finished_work:
@ -1186,8 +1206,8 @@ TakeButtonInstruments:
mov edi,[SpriteSizeY] mov edi,[SpriteSizeY]
add ecx,[PosX] add ecx,[PosX]
add edx,[PosY] add edx,[PosY]
inc esi;eax inc esi
inc edi;ebx inc edi
call columnus call columnus
test eax,eax test eax,eax
@ -1316,7 +1336,7 @@ TakeButtonInstruments:
and [instrument_used],0 and [instrument_used],0
and [DrawSprite_flag],0 and [DrawSprite_flag],0
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
not_finish_from_instrument_crossing: not_finish_from_instrument_crossing:
;calculate line ;calculate line
@ -1410,7 +1430,7 @@ TakeButtonInstruments:
no_save_shades: no_save_shades:
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_allocation: no_allocation:
;*************reflection from left to right************* ;*************reflection from left to right*************
@ -1493,7 +1513,7 @@ TakeButtonInstruments:
jnz next_line_reflection_x jnz next_line_reflection_x
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_reflection_from_left_to_right: no_reflection_from_left_to_right:
;*************reflection from up to down**************** ;*************reflection from up to down****************
@ -1545,7 +1565,7 @@ TakeButtonInstruments:
jnz next_lines_reflection jnz next_lines_reflection
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ret
no_reflection_from_up_to_down: no_reflection_from_up_to_down:
;*********************draw hard contour***************** ;*********************draw hard contour*****************
@ -1636,10 +1656,9 @@ TakeButtonInstruments:
mov [used_OldY],ebx mov [used_OldY],ebx
call MovePictureToWorkScreen call MovePictureToWorkScreen
ret
jmp still
no_kontur_: no_kontur_:
;************************draw ellips******************** ;************************draw ellips********************
cmp eax,19 cmp eax,19
jne no_ellips jne no_ellips
@ -1659,8 +1678,9 @@ TakeButtonInstruments:
xor eax,eax xor eax,eax
mov ecx,mem_flood_f/4 mov ecx,mem_flood_f/4
mov edi,[ReserveArray] mov edi,[ReserveArray]
cld
rep stosd rep stosd
jmp still ret
no_new_ellips_xy: no_new_ellips_xy:
;put saved pixels ;put saved pixels
@ -1781,9 +1801,7 @@ TakeButtonInstruments:
draw_calc_pixels width_pixels draw_calc_pixels width_pixels
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp still ;ret
no_ellips: no_ellips:
jmp still
ret ret

View File

@ -2,6 +2,18 @@ KMENUITEM_NORMAL equ 0
KMENUITEM_SUBMENU equ 1 KMENUITEM_SUBMENU equ 1
KMENUITEM_SEPARATOR equ 2 KMENUITEM_SEPARATOR equ 2
macro menu_set code, m_group, m_number
{
local no_set
cmp eax, code
jne no_set
mov [number_panel], m_group
mov [number_menu], m_number
jmp TakeInstruments
no_set:
}
init_main_menu: init_main_menu:
stdcall [kmenu_init], syscolors stdcall [kmenu_init], syscolors
@ -58,6 +70,28 @@ init_main_menu:
; init 'Edit' menu ; init 'Edit' menu
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Pencil, 0x51 stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Pencil, 0x51
stdcall [ksubmenu_add], [main_menu_instr], eax stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Brush, 0x52
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Spray, 0x53
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Lastik, 0x54
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Flood_fill, 0x55
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Pipetka, 0x56
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Line, 0x57
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Rectangle, 0x58
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Circle, 0x59
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Ellips, 0x5a
stdcall [ksubmenu_add], [main_menu_instr], eax
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Hard_contour, 0x5b
stdcall [ksubmenu_add], [main_menu_instr], eax
; add 'Instruments' menu to main ; add 'Instruments' menu to main
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Instr, [main_menu_instr] stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Instr, [main_menu_instr]
@ -70,78 +104,28 @@ put_main_menu:
ret ret
button_handler_main_menu: button_handler_main_menu:
cmp eax, 0x71 menu_set 0x71, 7,1
jne @f menu_set 0x72, 7,2
mov [number_panel], 7 menu_set 0x73, 7,3
mov [number_menu], 1 menu_set 0x74, 7,4
jmp TakeInstruments menu_set 0x75, 7,5
@@: menu_set 0x61, 6,1
cmp eax, 0x72 menu_set 0x62, 6,2
jne @f menu_set 0x63, 6,3
mov [number_panel], 7 menu_set 0x64, 6,4
mov [number_menu], 2 menu_set 0x65, 6,5
jmp TakeInstruments menu_set 0x66, 6,6
@@: menu_set 0x51, 5,1
cmp eax, 0x73 menu_set 0x52, 5,2
jne @f menu_set 0x53, 5,3
mov [number_panel], 7 menu_set 0x54, 5,4
mov [number_menu], 3 menu_set 0x55, 5,5
jmp TakeInstruments menu_set 0x56, 5,6
@@: menu_set 0x57, 5,7
cmp eax, 0x74 menu_set 0x58, 5,8
jne @f menu_set 0x59, 5,9
mov [number_panel], 7 menu_set 0x5a, 5,10
mov [number_menu], 4 menu_set 0x5b, 5,11
jmp TakeInstruments
@@:
cmp eax, 0x75
jne @f
mov [number_panel], 7
mov [number_menu], 5
jmp TakeInstruments
@@:
cmp eax, 0x61
jne @f
mov [number_panel], 6
mov [number_menu], 1
jmp TakeInstruments
@@:
cmp eax, 0x62
jne @f
mov [number_panel], 6
mov [number_menu], 2
jmp TakeInstruments
@@:
cmp eax, 0x63
jne @f
mov [number_panel], 6
mov [number_menu], 3
jmp TakeInstruments
@@:
cmp eax, 0x64
jne @f
mov [number_panel], 6
mov [number_menu], 4
jmp TakeInstruments
@@:
cmp eax, 0x65
jne @f
mov [number_panel], 6
mov [number_menu], 5
jmp TakeInstruments
@@:
cmp eax, 0x66
jne @f
mov [number_panel], 6
mov [number_menu], 6
jmp TakeInstruments
@@:
cmp eax, 0x51
jne @f
mov [number_panel], 5
mov [number_menu], 1
jmp TakeInstruments
@@:
.end_handler: .end_handler:
ret ret
@ -167,3 +151,13 @@ sz_main_menu_Edit_ClS db 'Clear screen', 0
sz_main_menu_Instr db 'Instruments', 0 sz_main_menu_Instr db 'Instruments', 0
sz_main_menu_Instr_Pencil db 'Pencil', 0 sz_main_menu_Instr_Pencil db 'Pencil', 0
sz_main_menu_Instr_Brush db 'Brush', 0
sz_main_menu_Instr_Spray db 'Spray', 0
sz_main_menu_Instr_Lastik db 'Lastik', 0
sz_main_menu_Instr_Flood_fill db 'Flood fill', 0
sz_main_menu_Instr_Pipetka db 'Pipetka', 0
sz_main_menu_Instr_Line db 'Line', 0
sz_main_menu_Instr_Rectangle db 'Rectangle', 0
sz_main_menu_Instr_Circle db 'Circle', 0
sz_main_menu_Instr_Ellips db 'Ellips', 0
sz_main_menu_Instr_Hard_contour db 'Hard contour', 0

View File

@ -1,6 +1,18 @@
macro instrument_set m_num, code
{
local no_instrument
cmp [number_menu],m_num
jne no_instrument
mov [Current_instrument],code
call TakeButtonInstruments
jmp end_menu
no_instrument:
}
;----------------------------------------------------------- ;-----------------------------------------------------------
;-----------instruments of menu----------------------------- ;-----------instruments of menu-----------------------------
;----------------------------------------------------------- ;-----------------------------------------------------------
align 4
TakeInstruments: TakeInstruments:
;|||||||||||||||||||FILE|||||||||||||||||||||| ;|||||||||||||||||||FILE||||||||||||||||||||||
cmp [number_panel],7 cmp [number_panel],7
@ -99,12 +111,10 @@ exit_new:
call GetMemory call GetMemory
and [save_flag],0 and [save_flag],0
and [number_panel],0
and [number_menu],0
call cleare_work_arrea call cleare_work_arrea
call drawwin call drawwin
jmp still jmp end_menu
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_new: no_new:
; <<< Open >>> ; <<< Open >>>
@ -118,16 +128,13 @@ no_new:
call [OpenDialog_Start] call [OpenDialog_Start]
cmp [OpenDialog_data.status],1 cmp [OpenDialog_data.status],1
jne still jne end_menu
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
mcall SF_SET_EVENTS_MASK,0x80000027 ;100111b mcall SF_SET_EVENTS_MASK,0x80000027 ;100111b
call load_picture call load_picture
call drawwin call drawwin
jmp end_menu
and [number_panel],0
and [number_menu],0
jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_open: no_open:
; <<< Save >>> ; <<< Save >>>
@ -135,15 +142,10 @@ no_open:
jne no_save_ jne no_save_
mov al,[save_flag] mov al,[save_flag]
test al,al test al,al
jz no_save_file jz end_menu
jmp save_enter jmp save_enter
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_save_file:
and [number_panel],0
and [number_menu],0
jmp still
;---------------------------------------------------------------------
no_save_: no_save_:
; <<< Save as >>> ; <<< Save as >>>
cmp [number_menu],4 cmp [number_menu],4
@ -171,7 +173,7 @@ no_save_:
stdcall [OpenDialog_Start],OpenDialog_data stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],1 cmp [OpenDialog_data.status],1
jne still jne end_menu
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
save1: save1:
save_enter: save_enter:
@ -195,15 +197,8 @@ save_enter:
call save_file call save_file
mov [save_flag],1 mov [save_flag],1
and [number_panel],0 call drawwin
and [number_menu],0 jmp end_menu
call drawwin
jmp still
;---------------------------------------------------------------------
;save2:
; and [number_panel],0
; and [number_menu],0
; jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_save: no_save:
; <<< Exit >>> ; <<< Exit >>>
@ -235,9 +230,7 @@ no_file:
mov [PointerToCopyPicture2],eax mov [PointerToCopyPicture2],eax
call MovePictureToWorkScreen call MovePictureToWorkScreen
and [number_panel],0 jmp end_menu
and [number_menu],0
jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_undo: no_undo:
; <<< Redo >>> ; <<< Redo >>>
@ -257,9 +250,7 @@ no_undo:
mov [PointerToCopyPicture2],ebx mov [PointerToCopyPicture2],ebx
call MovePictureToWorkScreen call MovePictureToWorkScreen
and [number_panel],0 jmp end_menu
and [number_menu],0
jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_redo: no_redo:
; <<< Copy >>> ; <<< Copy >>>
@ -355,11 +346,8 @@ loop_fill_rectangle_x_copy:
jl loop_fill_rectangle_y_copy jl loop_fill_rectangle_y_copy
call MovePictureToWorkScreen call MovePictureToWorkScreen
and [number_panel],0
and [number_menu],0
mov [DrawSprite_flag],1 mov [DrawSprite_flag],1
jmp still jmp end_menu
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_copy: no_copy:
; <<< Paste >>> ; <<< Paste >>>
@ -451,10 +439,8 @@ loop_fill_rectangle_x_paste:
jl loop_fill_rectangle_y_paste jl loop_fill_rectangle_y_paste
call MovePictureToWorkScreen call MovePictureToWorkScreen
and [number_panel],0
and [number_menu],0
mov [Paste_flag],1 mov [Paste_flag],1
jmp still jmp end_menu
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_paste: no_paste:
; <<< Cut >>> ; <<< Cut >>>
@ -544,10 +530,7 @@ loop_fill_rectangle_x:
jl loop_fill_rectangle_y jl loop_fill_rectangle_y
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp end_menu
and [number_panel],0
and [number_menu],0
jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_cut: no_cut:
; <<< Cleare all >>> ; <<< Cleare all >>>
@ -556,15 +539,12 @@ no_cut:
call cleare_work_arrea call cleare_work_arrea
call MovePictureToWorkScreen call MovePictureToWorkScreen
jmp end_menu
and [number_panel],0
and [number_menu],0
jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
no_cleare_all: no_cleare_all:
; <<< To allocate all >>> ; <<< To allocate all >>>
cmp [number_menu],7 cmp [number_menu],7
jne still ;no_to_allocate_all jne end_menu ;no_to_allocate_all
mov [OldX],1 mov [OldX],1
mov [OldY],1 mov [OldY],1
@ -578,26 +558,32 @@ no_cleare_all:
mov [Activate_instrument],1 mov [Activate_instrument],1
mov [Current_instrument],30 mov [Current_instrument],30
mov [crossing],0 mov [crossing],0
and [number_panel],0
and [number_menu],0
; call TakeButtonInstruments ; call TakeButtonInstruments
; call MovePictureToWorkScreen ; call MovePictureToWorkScreen
jmp still jmp end_menu
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;no_to_allocate_all: ;no_to_allocate_all:
no_edit: no_edit:
;|||||||||||||||||||||||||INSTRUMENTS|||||||||||||||||||||| ;|||||||||||||||||||||||||INSTRUMENTS||||||||||||||||||||||
cmp [number_panel],5 cmp [number_panel],5
jne no_instruments jne no_instruments
; <<< Pencil >>>
cmp [number_menu],1
jne no_pencil
; ... todo ... instrument_set 1,10 ; pensil
instrument_set 2,11 ; draw brush
instrument_set 3,12 ; spray
instrument_set 4,13 ; lastik
instrument_set 5,14 ; flood fill
instrument_set 6,15 ; pipetka
instrument_set 7,16 ; draw line
instrument_set 8,17 ; draw rectangle
instrument_set 9,18 ; draw circle
instrument_set 10,19 ; draw ellips
instrument_set 11,20 ; draw hard contour
no_instruments:
end_menu:
and [number_panel],0 and [number_panel],0
and [number_menu],0 and [number_menu],0
no_pencil:
no_instruments:
jmp still jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------