kolibrios-fun/programs/media/log_el/trunk/log_el.asm

2615 lines
59 KiB
NASM
Raw Normal View History

use32
org 0
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><EFBFBD><E1AFAE><EFBFBD><EFA5AC><EFBFBD><><E4A0A9> <20><EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
dd 1,start,i_end,mem,stacktop,0,sys_path
ini_def_c_bkgnd equ 0
ini_def_c_border equ 0xff0000
color_s0 equ 0xff ;ᨣ<><E1A8A3><EFBFBD> 0
color_s1 equ 0xffffff ;ᨣ<><E1A8A3><EFBFBD> 1
color_s2 equ 0xff00 ;<3B><><20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A5AD>
color_s3 equ 0xff0000 ;<3B><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD>
color_border dd ini_def_c_border
opt_sign_moves dd 4
opt_fast_mode dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E0A5A6>
debug equ 0
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
el_icon_group equ 0 ;<3B><><EFBFBD><E3AFAF><EFBFBD><EFBFBD>
el_icon_points equ 1 ;<3B><>
el_icon_sub_points equ 2 ;<3B><><EFBFBD><EFBFBD><EFBFBD>
el_icon_elems equ 3 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_icon_captions equ 4 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
size_el_opt equ 34 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_offs_nam equ 0 ;ᬥ饭<E1ACA5><E9A5AD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_offs_col equ 16 ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_offs_box_x equ 20 ;<3B><><EFBFBD> <20><><EFBFBD><E0AEA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_offs_box_y equ 21 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0AEA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_offs_table equ 22 ;㪠<><E3AAA0><EFBFBD> <20><><><E2A0A1><EFBFBD><EFBFBD><><E0A0A1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_offs_legs_inp equ 26 ;㪠<><E3AAA0><EFBFBD> <20><><><E2A0A1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1A0AD> <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD>
el_offs_legs_out equ 30 ;ᬥ饭<E1ACA5><E9A5AD> <20><> <20><><EFBFBD><EFBFBD><E1A0AD> <20><><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD>
sp_offs_el_angle equ 8 ;ᬥ饭<E1ACA5><E9A5AD> <20><><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᪥
sp_offs_el_type equ 9 ;ᬥ饭<E1ACA5><E9A5AD> <20><><EFBFBD> <> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᪥
points_max equ 1000
capt_offs equ 10 ;ᬥ饭<E1ACA5><E9A5AD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> tree1
include '../../../macros.inc'
include '../../../proc32.inc'
include '../../../KOSfuncs.inc'
include '../../../load_img.inc'
include '../../../load_lib.mac'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include 'le_pole.inc'
include 'le_signal.inc'
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 13.02.16',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
panel_0_coord_top equ 5 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> 0-<2D><> <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
panel_1_coord_top equ 35
panel_2_coord_top equ 60
panel_3_coord_top equ 85
;input:
; eax - coord x
; ebx - coord y
;output:
; eax - coord x + d_x * cos(angle)
; ebx - coord y + d_x * sin(angle)
align 4
proc move_rotate_x_n90 uses ecx edi, d_x:dword, angle:dword
mov edi,[angle] ;㣮<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> / 90 (<28><> 0-3)
and edi,3
shl edi,4 ;edi*=16
add edi,mcs
mov ecx,[d_x]
imul ecx,dword[edi]
add eax,ecx
mov ecx,[d_x]
imul ecx,dword[edi+8]
add ebx,ecx
ret
endp
macro elOpt nam,col,box_x,box_y,table, tbl_i_legs, ol0, ol1, ol2
{
@@: db nam,0
rb @b+el_offs_col-$
dd col
db box_x
db box_y
dd table+0 ;+el_offs_table
dd tbl_i_legs+0 ;+26 <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
;+30 <20><><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
db ol0+0, ol1+0, ol2+0, 0
}
align 4
el_opt_beg:
elOpt 'or[2]', 0xff00ff,5,5,tbl_or, tbl_il_2, 2
elOpt 'or[3]', 0xff00ff,5,7,tbl_or, tbl_il_3, 3
elOpt 'or[4]', 0xff00ff,5,9,tbl_or, tbl_il_4, 4
elOpt 'and[2]',0xffff00,5,5,tbl_and.2, tbl_il_2, 2
elOpt 'and[3]',0xffff00,5,7,tbl_and.3, tbl_il_3, 3
elOpt 'and[4]',0xffff00,5,9,tbl_and.4, tbl_il_4, 4
elOpt 'and[5]',0xffff00,5,11,tbl_and.5, tbl_il_5, 5
elOpt 'not', 0xffff, 3,3,tbl_not, tbl_il_1, 1
elOpt 'xor', 0x8000ff,5,5,tbl_xor, tbl_il_2, 2
elOpt 'sm[1]', 0x8080ff,7,7,tbl_sm, tbl_il_3, 1,4
elOpt 'ms[2]', 0x8080ff,7,14,tbl_ms_2, tbl_il_m2,6
elOpt 'ms[2]e',0x8080ff,7,17,tbl_ms_2_e,tbl_il_m2e,8
;elOpt 'cd[8]', 0x8000, 7,17,tbl_cd_8,tbl_il_8, 6,2,2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 8 <20><EFBFBD><E5AEA4>
.end:
elOpt '???', 0x808080,3,3,tbl_and.3, tbl_il_1, 1 ;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;⠡<><E2A0A1><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A0A2><EFBFBD><><E0A0A1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
tbl_or db 0,1,1,1, 1,1,1,1 ;or2, or3
db 1,1,1,1,1,1,1,1 ;or4
tbl_and:
.5: dq 0,0
.4: dq 0
.3: dd 0
.2: db 0,0,0,1
tbl_xor db 0,1,1,0
tbl_sm db 0,2,2,1, 2,1,1,3
tbl_not db 1,0 ;not
;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A8AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> 2-<2D><><EFBFBD><EFA4AD><EFBFBD><><E1A8A3><EFBFBD><EFBFBD>
align 4
tbl_ms_2_e: ;<3B><> <20><EFBFBD><E5AEA4> 'e'
dq 0,0,0,0,0,0,0,0
tbl_ms_2:
db 0,1,0,1,0,1,0,1
db 0,1,0,1,0,1,0,1
db 0,0,1,1,0,0,1,1
db 0,0,1,1,0,0,1,1
db 0,0,0,0,1,1,1,1
db 0,0,0,0,1,1,1,1
dq 0
db 1,1,1,1,1,1,1,1
;tbl_cd_8 db ;256=2^8
;⠡<><E2A0A1><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD>
tbl_il_1 db 1,0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 1 <20><><EFBFBD><EFBFBD>
tbl_il_2 db 1,2,0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 2 <20><><EFBFBD><EFBFBD>
tbl_il_3 db 1,2,2,0
tbl_il_4 db 1,2,2,2,0
tbl_il_5 db 1,2,2,2,2,0
tbl_il_m2 db 1,2,2,2,3,2,0
tbl_il_m2e db 1,2,2,2,3,2,3,0
;tbl_il_8 db 1,2,2,2,2,2,2,2,0
time dd 0
tim_ch db 0
pen_mode dd 0 ;<><E0A5A6> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD>
pen_coord_x dd 0 ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x <20><>砫쭮<E7A0AB> <20><><20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD>
pen_coord_y dd 0
txt_set_0 db '0',0
txt_set_1 db '1',0
;txt_mov_l db 27,0 ;<-
;txt_mov_r db 26,0 ;->
txt_size db 'size',0
txt_elements db 'elements',0
txt_points db 'points',0
txt_sub_points db 'subpoints',0
txt_captions db 'captions',0
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><20><>ᮢ, <20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><E3A5AC> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢ ᨣ<><E1A8A3><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
mcs dd 1, 0, 0, 1,\
0, 1,-1, 0,\
-1, 0, 0,-1,\
0,-1, 1, 0
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
cursors_count equ 4
ini_name db 'log_el.ini',0 ;<3B><><EFBFBD><><E4A0A9>
ini_sec_color db 'Colors',0
key_color_bkgnd db 'background',0
key_color_border db 'border',0
key_color_s0 db 's0',0
key_color_s1 db 's1',0
key_color_s2 db 's2',0
key_color_captions db 'captions',0
ini_sec_options db 'Options',0
key_opt_sign_moves db 'signal_moves',0
key_opt_fast_mode db 'fast_mode',0
align 4
start:
load_libraries l_libs_start,l_libs_end
;<3B><EFBFBD><20><><>쪮 㤠筮 <20><><EFBFBD><EFBFBD><E3A7A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebp,lib4
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall SF_TERMINATE_PROCESS
@@:
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
mcall SF_SET_EVENTS_MASK,0x27
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> *.ini 䠩<><E4A0A9>
copy_path ini_name,sys_path,file_name,0
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_bkgnd,ini_def_c_bkgnd
mov dword[buf_0.color],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_border,ini_def_c_border
mov dword[color_border],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_s0,color_s0
mov dword[shem_colors],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_s1,color_s1
mov dword[shem_colors+4],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_s2,color_s2
mov dword[shem_colors+8],eax
stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_captions,[color_captions]
mov dword[color_captions],eax
mov ebx,el_opt_beg+el_offs_nam
mov ecx,(el_opt_beg.end-el_opt_beg)/size_el_opt ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cld
@@:
push ecx
stdcall dword[ini_get_color],file_name,ini_sec_color,ebx,[ebx+el_offs_col-el_offs_nam]
pop ecx
mov dword[ebx+el_offs_col-el_offs_nam],eax
add ebx,size_el_opt
loop @b
stdcall dword[ini_get_int],file_name,ini_sec_options,key_opt_sign_moves,[opt_sign_moves]
mov dword[opt_sign_moves],eax
stdcall dword[ini_get_int],file_name,ini_sec_options,key_opt_fast_mode,[opt_fast_mode]
mov dword[opt_fast_mode],eax
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [OpenDialog_Init],OpenDialog_data
stdcall [buf2d_create], buf_0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
load_image_file 'toolbar.png', image_data_toolbar
stdcall pole_init, pole
stdcall dword[tl_data_init], tree1
stdcall dword[tl_data_init], tree2
;<3B><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 16*16 <20><><EFBFBD> tree_list
load_image_file 'tl_sys_16.png', icon_tl_sys
;<3B><20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EBABAE>, <20><> <20> icon_tl_sys <20><><EFBFBD><EFBFBD><EFBFBD>
;<3B><> <20><><EFBFBD><EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><EFBFBD><E8A8A1> <20><> <20><EFBFBD>, <20>. <20>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E3A6AD><EFBFBD><><E0A0A7><EFBFBD><EFBFBD>
mov eax,dword[icon_tl_sys]
mov dword[tree1.data_img_sys],eax
mov dword[tree2.data_img_sys],eax
load_image_file 'objects.png', icon_toolbar
mov eax,dword[icon_toolbar]
mov dword[tree1.data_img],eax
mov dword[tree2.data_img],eax
;*** <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
load_image_file 'font6x9.bmp', image_data_gray
stdcall [buf2d_create_f_img], buf_font,[image_data_gray] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_conv_24_to_8], buf_font,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD> 8 <20><><EFBFBD>
stdcall [buf2d_convert_text_matrix], buf_font
;*** <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
load_image_file 'cursors_gr.png',image_data_gray
stdcall [buf2d_create_f_img], buf_curs_8,[image_data_gray] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
load_image_file 'cursors.png',image_data_gray
stdcall [buf2d_create_f_img], buf_curs,[image_data_gray] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_conv_24_to_8], buf_curs_8,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD> 8<><38><EFBFBD>
stdcall [buf2d_conv_24_to_32],buf_curs,buf_curs_8 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> rgba 32<33><32><EFBFBD>
stdcall sign_init, 3000
mov eax,el_opt_beg+el_offs_nam
mov ecx,(el_opt_beg.end-el_opt_beg)/size_el_opt ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E2A8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cld
@@:
stdcall [tl_node_add], tree2,el_icon_elems shl 16,eax
stdcall [tl_cur_next], tree2
add eax,size_el_opt
loop @b
stdcall [tl_cur_beg], tree2
;*** <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><EFBFBD><E0A5AC><EFBFBD> <20><><EFBFBD><><E2A0A9><EFBFBD><EFBFBD>
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
align 4
red_win:
call draw_window
align 4
still:
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov ebx,[last_time]
add ebx,10 ;<3B><><EFBFBD><EFBFBD><EFBFBD>
cmp ebx,eax
jge @f
mov ebx,eax
@@:
sub ebx,eax
mcall SF_WAIT_EVENT_TIMEOUT
cmp eax,0
je timer_funct
cmp al,1
jz red_win
cmp al,EV_KEY
jz key
cmp al,3
jz button
cmp al,EV_MOUSE
jne @f
call mouse
@@:
jmp still
align 4
timer_funct:
pushad
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
cmp byte[tim_ch],0
je @f
inc dword[time]
cmp dword[opt_fast_mode],0
jne .fast_m
call sign_move
stdcall [buf2d_draw], buf_0
mov eax,[time]
xor edx,edx
div dword[opt_sign_moves]
cmp edx,0 ;<3B><EFBFBD><E0AEA2><20><><EFBFBD><EFBFBD><E2ADAE><EFBFBD> opt_sign_moves
jnz @f
call sign_from_elems
call sign_from_captions
jmp @f
.fast_m:
mov ecx,[opt_sign_moves]
cld
.cycle:
call sign_move
loop .cycle
call sign_from_elems
call sign_from_captions
stdcall [buf2d_draw], buf_0
@@:
popad
jmp still
align 4
mouse:
stdcall [tl_mouse], tree1
stdcall [tl_mouse], tree2
pushad
mcall SF_MOUSE_GET,SSF_BUTTON
bt eax,0 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
jc @f
bt eax,1 ;<3B><EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
jc @f
xor eax,eax
mov [pen_coord_x],eax
mov [pen_coord_y],eax
jmp .end_buf_wnd
@@:
mov esi,eax
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION ;eax = (x shl 16) + y
cmp ax,word[buf_0.t]
jl .end_buf_wnd ;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y
mov ebx,eax
shr ebx,16
cmp bx,word[buf_0.l]
jl .end_buf_wnd ;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x
and eax,0xffff ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
sub ax,word[buf_0.t]
sub bx,word[buf_0.l]
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> zoom
movzx ecx,byte[zoom]
xor edx,edx
div ecx
xchg eax,ebx ;ebx <20><><EFBFBD><EFBFBD><EFBFBD> <20><> ecx
xor edx,edx
div ecx
sub eax,[Cor_x]
sub ebx,[Cor_y]
;*** <20><EFBFBD><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD>
bt eax,31
jc .end_buf_wnd
bt ebx,31
jc .end_buf_wnd
cmp eax,[shem_w]
jge .end_buf_wnd
cmp ebx,[shem_h]
jge .end_buf_wnd
cmp byte[pen_mode],0
jne .end_mode_0
bt esi,1
jc .end_mode_0
;<><E0A5A6> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⨨)
stdcall element_is_click,eax,ebx
test eax,eax
jz .end_buf_wnd ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
push eax
stdcall [tl_node_get_data], tree1
mov ebx,eax
pop eax
cmp eax,ebx
je .end_buf_wnd ;<3B>᫨ 㦥 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><20><><EFBFBD> <20><EFBFBD>
stdcall [tl_cur_beg], tree1
.cycle0:
push eax
stdcall [tl_node_get_data], tree1
mov ebx,eax
pop eax
test ebx,ebx
jz .end_buf_wnd
cmp eax,ebx
je @f
stdcall [tl_cur_next], tree1
jmp .cycle0
@@:
stdcall [tl_draw], tree1
jmp .end_buf_wnd
.end_mode_0:
cmp byte[pen_mode],1
jne .end_mode_1
;<><E0A5A6> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD>
cmp dword[pen_coord_x],0
jne @f
cmp dword[pen_coord_y],0
jne @f
mov [pen_coord_x],eax
mov [pen_coord_y],ebx
@@:
cmp dword[pen_coord_x],eax
je .beg_draw
cmp dword[pen_coord_y],ebx
je .beg_draw
mov ecx,eax
sub ecx,[pen_coord_x]
bt ecx,31
jnc @f
neg ecx
inc ecx
@@:
mov edx,ebx
sub edx,[pen_coord_y]
bt edx,31
jnc @f
neg edx
inc edx
@@:
cmp ecx,edx
jl @f
mov ebx,[pen_coord_y] ;<3B>ਢ離<E0A8A2> <20> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
jmp .beg_draw
@@:
mov eax,[pen_coord_x] ;<3B>ਢ離<E0A8A2> <20> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x
.beg_draw:
bt esi,1
jc @f
stdcall pole_cell_creat, pole,eax,ebx,0
;<3B><><EFBFBD> <20><> <20><><EFBFBD><E0A0AB><EFBFBD> redraw_pole <20><> <20><><EFBFBD><EFBFBD><E5AEA4>, <20>. <20>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><EFBFBD>
stdcall pole_paint, pole
stdcall [buf2d_draw], buf_0
jmp .end_buf_wnd
@@:
stdcall pole_cell_delete, pole,eax,ebx
call redraw_pole
jmp .end_buf_wnd
.end_mode_1:
cmp byte[pen_mode],2
jne @f
;<><E0A5A6> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD>
bt esi,1
jc .mode_2_del
stdcall pole_cell_creat, pole,eax,ebx,2
jmp .mode_2_draw
.mode_2_del:
;<3B><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD>
mov ecx,eax
stdcall pole_cell_find, pole,ecx,ebx
test eax,eax
jz .end_buf_wnd
stdcall pole_cell_creat, pole,ecx,ebx,0
.mode_2_draw:
stdcall pole_paint, pole
stdcall [buf2d_draw], buf_0
jmp .end_buf_wnd
@@:
cmp byte[pen_mode],3
jne @f
bt esi,1
jc @f
;<><E0A5A6> <20><><EFBFBD><EFBFBD><E0A0AD> <20><EFBFBD><E0AEA2><EFBFBD>
stdcall pole_cell_delete, pole,eax,ebx
call redraw_pole
jmp .end_buf_wnd
@@:
cmp byte[pen_mode],4
jne @f
bt esi,1
jc .rotate
;<><E0A5A6><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall shem_element_creat, eax,ebx
stdcall pole_paint, pole
stdcall [buf2d_draw], buf_0
jmp .end_buf_wnd
.rotate:
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><> 90 <20><EFBFBD>
stdcall element_is_click,eax,ebx
test eax,eax
jz .end_buf_wnd
inc byte[eax+sp_offs_el_angle]
and byte[eax+sp_offs_el_angle],3 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E0A5AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
call redraw_pole
jmp .end_buf_wnd
@@:
.end_buf_wnd:
if debug
stdcall but_test_pole, pole
end if
popad
ret
;output:
; eax - pointer to element data
align 4
proc element_is_click uses ebx ecx edx esi edi, coord_x:dword, coord_y:dword
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
@@:
cmp esi,0
je @f
cmp word[esi],el_icon_elems ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_add_p1
stdcall [tl_node_poi_get_data], tree1,esi
mov ecx,eax
movzx edx,byte[ecx+sp_offs_el_type]
imul edx,size_el_opt
add edx,el_opt_beg ;<3B><><EFBFBD><E5AEA4> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><><E1A2AE><EFBFBD><E2A2A0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,[ecx] ;element coord x
mov ebx,[ecx+4] ;element coord y
movzx edi,byte[ecx+sp_offs_el_angle]
push edi
movzx edi,byte[edx+el_offs_box_y]
dec edi
push edi
movzx edi,byte[edx+el_offs_box_x]
dec edi
push edi
stdcall move_rotate_n90 ;,[edx+el_offs_box_x],[edx+el_offs_box_y],[ecx+sp_offs_el_angle]
;Rect(eax,ebx,[ecx],[ecx+4])
stdcall point_in_rect, [coord_x],[coord_y], eax,ebx,[ecx],[ecx+4]
test eax,eax
jz .end_add_p1
mov eax,ecx
jmp .end_f
.end_add_p1:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp @b
@@:
xor eax,eax ;<3B><20><> <20><>
.end_f:
ret
endp
;<3B><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20> <20><>אַ㣮<EFACAE><EFBFBD>
;१<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> eax=0
; <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> eax=1
align 4
proc point_in_rect uses ebx ecx, px:dword, py:dword, rx0:dword, ry0:dword, rx1:dword, ry1:dword
xor eax,eax
;<3B><EFBFBD><20><> <20><><EFBFBD> x
mov ebx,[rx0]
mov ecx,[rx1]
cmp ebx,ecx
jle @f
xchg ebx,ecx
@@:
cmp ebx,[px]
jg .no_contains
cmp ecx,[px]
jl .no_contains
;<3B><EFBFBD><20><> <20><><EFBFBD> y
mov ebx,[ry0]
mov ecx,[ry1]
cmp ebx,ecx
jle @f
xchg ebx,ecx
@@:
cmp ebx,[py]
jg .no_contains
cmp ecx,[py]
jl .no_contains
;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> eax=1
inc eax
;stdcall draw_scaled_rect, [rx0],[ry0],[rx1],[ry1], 0xffffff
;stdcall [buf2d_draw], buf_0
.no_contains:
ret
endp
align 4
draw_window:
pushad
mcall SF_REDRAW,SSF_BEGIN_DRAW
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><EFBFBD><EBAFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 ࠧ <20><><EFBFBD> <20><><EFBFBD><EFBFBD>᪥) ***
mov edx,[sc.work]
or edx,(3 shl 24)+0x10000000+0x20000000
mov edi,caption
mcall SF_CREATE_WINDOW, (20 shl 16)+580,(20 shl 16)+415
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_0_coord_top shl 16)+20, 3, [sc.work_button]
add ebx,25 shl 16
mov edx,4
int 0x40
add ebx,25 shl 16
mov edx,5
int 0x40
add ebx,30 shl 16
mov edx,6 ;<3B><><EFBFBD><EFBFBD> | <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD>
int 0x40
add ebx,25 shl 16
mov edx,7
int 0x40
add ebx,25 shl 16
mov edx,8
int 0x40
add ebx,25 shl 16
mov edx,9
int 0x40
add ebx,25 shl 16
mov edx,10
int 0x40
add ebx,25 shl 16
mov edx,11
int 0x40
add ebx,25 shl 16
mov edx,12
int 0x40
add ebx,30 shl 16
mov edx,13 ;業<><EFBFBD><E0AEA2> <20><EFBFBD>
int 0x40
add ebx,25 shl 16
mov edx,14
int 0x40
add ebx,25 shl 16
mov edx,15
int 0x40
add ebx,25 shl 16
mov edx,16 ;ᤢ<><E1A4A2> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int 0x40
add ebx,25 shl 16
mov edx,17 ;ᤢ<><E1A4A2> <20><EFBFBD> <20><><EFBFBD><EFBFBD>
int 0x40
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mov edx,(7 shl 16)+panel_0_coord_top+2 ;icon new
mcall SF_PUT_IMAGE, [image_data_toolbar],(16 shl 16)+16
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon open
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon save
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(30 shl 16) ;+
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;-
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(30 shl 16) ;center
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;m
int 0x40
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
stdcall [buf2d_draw], buf_0
mov dword[wScr1.all_redraw],1
stdcall [tl_draw], tree1
mov dword[wScr2.all_redraw],1
stdcall [tl_draw], tree2
stdcall pole_draw_pok, pole
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><><E1A8A3><EFBFBD><EFBFBD><EFBFBD> set_0 <20> set_1 ***
mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_1_coord_top shl 16)+20, 20, [sc.work_button]
add ebx,25 shl 16
inc edx
int 0x40
add ebx,30 shl 16
inc edx
int 0x40
add ebx,25 shl 16
inc edx
int 0x40
add ebx,25 shl 16
inc edx
int 0x40
add ebx,25 shl 16
inc edx
int 0x40
mov ecx,[sc.work_text]
or ecx,0x80000000 ;or (1 shl 30)
;mov edi,[sc.work]
mcall SF_DRAW_TEXT, (12 shl 16)+panel_1_coord_top+6,, txt_set_0
add ebx,25 shl 16
mov edx,txt_set_1
int 0x40
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mov ebx,[image_data_toolbar]
add ebx,IMAGE_TOOLBAR_ICON_SIZE*15
mcall SF_PUT_IMAGE,, (16 shl 16)+16, (62 shl 16)+panel_1_coord_top+2
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16)
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16)
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16)
int 0x40
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD> ***
mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_2_coord_top shl 16)+20, 30, [sc.work_button]
add ebx,30 shl 16
mov edx,31
int 0x40
add ebx,25 shl 16
mov edx,32
int 0x40
add ebx,25 shl 16
mov edx,33
int 0x40
add ebx,25 shl 16
mov edx,34
int 0x40
add ebx,25 shl 16
mov edx,35
int 0x40
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mov ebx,[image_data_toolbar]
add ebx,IMAGE_TOOLBAR_ICON_SIZE*19
mcall SF_PUT_IMAGE,, (16 shl 16)+16,(7 shl 16)+panel_2_coord_top+2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(30 shl 16) ;icon - <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD>
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon - <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD>
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon - <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon - <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;icon - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40
mcall SF_REDRAW,SSF_END_DRAW
popad
ret
align 4
key:
mcall SF_GET_KEY
stdcall [tl_key], tree1
stdcall [tl_key], tree2
jmp still
align 4
button:
mcall SF_GET_BUTTON
cmp ah,3
jne @f
call but_new_file
jmp still
@@:
cmp ah,4
jne @f
call but_open_file
jmp still
@@:
cmp ah,5
jne @f
call but_save_file
jmp still
@@:
cmp ah,6
jne @f
call but_run_stop
jmp still
@@:
cmp ah,7
jne @f
call but_zoom_p
jmp still
@@:
cmp ah,8
jne @f
call but_zoom_m
jmp still
@@:
cmp ah,9
jne @f
call but_pole_left
jmp still
@@:
cmp ah,10
jne @f
call but_pole_right
jmp still
@@:
cmp ah,11
jne @f
call but_pole_up
jmp still
@@:
cmp ah,12
jne @f
call but_pole_dn
jmp still
@@:
cmp ah,13
jne @f
call but_center
jmp still
@@:
;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ꥪ⮢ <20><EFBFBD>
cmp byte[tim_ch],0
jne .no_move
cmp ah,14
jne @f
stdcall pole_move_all, pole, -1, 0
call redraw_pole
@@:
cmp ah,15
jne @f
stdcall pole_move_all, pole, 1, 0
call redraw_pole
@@:
cmp ah,16 ;ᤢ<><E1A4A2> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
jne @f
stdcall pole_move_all, pole, 0, -1
call redraw_pole
@@:
cmp ah,17 ;ᤢ<><E1A4A2> <20><EFBFBD> <20><><EFBFBD><EFBFBD>
jne @f
stdcall pole_move_all, pole, 0, 1
call redraw_pole
@@:
.no_move:
cmp ah,20
jne @f
call but_set_0
@@:
cmp ah,21
jne @f
call but_set_1
@@:
cmp ah,22
jne @f
call but_mov_l
@@:
cmp ah,23
jne @f
call but_mov_r
@@:
cmp ah,24
jne @f
call but_mov_u
@@:
cmp ah,25
jne @f
call but_mov_d
@@:
cmp ah,30
jne @f
call but_set_none
@@:
cmp ah,31
jne @f
stdcall set_pen_mode,1,0,((9 shl 8)+9) shl 16 ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <><E0A5A6><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD>
@@:
cmp ah,32
jne @f
stdcall set_pen_mode,2,1,((9 shl 8)+9) shl 16
@@:
cmp ah,33
jne @f
stdcall set_pen_mode,4,3,((9 shl 8)+9) shl 16 ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <><E0A5A6><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@:
cmp ah,35
jne @f
stdcall set_pen_mode,3,2,((15 shl 8)+9) shl 16 ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <><E0A5A6><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD> <20><EFBFBD><E0AEA2><EFBFBD>
@@:
cmp ah,1
jne still
.exit:
stdcall [buf2d_delete],buf_0
stdcall [buf2d_delete],buf_font
stdcall [buf2d_delete],buf_curs
stdcall mem.Free,[image_data_toolbar]
stdcall pole_delete, pole
call sign_delete
stdcall [tl_data_clear], tree1
;<3B><><EFBFBD>⨬ 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><20><><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD>⮬ tree1
mov dword[tree2.data_img_sys],0
mov dword[tree2.data_img],0
stdcall [tl_data_clear], tree2
cmp [cursor_pointer],0
je @f
mcall SF_MOUSE_GET,SSF_DEL_CURSOR,[cursor_pointer]
@@:
mcall SF_TERMINATE_PROCESS
;ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>
align 4
proc but_new_file uses eax
call but_set_none
stdcall [tl_info_clear],tree1
stdcall [tl_draw],tree1
xor eax,eax
mov [shem_elems],eax
mov [shem_captions],eax
stdcall pole_clear, pole
call redraw_pole
ret
endp
align 4
f_size dd 0 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
shem_w dd 192 ;<3B><><EFBFBD> <20><EFBFBD>
shem_h dd 128 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>
shem_points dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ 㧫<><E3A7AB> <20><> <20><EFBFBD>
shem_sub_points dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD><><E3A7AB> <20><> <20><EFBFBD>
shem_elems dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><> <20><EFBFBD>
shem_captions dd 0
shem_colors:
dd color_s0, color_s1, color_s2, color_s3
color_captions dd 0x808080
align 4
but_open_file:
pushad
copy_path open_dialog_name,communication_area_default_path,file_name,0
mov [OpenDialog_data.type],0
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],1 ;0 - Cancel 1 - Open 2 - Error open dialog
jne .end_open_file
;<3B><><EFBFBD> <20><><EFBFBD> 㤠筮<E3A4A0> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov [run_file_70.Function], SSF_READ_FILE
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov dword[run_file_70.Count], open_file_lif.end-open_file_lif
m2m [run_file_70.Buffer], open_file_lif
mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], openfile_path
mcall SF_FILE,run_file_70 ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A6A0><>
cmp ebx,0xffffffff
je .end_open_file
mov dword[f_size],ebx
add ebx,open_file_lif
mov byte[ebx],0 ;<3B><> <20><><EFBFBD><20>᫨ ࠭<><E0A0AD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><E4A0A9><EFBFBD>
mcall SF_SET_CAPTION,1,openfile_path
;---
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD>, <20><> <20><><EFBFBD><20><20><><E4A0A9> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A5AA><EFBFBD><EFBFBD><><E0A0A7><EFBFBD><EFBFBD>
mov dword[shem_w],5
mov dword[shem_h],5
mov esi,txt_size
call str_analiz_r
or edi,edi
jz @f
stdcall str_len,esi
add edi,eax
stdcall conv_str_to_int,edi
cmp eax,5
jl @f ;<3B><EFBFBD><E8A8A1> <20><><E4A0A9> (<28><> .end_open_file <20><> <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4>, <20><><EFBFBD><E2A0A5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0ACA0><EFBFBD>)
mov dword[shem_w],eax
call str_next_val
stdcall conv_str_to_int,edi
cmp eax,5
jl @f ;<3B><EFBFBD><E8A8A1> <20><><E4A0A9>
mov dword[shem_h],eax
@@:
stdcall [tl_info_clear],tree1
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᮪ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢ ***
stdcall [tl_node_add], tree1,(el_icon_group shl 16),txt_elements-capt_offs
stdcall [tl_cur_next], tree1
mov esi,txt_elements
call str_analiz_r
or edi,edi
jz .end_elems
stdcall str_len,esi
add edi,eax
stdcall conv_str_to_int,edi
cmp eax,0
jle .end_elems ;<3B><20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢ = 0
mov [shem_elems],eax
mov ecx,eax
.cycle_elem:
call str_next_val
stdcall conv_str_to_int,edi
mov dword[txt_buf],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x
call str_next_val
stdcall conv_str_to_int,edi
mov dword[txt_buf+4],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
call str_next_val
stdcall conv_str_to_int,edi
mov byte[txt_buf+sp_offs_el_angle],al ;<3B><><EFBFBD><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
call str_next_val
;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall el_get_name, edi,13 ;13 - ascii code
mov byte[txt_buf+sp_offs_el_type],al ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall make_list_capts,txt_buf,edi
stdcall [tl_node_add], tree1,(el_icon_elems shl 16)+1,txt_buf
stdcall [tl_cur_next], tree1
dec ecx
jnz .cycle_elem
.end_elems:
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᮪ ⥪<><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD>ᥩ ***
stdcall [tl_node_add], tree1,(el_icon_group shl 16),txt_captions-capt_offs
stdcall [tl_cur_next], tree1
mov esi,txt_captions
call str_analiz_r
cmp edi,0
je .end_captions
stdcall str_len,esi
add edi,eax
stdcall conv_str_to_int,edi
cmp eax,0
jle .end_captions ;<3B><20><><20><><EFBFBD><EFBFBD><EFBFBD>ᥩ = 0
mov [shem_captions],eax
mov ecx,eax
.cycle_captions:
call str_next_val
stdcall conv_str_to_int,edi
mov dword[txt_buf],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x
call str_next_val
stdcall conv_str_to_int,edi
mov dword[txt_buf+4],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
call str_next_val
mov al,byte[edi]
mov byte[txt_buf+8],al ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ('z' - ᨣ<><E1A8A3><EFBFBD> <20> 0, 'o' - ᨣ<><E1A8A3><EFBFBD> <20> 1, 'n' - <20><><EFBFBD><><E1A8A3><EFBFBD><EFBFBD>)
call str_next_val
stdcall make_list_capts,txt_buf,edi
stdcall [tl_node_add], tree1,(el_icon_captions shl 16)+1,txt_buf
stdcall [tl_cur_next], tree1
dec ecx
jnz .cycle_captions
.end_captions:
mov byte[txt_buf+capt_offs],0 ;<3B><><EFBFBD><EFBFBD><E3ABA5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᮪ <20><><EFBFBD><EFBFBD><E7A5A2> <20><>祪 ***
stdcall [tl_node_add], tree1,(el_icon_group shl 16),txt_points-capt_offs
stdcall [tl_cur_next], tree1
mov dword[shem_points],0
mov esi,txt_points
call str_analiz_r
cmp edi,0
je .end_points ;<3B><20><><EFBFBD><EFBFBD><E1A0AD> <20><><20><><EFBFBD> <20><><E4A0A9>
stdcall str_len,esi
add edi,eax
stdcall conv_str_to_int,edi
cmp eax,0
jle .end_points ;<3B><20><><20><>祪 = 0
mov [shem_points],eax
mov ecx,eax
.cycle_poi:
call str_next_val
stdcall conv_str_to_int,edi
mov dword[txt_buf],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x
call str_next_val
stdcall conv_str_to_int,edi
mov dword[txt_buf+4],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
call str_next_val
stdcall conv_str_to_int,edi
mov byte[txt_buf+8],al ;<3B><><EFBFBD><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
stdcall [tl_node_add], tree1,(el_icon_points shl 16)+1,txt_buf
stdcall [tl_cur_next], tree1
dec ecx
jnz .cycle_poi
.end_points:
stdcall [tl_cur_beg], tree1
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢ ***
stdcall pole_clear, pole
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
@@:
cmp esi,0
je @f
cmp word[esi],el_icon_points ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><EFBFBD><E0AEAF><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢
jne .end_add_p0
stdcall [tl_node_poi_get_data], tree1,esi
stdcall pole_cell_creat, pole,dword[eax],dword[eax+4],0
.end_add_p0:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp @b
@@:
stdcall pole_sort, pole
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢ (<28><> <20><EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢) ***
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
@@:
cmp esi,0
je @f
cmp word[esi],el_icon_elems ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_add_p3
stdcall [tl_node_poi_get_data], tree1,esi
mov ecx,eax
xor edx,edx ;edx - <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
.add_p1:
stdcall el_get_leg_coords, ecx,edx
test eax,eax
jnz .add_beg1
test ebx,ebx
jnz .add_beg1
jmp .end_add_p1 ;<3B><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFABA8> (eax=0 && ebx=0), <20><><20><><><E6A8AA>
.add_beg1:
stdcall pole_cell_creat, pole,eax,ebx,0
inc edx
jmp .add_p1
.end_add_p1:
mov edx,(1 shl 16) ;edx - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
.add_p2:
stdcall el_get_leg_coords, ecx,edx
test eax,eax
jnz .add_beg2
test ebx,ebx
jnz .add_beg2
jmp .end_add_p2 ;<3B><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFABA8> (eax=0 && ebx=0), <20><><20><><><E6A8AA>
.add_beg2:
stdcall pole_cell_creat, pole,eax,ebx,0
inc edx
jmp .add_p2
.end_add_p2:
.end_add_p3:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp @b
@@:
stdcall pole_sort, pole
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢ (<28><> <20><EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD>ᥩ) ***
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
@@:
cmp esi,0
je @f
cmp word[esi],el_icon_captions ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_add_p6
stdcall [tl_node_poi_get_data], tree1,esi
mov ecx,eax
cmp byte[ecx+8],'n'
je .end_add_p6
stdcall pole_cell_creat, pole,[ecx],[ecx+4],0
.end_add_p6:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp @b
@@:
stdcall pole_sort, pole
;*** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD> (<28><> <20><EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢) ***
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
xor ecx,ecx
@@:
cmp esi,0
je @f
cmp word[esi],el_icon_points ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><EFBFBD><E0AEAF><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢
jne .end_add_p4
stdcall [tl_node_poi_get_data], tree1,esi
movzx ebx,byte[eax+8]
stdcall shem_create_line, dword[eax],dword[eax+4],ebx
add ecx,edx
.end_add_p4:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
cmp ecx,250 ;ecx - <20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
jl @b
xor ecx,ecx
stdcall pole_sort, pole ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20><><EFBFBD><E2A8AC><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><E0AEA4><EFBFBD><EFBFBD>
jmp @b
@@:
stdcall pole_sort, pole
stdcall pole_reset_cells, pole ;<3B><><EFBFBD><20><EFBFBD><E0AEA2><EFBFBD><EFBFBD>
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6A8AE><EFBFBD><EFBFBD> <20><>ꥪ⮢ (<28><><20><><><E4A0A9>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᮪) ***
mov dword[shem_sub_points],0
mov esi,txt_sub_points
call str_analiz_r
cmp edi,0
je .end_sub_points ;<3B><20><><EFBFBD><EFBFBD><E1A0AD> <20><><20><><EFBFBD> <20><><E4A0A9>
stdcall str_len,esi
add edi,eax
stdcall conv_str_to_int,edi
cmp eax,0
jle .end_sub_points ;<3B><20><><20><>祪 = 0
mov [shem_sub_points],eax
mov ecx,eax
.cycle_sub_poi:
call str_next_val
stdcall conv_str_to_int,edi
mov ebx,eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x
call str_next_val
stdcall conv_str_to_int,edi ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
stdcall pole_cell_creat, pole,ebx,eax,2
dec ecx
jnz .cycle_sub_poi
.end_sub_points:
stdcall pole_sort, pole
;*** 㤠<><E3A4A0><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5A2> <20><><20><> ᯨ᪠ ***
mov ecx,[shem_points]
inc ecx
cld
@@:
stdcall [tl_info_undo],tree1
loop @b
;*** <20><>ନ஢<E0ACA8><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><20> <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> ***
mov dword[txt_info.size],0
mov eax,dword[shem_w]
mov edi,txt_info.size
call convert_int_to_str
stdcall str_cat, edi,txt_mull
mov eax,dword[shem_h]
mov edi,txt_buf
call convert_int_to_str
stdcall str_cat, txt_info.size,edi
stdcall str_cat, txt_info.size,txt_space ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><EFBFBD><E0AEA1>
;---
call but_center ;業<><EFBFBD><E0AEA2> <20><EFBFBD> <20> <20><><EFBFBD>⮬ shem_w <20> shem_h
call but_set_none
.end_open_file:
popad
ret
align 4
proc but_save_file
locals
napr dd ?
s_param dd ? ;<3B><><EFBFBD><E0A0AC><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E1A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD>
endl
pushad
;*** <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD><><E4A0A9>
copy_path open_dialog_name,communication_area_default_path,file_name,0
mov [OpenDialog_data.type],1
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],1 ;if status==1 then save
jne .end_save_file
;*** <20><EFBFBD><20><><EFBFBD><EFBFBD> <20><> <20><EFBFBD><E0AEA2><EFBFBD> <20><> <20><EFBFBD>
mov edi,pole
mov esi,pole_index
cmp dword[esi],0
je .cycle1_beg ;.end_save_file ;<3B><20><><EFBFBD> <20><EFBFBD> (<28><EFBFBD><E0AEA2><EFBFBD><EFBFBD>) <20><> <20><>
;*** <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><> <20><><EFBFBD><EFBFBD><E7A5A2> <20><>窨, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD> <20><>
mov dword[shem_points],0 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
mov dword[shem_sub_points],0
mov ecx,dword[esi]
.cycle0: ;横<> <20><> <20><20><><EFBFBD>
add esi,4
mov ebx,[esi]
imul ebx,sizeof.Cell
add ebx,pole_data
cmp byte[ebx+offs_cell_liv],2
jne @f
inc dword[shem_sub_points]
jmp .cycle0_next
@@:
mov dword[napr],0
mov edx,[ebx+offs_cell_y]
push edx
mov edx,[ebx+offs_cell_x]
inc edx
push edx
stdcall pole_cell_find, edi
or eax,eax
jz @f
or dword[napr],1
@@:
mov edx,[ebx+offs_cell_y]
inc edx
push edx
mov edx,[ebx+offs_cell_x]
push edx
stdcall pole_cell_find, edi
or eax,eax
jz @f
or dword[napr],2
@@:
mov edx,[ebx+offs_cell_y]
push edx
mov edx,[ebx+offs_cell_x]
dec edx
push edx
stdcall pole_cell_find, edi
or eax,eax
jz @f
or dword[napr],4
@@:
mov edx,[ebx+offs_cell_y]
dec edx
push edx
mov edx,[ebx+offs_cell_x]
push edx
stdcall pole_cell_find, edi
or eax,eax
jz @f
or dword[napr],8
@@:
cmp dword[napr],5
je @f
cmp dword[napr],10
je @f
cmp dword[napr],15
je @f
mov eax,dword[napr]
mov byte[ebx+offs_cell_liv],3 ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><>
mov byte[ebx+offs_cell_napr],al ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
inc dword[shem_points]
@@:
.cycle0_next:
dec ecx
jnz .cycle0
;*** <20><><EFBFBD><20><><20> <20><>祪, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E5AEA4><EFBFBD><EFBFBD> <20><> <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.cycle1_beg:
mov dword[shem_elems],0 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
.cycle1:
cmp esi,0
je .cycle1_end
cmp word[esi],el_icon_elems ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_add_p1
inc dword[shem_elems]
if 0
xor edx,edx ;edx - <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
@@:
stdcall el_get_leg_coords, ecx,edx
test eax,eax
jz @f ;<3B><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFABA8> (eax=0 && ebx=0)
test ebx,ebx
jz @f ;<3B><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFABA8> (eax=0 && ebx=0)
stdcall pole_cell_find, edi,eax,ebx
test eax,eax
jz .no_erase
get_cell_offset ebx,eax
mov byte[ebx+offs_cell_liv],0 ;<3B><><EFBFBD><20><>
dec dword[shem_points]
.no_erase:
inc edx
jmp @b
@@:
;mov edx,(1 shl 16) ;edx - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
end if
.end_add_p1:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp .cycle1
.cycle1_end:
;*** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ***
mov edi,open_file_lif
stdcall mem_copy,edi,txt_size,5
stdcall str_cat,edi,txt_space
mov eax,dword[shem_w]
add edi,5
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[shem_h]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_nl
;*** <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢ ***
stdcall str_cat,edi,txt_elements
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[shem_elems]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_nl
cmp eax,1
jl .cycle2_end
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
.cycle2:
cmp esi,0
je .cycle2_end
cmp word[esi],el_icon_elems ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_add_p2
stdcall [tl_node_poi_get_data], tree1,esi
mov ecx,eax
stdcall str_len,edi
add edi,eax
mov eax,[ecx] ;coord x
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[ecx+4] ;coord y
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
movzx eax,byte[ecx+sp_offs_el_angle] ;angle
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
movzx eax,byte[ecx+sp_offs_el_type]
imul eax,size_el_opt
add eax,el_opt_beg+el_offs_nam
stdcall str_cat,edi,eax
stdcall str_cat,edi,txt_nl
.end_add_p2:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp .cycle2
.cycle2_end:
;*** <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ᥩ ***
stdcall str_cat,edi,txt_captions
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[shem_captions]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_nl
cmp eax,1
jl .cycle3_end
stdcall dword[tl_node_poi_get_info], tree1,0
mov esi,eax
.cycle3:
cmp esi,0
je .cycle3_end
cmp word[esi],el_icon_captions ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><>१ esi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_add_p3
stdcall [tl_node_poi_get_data], tree1,esi
mov ecx,eax
stdcall str_len,edi
add edi,eax
mov eax,[ecx] ;coord x
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[ecx+4] ;coord y
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
movzx eax,byte[ecx+8] ;n,z,o
mov ah,' ' ;<3B><EFBFBD><E0AEA1> <20><><20><EFBFBD>, <20><><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> txt_space
mov dword[edi],eax ;al
;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,edi
mov edi,ecx
add edi,capt_offs
call str_next_val
call str_next_val
;call str_next_val
xchg ebx,edi
stdcall str_cat,edi,ebx
stdcall str_cat,edi,txt_nl
.end_add_p3:
stdcall dword[tl_node_poi_get_next_info], tree1,esi
mov esi,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20><><E1ABA5><EFBFBD><>
jmp .cycle3
.cycle3_end:
;*** <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5A2> <20><>祪 ***
stdcall str_cat,edi,txt_points
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[shem_points]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_nl
mov eax,edi
mov edi,pole
mov esi,pole_index
cmp dword[esi],0
je .no_points ;<3B><20><><EFBFBD> <20><EFBFBD> (<28><EFBFBD><E0AEA2><EFBFBD><EFBFBD>) <20><> <20><EFBFBD><E0AEAF><EFBFBD>
mov ebx,pole_data
mov dword[napr],ebx
mov edi,eax
mov ecx,dword[esi]
mov dword[s_param],0
.cycle4: ;横<> <20><> <20><20><><EFBFBD>
add esi,4
mov ebx,[esi]
imul ebx,sizeof.Cell
add ebx,dword[napr] ;pole_data
movzx edx,word[ebx+offs_cell_liv] ;also use offs_cell_napr
cmp dl,3
jne @f
stdcall str_len,edi
add edi,eax
mov eax,dword[ebx+offs_cell_x]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,dword[ebx+offs_cell_y]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
movzx eax,dh
stdcall convert_int_to_str
cmp dword[s_param],7 ;<3B><><EFBFBD> <20><><EFBFBD><E0ACA0> <20><><EFBFBD>
je .new_line
inc dword[s_param]
stdcall str_cat,edi,txt_space
jmp @f
.new_line:
mov dword[s_param],0
stdcall str_cat,edi,txt_nl
@@:
dec ecx
jnz .cycle4
cmp dword[s_param],0
je @f
stdcall str_cat,edi,txt_nl
@@:
;*** <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6A8AE><EFBFBD><EFBFBD> <20><>祪 ***
stdcall str_cat,edi,txt_sub_points
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,[shem_sub_points]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_nl
mov eax,edi
mov edi,pole
mov esi,pole_index
;cmp dword[esi],0
;je .no_points ;<3B><20><><EFBFBD> <20><EFBFBD> (<28><EFBFBD><E0AEA2><EFBFBD><EFBFBD>) <20><> <20><EFBFBD><E0AEAF><EFBFBD>
;mov ebx,pole_data
;mov dword[napr],ebx
mov edi,eax
mov ecx,dword[esi]
.cycle5: ;横<> <20><> <20><20><><EFBFBD>
add esi,4
mov ebx,[esi]
imul ebx,sizeof.Cell
add ebx,dword[napr] ;pole_data
movzx edx,byte[ebx+offs_cell_liv]
cmp dl,2
jne @f
stdcall str_len,edi
add edi,eax
mov eax,dword[ebx+offs_cell_x]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,dword[ebx+offs_cell_y]
stdcall convert_int_to_str
stdcall str_cat,edi,txt_space
;stdcall str_cat,edi,txt_nl
@@:
dec ecx
jnz .cycle5
stdcall str_cat,edi,txt_nl
.no_points:
;*** <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC>஢ 䠩<><E4A0A9>
mov edi,open_file_lif
stdcall str_len,edi
;*** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
mov [run_file_70.Function], SSF_CREATE_FILE
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov dword[run_file_70.Count], eax
mov [run_file_70.Buffer], edi
mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], openfile_path
mcall SF_FILE,run_file_70 ;<3B><><EFBFBD>࠭塞 䠩<>
call redraw_pole
.end_save_file:
popad
ret
endp
;<3B><>ନ஢<E0ACA8><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᯨ᪠
align 4
proc make_list_capts uses eax ebx ecx edi, buf:dword, txt:dword
mov ebx,dword[buf]
mov edi,ebx
add edi,capt_offs
mov dword[edi],' ' ;<3B><EFBFBD><E0AEA1><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
mov eax,dword[ebx] ;+0 - offset coord x
cmp eax,100
jge @f
inc edi
@@:
cmp eax,10
jge @f
inc edi
@@:
call convert_int_to_str ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x (<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
stdcall str_cat,edi,txt_space
stdcall str_len,edi
add edi,eax
mov eax,dword[ebx+4] ;+4 - offset coord y
call convert_int_to_str ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y (<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
stdcall str_cat,edi,txt_space
mov edi,dword[txt]
cmp edi,0
je .end_f
stdcall str_len,edi ;eax = strlen([edi])
mov ecx,edi
call str_next_spaces
sub edi,ecx ;<3B><><EFBFBD><E0A5A4><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp edi,eax
jle @f
mov edi,eax ;<3B><20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A8AB><EFBFBD> <20><> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD>
@@:
;cmp edi,1
;jge @f
; mov edi,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 ᨬ<><E1A8AC><EFBFBD>
;@@:
add ebx,capt_offs
stdcall str_n_cat, ebx,ecx,edi
.end_f:
ret
endp
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD>
;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA9>
align 4
proc shem_element_creat uses eax ebx, coord_x:dword, coord_y:dword
mov eax,dword[coord_x]
mov dword[txt_buf],eax ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x
mov ebx,dword[coord_y]
stdcall element_is_click,eax,ebx ;<3B><EFBFBD><E0AEA2><20><><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0AD><EFBFBD>
test eax,eax
jnz .end_f ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov dword[txt_buf+4],ebx ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
;xor eax,eax
mov byte[txt_buf+sp_offs_el_angle],al ;<3B><><EFBFBD><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
stdcall [tl_node_get_data], tree2
mov ebx,eax
test ebx,ebx
jnz @f
mov ebx,el_opt_beg+el_offs_nam ;<3B><20><> <20><><EFBFBD><EFABAE> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><><EFBFBD><E7A0AD> <20><>६ 1-<2D> <20><> ᯨ᪠
@@:
stdcall el_get_name, ebx,0
mov byte[txt_buf+sp_offs_el_type],al ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall make_list_capts,txt_buf,ebx
stdcall [tl_node_add], tree1,(el_icon_elems shl 16)+1,txt_buf
stdcall [tl_cur_next], tree1
stdcall [tl_draw], tree1
.end_f:
ret
endp
;description:
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;input:
; str - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><><EFBFBD><E0A6A0><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; asciiz - ᨬ<><E1A8AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ascii 0
;output:
; eax - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc el_get_name uses ebx ecx edi esi, str:dword, asciiz:dword
mov edi,[str]
cmp dword[asciiz],0
je @f
mov eax,dword[asciiz]
mov ecx,el_offs_col ;ࠧ<><E0A0A7><EFBFBD><><E2A5AA><EFBFBD> <20> str <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> el_offs_col
cld
repne scasb
mov ebx,edi
dec ebx
mov byte[ebx],0 ;0 - ᨬ<><E1A8AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0A2><EFBFBD><><E0A0A1><EFBFBD> str_cmp
@@:
mov edi,[str]
mov esi,el_opt_beg+el_offs_nam
xor ecx,ecx
@@:
stdcall str_cmp, edi,esi
cmp eax,0
je @f
add esi,size_el_opt
cmp esi,el_opt_beg.end
jge @f
inc ecx
jmp @b
@@:
mov eax,ecx
cmp dword[asciiz],0
je @f
mov ecx,dword[asciiz]
mov byte[ebx],cl
@@:
ret
endp
;input:
; el_data - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; l_opt - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD>, <20><EFBFBD><E5AEA4><EFBFBD>/<2F><><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
;output:
; eax - coord x (if not found eax=0)
; ebx - coord y (if not found ebx=0)
align 4
proc el_get_leg_coords uses ecx edx edi esi, el_data:dword, l_opt:dword
mov edi,[el_data] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
movzx esi,byte[edi+sp_offs_el_type] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
imul esi,size_el_opt
add esi,el_opt_beg
;esi+el_offs_legs_inp - 㪠<><E3AAA0><EFBFBD> <20><><><E2A0A1><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC><EFBFBD> <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD>
mov eax,[edi+0]
mov ebx,[edi+4]
mov edx,[l_opt]
movzx edi,byte[edi+sp_offs_el_angle] ;㣮<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> / 90 (<28><> 0-3)
btr edx,16 ;<3B><EFBFBD><E5AEA4><EFBFBD>/<2F><><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>
jc .output_leg
;<3B><20><><EFBFBD><EFBFBD> <20><EFBFBD><E5AEA4><EFBFBD>
inc edx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E7A8AD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 1
stdcall move_rotate_x_n90, -2,edi
mov esi,[esi+el_offs_legs_inp]
@@:
movzx ecx,byte[esi]
cmp ecx,0
je .not_found ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A8AB><EFBFBD><><E0A0AD><EFBFBD>, 祬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall move_rotate_n90, 0,ecx,edi
inc esi
dec edx
jnz @b
jmp .end_f
;<3B><20><><EFBFBD><EFBFBD> <20><><EFBFBD><E5AEA4><EFBFBD>
.output_leg:
inc edx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E7A8AD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 1
movzx ecx,byte[esi+el_offs_box_x]
add ecx,2
stdcall move_rotate_x_n90, ecx,edi
add esi,el_offs_legs_out
@@:
movzx ecx,byte[esi]
cmp ecx,0
je .not_found ;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A8AB><EFBFBD><><E0A0AD><EFBFBD>, 祬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall move_rotate_n90, 0,ecx,edi
inc esi
dec edx
jnz @b
jmp .end_f
.not_found:
xor eax,eax
xor ebx,ebx
.end_f:
ret
endp
align 4
proc move_rotate_n90 uses ecx edi, d_x:dword, d_y:dword, angle:dword
mov edi,[angle] ;㣮<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> / 90 (<28><> 0-3)
and edi,3
shl edi,4 ;edi*=16
add edi,mcs
mov ecx,[d_x]
imul ecx,dword[edi]
add eax,ecx
mov ecx,[d_y]
imul ecx,dword[edi+4]
add eax,ecx
mov ecx,[d_x]
imul ecx,dword[edi+8]
add ebx,ecx
mov ecx,[d_y]
imul ecx,dword[edi+12]
add ebx,ecx
ret
endp
align 4
proc mem_copy uses ecx esi edi, destination:dword, source:dword, len:dword
cld
mov edi,[destination]
mov esi,[source]
mov ecx,[len]
rep movsb
ret
endp
;description:
; <20><EFBFBD><E3ADAA><EFBFBD> <20><EFBFBD><EFBFBD><E1AAA0> <20><><EFBFBD><EFBFBD><><E1ABAE> (<28><><EFBFBD> <20><>᫮) <20> <20><><EFBFBD>⮬ ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><E2A5AB><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD><EFBFBD>:
; <20><EFBFBD><E0AEA1><EFBFBD>, ⠡<><E2A0A1><EFBFBD>樨, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD>⥫쭮<E2A5AB><ECADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0> <20><><20><> <20><><EFBFBD>
;input:
; edi - 㪠<><E3AAA0><EFBFBD> <20><> <20><EFBFBD><E0AEA1> <20><><EFBFBD><><E1ABAE>
;output:
; edi - 㪠<><E3AAA0><EFBFBD> <20><><><E1ABA5><EFBFBD>饥 ᫮<><E1ABAE>
align 4
str_next_val:
call str_skip_spaces
@@:
cmp byte[edi],0
je @f
cmp byte[edi],' '
je @f
cmp byte[edi],9
je @f
cmp byte[edi],10
je @f
cmp byte[edi],13
je @f
inc edi
jmp @b
@@:
call str_skip_spaces
ret
align 4
str_skip_spaces:
dec edi
@@:
inc edi
cmp byte[edi],' '
je @b
cmp byte[edi],9
je @b
cmp byte[edi],10
je @b
cmp byte[edi],13
je @b
ret
align 4
str_next_spaces:
dec edi
@@:
inc edi
cmp byte[edi],0
je @f
cmp byte[edi],' '
je @f
cmp byte[edi],9
je @f
cmp byte[edi],10
je @f
cmp byte[edi],13
je @f
jmp @b
@@:
ret
;input:
; esi - 㪠<><E3AAA0><EFBFBD> <20><> <20><EFBFBD><E1AAAE><EFBFBD><><E1ABAE>
;output:
; edi - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>ன ᫮<><E1ABAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>᫨ ᫮<><E1ABAE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> edi=0
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>:
; eax ecx
align 4
str_analiz_r:
mov edi,open_file_lif
mov ecx,dword[f_size]
@@:
mov al,byte[esi] ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>
cld
repnz scasb
cmp ecx,0
je @f ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A8AB> <20><><EFBFBD><EFBFBD><><E2A5AA>, <20><> <20><><20><> <20>㭪樨
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edi-1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> esi
dec edi
stdcall str_instr, edi,esi ;<3B><EFBFBD><E0AEA2>塞 ᫮<><E1ABAE> <20><><><E1AEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
inc edi
cmp al,0
jne @b ;<3B>᫨ ᫮<><E1ABAE> <20><><><E1AEA2><EFBFBD><EFBFBD>, <20><20> <20><><EFBFBD><><E1ABA5><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><>諨 ᫮<><E1ABAE> esi <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edi
jmp .exit_f
@@:
;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><> <20><>諨 ᫮<><E1ABAE> esi <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edi
xor edi,edi
.exit_f:
ret
;description:
; <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD><><EFBFBD><E0A6A8><EFBFBD> <20><> <20><><EFBFBD> str1 <20> <20><><EFBFBD> str0
; <20><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <20><><EFBFBD><E7A8AD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD><EFBFBD>, 㪠<><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> str0 <20> str1
; <20><EFBFBD><E0A8AC> 1: <20>᫨ str0='aaabbbccc', str1='bbb' ᮢ<><E1AEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD>
; <20><EFBFBD><E0A8AC> 2: <20>᫨ str0='aaabbbccc', str1='aaa' ᮢ<><E1AEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>
;output:
; al = 0 <20><20><><EFBFBD> str1 ᮤ<><EFBFBD><E0A6A8><EFBFBD> <20> str0
; al != 0 <20><20><><EFBFBD> str1 <20><><><EFBFBD><E0A6A8><EFBFBD> <20> str0
align 4
proc str_instr uses edi esi, str0:dword, str1:dword
;xor eax,eax
mov edi,[str0]
mov esi,[str1]
cld
@@:
mov al,[esi]
cmp al,0
je .e1
inc esi
scasb ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD>
jz @b ;<3B>᫨ ᮢ<><E1AEA2><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4> <20> <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><><E1ABA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><><EFBFBD> <20><><><E1AEA2><EFBFBD><EFBFBD>
sub al,[edi-1]
.e1: ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><><EFBFBD> str1 (esi) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A8AB><EFBFBD>
ret
endp
;description:
; <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD><><E1AEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ப str0 <20> str1
;output:
; eax = 0 <20>᫨ str0 = str1
; eax = 1 <20>᫨ str0 != str1
align 4
proc str_cmp uses ecx edi esi, str0:dword, str1:dword
xor eax,eax
mov edi,[str0]
mov esi,[str1]
mov ecx,0x8fffffff ;ecx - <20><EFBFBD> <20><><EFBFBD><EFBFBD><20><>
cld
repne scasb
;dec edi
sub edi,[str0]
mov ecx,edi ;ecx = strlen(str0)+1
mov edi,[str0]
repe cmpsb
je @f
inc eax
@@:
ret
endp
align 4
proc but_run_stop
xor byte[tim_ch],1
cmp byte[tim_ch],0
jne @f
;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><EFBFBD>
stdcall pole_reset_cells, pole ;<3B><><EFBFBD><20><EFBFBD><E0AEA2><EFBFBD><EFBFBD>
call redraw_pole
jmp .end_f
@@:
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2AEA2> <20><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
call sign_clear
call sign_set_captions_angles
.end_f:
ret
endp
align 4
proc but_set_0 uses eax
stdcall [tl_node_get_data], tree1
test eax,eax
jz .end_f
;el_icon_captions
; cmp byte[eax+8],'n'
; je .end_f
cmp byte[eax+8],'o' ;<3B><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_f
mov byte[eax+8],'z'
.end_f:
ret
endp
align 4
proc but_set_1 uses eax
stdcall [tl_node_get_data], tree1
test eax,eax
jz .end_f
;el_icon_captions
; cmp byte[eax+8],'n'
; je .end_f
cmp byte[eax+8],'z' ;<3B><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne .end_f
mov byte[eax+8],'o'
.end_f:
ret
endp
;ᤢ<><E1A4A2> <20><><EFBFBD><EAA5AA> <20><><EFBFBD><EFBFBD><EFBFBD>
align 4
proc but_mov_l uses eax edi
cmp byte[tim_ch],0
jne .end_f
stdcall [tl_node_get_data], tree1
test eax,eax
jz .end_f
cmp dword[eax],1
jle .end_f
dec dword[eax]
mov edi,eax
stdcall mem_copy,txt_buf,eax,capt_offs
add edi,capt_offs
call str_next_val
call str_next_val
stdcall make_list_capts,txt_buf,edi
stdcall mem_copy,eax,txt_buf,32 ;capt_offs
call redraw_pole
stdcall [tl_draw],tree1
.end_f:
ret
endp
;ᤢ<><E1A4A2> <20><><EFBFBD><EAA5AA> <20><><EFBFBD>
align 4
proc but_mov_r uses eax edi
cmp byte[tim_ch],0
jne .end_f
stdcall [tl_node_get_data], tree1
test eax,eax
jz .end_f
inc dword[eax]
mov edi,eax
stdcall mem_copy,txt_buf,eax,capt_offs
add edi,capt_offs
call str_next_val
call str_next_val
stdcall make_list_capts,txt_buf,edi
stdcall mem_copy,eax,txt_buf,32 ;capt_offs
call redraw_pole
stdcall [tl_draw],tree1
.end_f:
ret
endp
align 4
proc but_mov_u uses eax edi
cmp byte[tim_ch],0
jne .end_f
stdcall [tl_node_get_data], tree1
test eax,eax
jz .end_f
cmp dword[eax+4],1
jle .end_f
dec dword[eax+4]
mov edi,eax
stdcall mem_copy,txt_buf,eax,capt_offs
add edi,capt_offs
call str_next_val
call str_next_val
stdcall make_list_capts,txt_buf,edi
stdcall mem_copy,eax,txt_buf,32 ;capt_offs
call redraw_pole
stdcall [tl_draw],tree1
.end_f:
ret
endp
align 4
proc but_mov_d uses eax edi
cmp byte[tim_ch],0
jne .end_f
stdcall [tl_node_get_data], tree1
test eax,eax
jz .end_f
inc dword[eax+4]
mov edi,eax
stdcall mem_copy,txt_buf,eax,capt_offs
add edi,capt_offs
call str_next_val
call str_next_val
stdcall make_list_capts,txt_buf,edi
stdcall mem_copy,eax,txt_buf,32 ;capt_offs
call redraw_pole
stdcall [tl_draw],tree1
.end_f:
ret
endp
;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7ADAE> <><E0A5A6><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD>
align 4
proc but_set_none
mov byte[pen_mode],0
cmp [cursor_pointer],0
je @f
push eax ebx ecx
mcall SF_MOUSE_GET,SSF_DEL_CURSOR,[cursor_pointer]
pop ecx ebx eax
@@:
ret
endp
;hot_p - <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ᬥ饭<E1ACA5><E9A5AD><EFBFBD> <20><> <20><><EFBFBD> 16 ((cx shl 8) + cy) shl 16
align 4
proc set_pen_mode uses eax ebx ecx edx, mode:dword, icon:dword, hot_p:dword
mov eax,[mode]
cmp byte[pen_mode],al
je @f
mov byte[pen_mode],al
mov edx,[hot_p]
mov dx,2 ;LOAD_INDIRECT
mov ecx,[icon]
shl ecx,12 ;㬭<><E3ACAD><EFBFBD><EFBFBD><EFBFBD> <20><> 4 <20><>
add ecx,[buf_curs.data]
mcall SF_MOUSE_GET,SSF_LOAD_CURSOR
or eax,eax
jz @f
mov [cursor_pointer],eax
mcall SF_MOUSE_GET,SSF_SET_CURSOR,[cursor_pointer]
@@:
ret
endp
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
align 4
OpenDialog_data:
.type dd 0 ;0 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 1 - <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD>, 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5AA><EFBFBD><EFBFBD><EFBFBD>
.procinfo dd procinfo ;+4
.com_area_name dd communication_area_name ;+8
.com_area dd 0 ;+12
.opendir_path dd plugin_path ;+16
.dir_default_path dd default_dir ;+20
.start_path dd file_name ;+24 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
.draw_window dd draw_window ;+28
.status dd 0 ;+32
.openfile_path dd openfile_path ;+36 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
.filename_area dd filename_area ;+40
.filter_area dd Filter
.x:
.x_size dw 420 ;+48 ; Window X size
.x_start dw 10 ;+50 ; Window X position
.y:
.y_size dw 320 ;+52 ; Window y size
.y_start dw 10 ;+54 ; Window Y position
default_dir db '/sys',0
communication_area_name:
db 'FFFFFFFF_open_dialog',0
open_dialog_name:
db 'opendial',0
communication_area_default_path:
db '/sys/File managers/',0
Filter:
dd Filter.end - Filter ;.1
.1:
db 'TXT',0
db 'ASM',0
.end:
db 0
include 'le_libs.inc'
align 4
buf_0: dd 0 ;
.l: dw 170 ;+4 left
.t: dw panel_1_coord_top ;+6 top
.w: dd 395 ;+8 w
.h: dd 340 ;+12 h
.color: dd ini_def_c_bkgnd ;+16 color
db 24 ;+20 bit in pixel
align 4
buf_font: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
dw 25,25 ;+4 left,top
dd 96 ;+8 w
dd 144 ;+12 h
dd 0 ;+16 color
db 24 ;+20 bit in pixel
align 4
buf_curs: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.data: dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
dw 0,0 ;+4 left,top
dd 32 ;+8 w
dd 32*cursors_count ;+12 h
dd 0 ;+16 color
db 24 ;+20 bit in pixel
align 4
buf_curs_8: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.data: dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
dw 0,0 ;+4 left,top
dd 32 ;+8 w
dd 32*cursors_count ;+12 h
dd 0 ;+16 color
db 24 ;+20 bit in pixel
cursor_pointer dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
el_focus dd 0
tree1 tree_list 32,points_max+2, tl_key_no_edit, 16,16,\
0x8080ff,0x0000ff,0xffffff, 5,panel_3_coord_top+85,145,170, 0,capt_offs,0,\
el_focus, wScr1,0
tree2 tree_list el_offs_col-el_offs_nam,100+2, tl_key_no_edit+tl_list_box_mode, 16,16,\
0x8080ff,0x0000ff,0xffffff, 5,panel_3_coord_top,145,80, 0,0,0,\
el_focus, wScr2,0
align 4
wScr1:
.x:
.size_x dw 16 ;+0
.start_x dw 0 ;+2
.y:
.size_y dw 150 ;+4
.start_y dw 0 ;+6
.btn_high dd 15 ;+8
.type dd 1 ;+12
.max_area dd 100 ;+16
.cur_area dd 30 ;+20
.position dd 0 ;+24
.bckg_col dd 0xeeeeee ;+28
.frnt_col dd 0xbbddff ;+32
.line_col dd 0 ;+36
.redraw dd 0 ;+40
.delta dw 0 ;+44
.delta2 dw 0 ;+46
.run_x:
.r_size_x dw 0 ;+48
.r_start_x dw 0 ;+50
.run_y:
.r_size_y dw 0 ;+52
.r_start_y dw 0 ;+54
.m_pos dd 0 ;+56
.m_pos_2 dd 0 ;+60
.m_keys dd 0 ;+64
.run_size dd 0 ;+68
.position2 dd 0 ;+72
.work_size dd 0 ;+76
.all_redraw dd 0 ;+80
.ar_offset dd 1 ;+84
align 4
wScr2:
.x:
.size_x dw 16 ;+0
.start_x dw 0 ;+2
.y:
.size_y dw 150 ;+4
.start_y dw 0 ;+6
.btn_high dd 15 ;+8
.type dd 1 ;+12
.max_area dd 100 ;+16
.cur_area dd 30 ;+20
.position dd 0 ;+24
.bckg_col dd 0xeeeeee ;+28
.frnt_col dd 0xbbddff ;+32
.line_col dd 0 ;+36
.redraw dd 0 ;+40
.delta dw 0 ;+44
.delta2 dw 0 ;+46
.run_x:
.r_size_x dw 0 ;+48
.r_start_x dw 0 ;+50
.run_y:
.r_size_y dw 0 ;+52
.r_start_y dw 0 ;+54
.m_pos dd 0 ;+56
.m_pos_2 dd 0 ;+60
.m_keys dd 0 ;+64
.run_size dd 0 ;+68
.position2 dd 0 ;+72
.work_size dd 0 ;+76
.all_redraw dd 0 ;+80
.ar_offset dd 1 ;+84
align 4
proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n:dword
mov esi,dword[str2]
mov ecx,dword[n]
mov edi,dword[str1]
stdcall str_len,edi
add edi,eax
cld
repne movsb
mov byte[edi],0
ret
endp
align 4
proc str_cat uses eax ecx edi esi, str1:dword, str2:dword
mov esi,dword[str2]
stdcall str_len,esi
mov ecx,eax
inc ecx
mov edi,dword[str1]
stdcall str_len,edi
add edi,eax
cld
repne movsb
ret
endp
;output:
; eax = strlen
align 4
proc str_len, str1:dword
mov eax,[str1]
@@:
cmp byte[eax],0
je @f
inc eax
jmp @b
@@:
sub eax,[str1]
ret
endp
;input:
; buf - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD>, <20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 10 <20><><EFBFBD> 16 <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
;output:
; eax - <20><>
align 4
proc conv_str_to_int uses ebx ecx esi, buf:dword
xor eax,eax
xor ebx,ebx
mov esi,[buf]
;<3B><> <20><><EFBFBD><20><20><><20><><EFBFBD> <20><><EFBFBD><E5AEA4><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA1><EFBFBD>
@@:
cmp byte[esi],' '
jne @f
inc esi
jmp @b
@@:
;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2A5AB><EFBFBD><EFBFBD> <20><>
xor ecx,ecx
inc ecx
cmp byte[esi],'-'
jne @f
dec ecx
inc esi
@@:
cmp word[esi],'0x'
je .load_digit_16
.load_digit_10: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD> 10-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
mov bl,byte[esi]
cmp bl,'0'
jl @f
cmp bl,'9'
jg @f
sub bl,'0'
imul eax,10
add eax,ebx
inc esi
jmp .load_digit_10
jmp @f
.load_digit_16: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD> 16-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
add esi,2
.cycle_16:
mov bl,byte[esi]
cmp bl,'0'
jl @f
cmp bl,'f'
jg @f
cmp bl,'9'
jle .us1
cmp bl,'A'
jl @f ;<3B><><EFBFBD><E1A5A8><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> >'9' <20> <'A'
.us1: ;<3B><><EFBFBD><EFBFBD><E2A0A2><EFBFBD> <20><EFBFBD><E1ABAE><EFBFBD>
cmp bl,'F'
jle .us2
cmp bl,'a'
jl @f ;<3B><><EFBFBD><E1A5A8><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> >'F' <20> <'a'
sub bl,32 ;<3B><><EFBFBD><E0A5A2><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E9A5AD> <20><> <20><><EFBFBD><E1ABA5><20><><EFBFBD>
.us2: ;<3B><><EFBFBD><EFBFBD><E2A0A2><EFBFBD> <20><EFBFBD><E1ABAE><EFBFBD>
sub bl,'0'
cmp bl,9
jle .cor1
sub bl,7 ;convert 'A' to '10'
.cor1:
shl eax,4
add eax,ebx
inc esi
jmp .cycle_16
@@:
cmp ecx,0 ;<3B><20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫쭮<E2A5AB>
jne @f
sub ecx,eax
mov eax,ecx
@@:
ret
endp
;<3B><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD>, <20><> <20><EFBFBD><EFBFBD><E0A0A7><EFBFBD> <20><><20> <20><><EFBFBD>
;input:
; eax = value
; edi = string buffer
;output:
align 4
proc convert_int_to_str uses eax ecx edx edi
mov dword[edi+1],0
call .str
ret
endp
align 4
.str:
mov ecx,0x0a ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD> eax,ecx,edx <20><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD> eax - <20><>
;<3B><><EFBFBD><EFBFBD><E0A5A2> <20><><20> ASCII <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ecx=<3D><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5> edi <20><><EFBFBD><EFBFBD><EFBFBD> <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA2A0>, <20><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD>
cmp eax,ecx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD> <20><20> eax <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20> ecx <20><> <20><><EFBFBD><E0A5A9> <20><> @@-1 <20>.<2E>. <20><> pop eax
jb @f
xor edx,edx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edx
div ecx ;ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><20> edx
push edx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>
;dec edi ;ᬥ饭<E1ACA5><E9A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
call .str ;<3B><><EFBFBD><E0A5A9> <20><><><> <20>.<2E>. <20><EFBFBD><EBA7A2><EFBFBD><><> <20><20><><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> eax <20><> <20><EFBFBD><E2A0AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20> ecx
pop eax
@@: ;cmp al,10 ;<3B><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><E7A5AD> <20> al 祬 10 (<28><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5> 10 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD>))
or al,0x30 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20><><EFBFBD><EFBFBD>
stosb ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><><E0A5A3><EFBFBD><EFBFBD><EFBFBD> al <20> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> es:edi
ret ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20>.<2E>. <20><><EFBFBD><EFBFBD> <20> <20><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><EFBFBD><EBA7AE><EFBFBD> <20><> <20>⮫쪮 ࠧ <20><> <20> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD>
align 16
i_end:
image_data_toolbar dd 0
icon_tl_sys dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
icon_toolbar dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢
image_data_gray dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><E0A5AC><EFBFBD><20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><20> <20><><EFBFBD><E0ACA0> 24-bit, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mouse_dd dd 0
last_time dd 0
sc system_colors
procinfo process_information
run_file_70 FileInfoBlock
open_file_lif:
rb 2*4096 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD>
.end:
rb 1024
stacktop:
sys_path rb 1024
file_name rb 2048 ;4096
plugin_path rb 4096
openfile_path rb 4096
filename_area rb 256
mem: