1) update 'tree_list', functions use stdcall

2) update 5 programs for new 'tree_list'

git-svn-id: svn://kolibrios.org@5911 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2015-11-10 23:11:17 +00:00
parent feb27d955c
commit 989c0ebf47
14 changed files with 1259 additions and 1494 deletions

View File

@ -1,7 +1,7 @@
if lang eq ru
capt db 'info 3ds ¢¥àá¨ï 05.11.15',0 ;¯®¤¯¨áì ®ª­ 
capt db 'info 3ds ¢¥àá¨ï 10.11.15',0 ;¯®¤¯¨áì ®ª­ 
else
capt db 'info 3ds version 05.11.15',0 ;window caption
capt db 'info 3ds version 10.11.15',0 ;window caption
end if
MAX_FILE_LEVEL equ 20 ;¬ ªá¨¬ «ì­ë© ã஢¥­ì ¢«®¦¥­­®á⨠¡«®ª®¢ ¤«ï  ­ «¨§ 

View File

@ -66,16 +66,14 @@ macro load_image_file path,buf,size { ;
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax
mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov [run_file_70.Count], dword size
m2m [run_file_70.Buffer], [buf]
m2m [run_file_70.Buffer], eax
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
cmp ebx,0xffffffff
je @f
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
@ -122,24 +120,23 @@ align 4
start:
load_libraries l_libs_start,l_libs_end
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
mov ebp,lib_0
cmp dword [ebp+ll_struc_size-4],0
jz @f
mov ebp,lib_1
cmp dword [ebp+ll_struc_size-4],0
jz @f
mov ebp,lib_2
cmp dword [ebp+ll_struc_size-4],0
jz @f
mov ebp,lib_3
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
cmp dword [lib_0+ll_struc_size-4],0
jnz @f
cmp dword [lib_1+ll_struc_size-4],0
jnz @f
cmp dword [lib_2+ll_struc_size-4],0
jnz @f
cmp dword [lib_3+ll_struc_size-4],0
jnz @f
jmp .lib
@@:
mcall -1 ;exit not correct
.lib:
mcall 48,3,sc,sizeof.system_colors
mcall 40,0x27
stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
mov dword[w_scr_t1.type],1
stdcall dword[tl_data_init], tree1
;á¨á⥬­ë¥ ¨ª®­ª¨ 16*16 ¤«ï tree_list
load_image_file 'tl_sys_16.png', icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE
@ -221,9 +218,9 @@ end if
;
stdcall [tl_node_get_data],tree1
pop ebx
cmp ebx,0
cmp eax,0
je @f
mov ebx,eax
mov eax,dword[ebx] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª  ®â­®á¨â¥«ì­® ­ ç «  ä ©« 
mov ecx,dword[ebx+4] ;à §¬¥à ¡«®ª 
stdcall hex_in_str, txt_3ds_offs.dig, eax,8
@ -350,16 +347,12 @@ pushad
sub eax,41
mov dword[tree1.box_width],eax
add ax,word[tree1.box_left]
mov word[w_scr_t1.start_x],ax
mov word[w_scr_t1+sb_offs_start_x],ax
add ax,16+5
mov word[buf_0.l],ax
mov eax,8
mov ebx,(5 shl 16)+20
mov ecx,(5 shl 16)+20
mov edx,3
mov esi,[sc.work_button]
int 0x40
mcall 8,(5 shl 16)+20,(5 shl 16)+20,3
mov ebx,(30 shl 16)+20
mov edx,4
@ -372,19 +365,10 @@ pushad
int 0x40
@@:
mov ebx,(85 shl 16)+20
mov edx,6 ;®ª­® á ª®®à¤¨­ â ¬¨
int 0x40
mcall ,(85 shl 16)+20,,6 ;®ª­® á ª®®à¤¨­ â ¬¨
mcall ,(110 shl 16)+20,,7 ;㤠«¥­¨¥ ¡«®ª 
mov ebx,(110 shl 16)+20
mov edx,7 ;㤠«¥­¨¥ ¡«®ª 
int 0x40
mov eax,7
mov ebx,[image_data_toolbar]
mov ecx,(16 shl 16)+16
mov edx,(7 shl 16)+7 ;new
int 0x40
mcall 7,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;new
add ebx,IMAGE_TOOLBAR_ICON_SIZE
mov edx,(32 shl 16)+7 ;open
@ -456,7 +440,7 @@ button:
.exit:
mov dword[tree1.data_img],0
mov dword[tree1.data_img_sys],0
stdcall dword[tl_data_clear], tree1
stdcall [tl_data_clear], tree1
stdcall [buf2d_delete],buf_0
stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
stdcall mem.Free,[image_data_toolbar]
@ -795,7 +779,7 @@ proc add_3ds_object, icon:dword,level:dword,size_bl:dword,info_bl:dword
rep movsb
mov byte[buffer+size_one_list-1],0 ;0 - ᨬ¢®« ª®­¥æ  áâப¨
.no_capt:
stdcall [tl_node_add], buffer, ebx, tree1
stdcall [tl_node_add], tree1, ebx, buffer
stdcall [tl_cur_next], tree1
if debug
stdcall print_err,sz_add_3ds_object,buffer+list_offs_text
@ -907,42 +891,40 @@ align 4
but_delete_chunk:
pushad
stdcall [tl_node_get_data],tree1
pop ebx
cmp ebx,0
cmp eax,0
je .end_f
cmp byte[ebx+list_offs_chunk_del],0 ;¥á«¨ ¡«®ª § é¨é¥­ ®â 㤠«¥­¨ï
cmp byte[eax+list_offs_chunk_del],0 ;¥á«¨ ¡«®ª § é¨é¥­ ®â 㤠«¥­¨ï
jne .notify
;(1) ª®¯¨à®¢ ­¨¥ ­¨¦­¥© ç á⨠䠩« 
mov edx,dword[ebx+4] ;à §¬¥à ¡«®ª 
mov edx,dword[eax+4] ;à §¬¥à ¡«®ª 
sub [open_file_size],edx ;¨§¬¥­¥­¨¥ à §¬¥à®¢ ä ©« 
mov ecx,[open_file_size]
mov eax,dword[ebx] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª  ®â­®á¨â¥«ì­® ­ ç «  ä ©« 
sub ecx,eax ;ecx - à §¬¥à ­¨¦­¥© ᤢ¨£ ¥¬®© ç á⨠䠩« 
add eax,dword[open_file_lif] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ ¯ ¬ïâ¨
mov edi,eax
mov esi,eax
mov ebx,dword[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª  ®â­®á¨â¥«ì­® ­ ç «  ä ©« 
sub ecx,ebx ;ecx - à §¬¥à ­¨¦­¥© ᤢ¨£ ¥¬®© ç á⨠䠩« 
add ebx,dword[open_file_lif] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ ¯ ¬ïâ¨
mov edi,ebx
mov esi,ebx
add esi,edx
mov al,byte[ebx+list_offs_chunk_lev] ;¡¥à¥¬ ã஢¥­ì ⥪ã饣® 㧫 
mov bl,byte[eax+list_offs_chunk_lev] ;¡¥à¥¬ ã஢¥­ì ⥪ã饣® 㧫 
rep movsb
mov byte[can_save],1
;(2) ¨§¬¥­¥­¨¥ à §¬¥à®¢ த¨â¥«ìáª¨å ¡«®ª®¢
cmp al,0
cmp bl,0
je .end_2
.cycle_2:
stdcall [tl_cur_perv], tree1
stdcall [tl_node_get_data],tree1
pop ebx
cmp ebx,0
cmp eax,0
je .end_2
cmp byte[ebx+list_offs_chunk_lev],al
cmp byte[eax+list_offs_chunk_lev],bl
jge .cycle_2
mov al,byte[ebx+list_offs_chunk_lev]
mov ecx,[ebx]
mov bl,byte[eax+list_offs_chunk_lev]
mov ecx,[eax]
add ecx,[open_file_lif]
sub dword[ecx+2],edx
cmp al,0 ;¥á«¨ á ¬ë© ¢¥àå­¨© 㧥«, â® al=0
cmp bl,0 ;¥á«¨ á ¬ë© ¢¥àå­¨© 㧥«, â® bl=0
jne .cycle_2
.end_2:
@ -1284,14 +1266,11 @@ import_box_lib:
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
align 4
mouse_dd dd 0x0
sc system_colors
last_time dd 0
align 16
procinfo process_information
align 4
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
.l: dw 205 ;+4 left
@ -1311,32 +1290,18 @@ buf_1:
dd 0 ;+16 color
db 24 ;+20 bit in pixel
align 4
el_focus dd tree1
tree1 tree_list size_one_list,300+2, tl_key_no_edit+tl_draw_par_line,\
16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,35,195-16,250, 16,list_offs_text,0, el_focus,\
w_scr_t1,0
align 4
w_scr_t1:
.size_x dw 16 ;+0
.start_x dw 0
rb 2+2
.btn_high dd 15 ;+8
.type dd 1 ;+12
.max_area dd 100 ;+16
rb 4+4
.bckg_col dd 0xeeeeee ;+28
.frnt_col dd 0xbbddff ;+32
.line_col dd 0 ;+36
rb 4+2+2
.run_x:
rb 2+2+2+2+4+4+4+4+4+4
.all_redraw dd 0 ;+80
.ar_offset dd 1 ;+84
w_scr_t1 scrollbar 16,0, 3,0, 15, 100, 0,0, 0xeeeeee, 0xbbddff, 0, 1
align 4
align 16
i_end:
procinfo process_information
rb 1024
thread_coords:
rb 1024

View File

@ -30,12 +30,11 @@ pushad
inc byte[prop_wnd_run]
stdcall [tl_node_get_data],tree1
pop ebx
xor edx,edx
mov dword[capt_p],txt_q
cmp ebx,0
cmp eax,0
je .no_points
mov ebx,dword[ebx] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
mov ebx,dword[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
add ebx,dword[open_file_lif]
cmp word[ebx],CHUNK_VERTLIST
@ -94,7 +93,7 @@ pushad
stdcall str_cat, obj_point.text,esi
stdcall str_cat, obj_point.text,Data_String
loop @b
stdcall dword[tl_node_add], obj_point, (ID_ICON_DATA shl 16), tree3
stdcall dword[tl_node_add], tree3,(ID_ICON_DATA shl 16),obj_point
stdcall dword[tl_cur_next], tree3
dec edx
cmp edx,0
@ -207,12 +206,11 @@ prop_button:
cmp ah,3
jne @f
;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
push ebx
push eax ebx
stdcall [tl_node_get_data],tree3
pop ebx
cmp ebx,0
cmp eax,0
je .no_select_0
mov ebx,[ebx]
mov ebx,[eax]
mov word[NumberSymbolsAD],8
finit
fld dword[ebx]
@ -231,16 +229,16 @@ prop_button:
stdcall [edit_box_draw], edit2
stdcall [edit_box_draw], edit3
.no_select_0:
pop ebx
pop ebx eax
jmp prop_still
@@:
cmp ah,4
jne @f
push ebx ecx esi edi
push eax ebx ecx edi esi
stdcall [tl_node_get_data],tree3
pop ebx
cmp ebx,0
cmp eax,0
je .no_select_1
mov ebx,[ebx]
mov ebx,[eax]
finit
mov esi,string1
@ -291,12 +289,13 @@ prop_button:
stdcall str_cat, obj_point.text,esi
stdcall str_cat, obj_point.text,Data_String
loop .coord
stdcall dword[tl_node_set_data], obj_point, tree3
stdcall dword[tl_node_set_data], tree3,obj_point
stdcall dword[tl_draw], tree3
mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
.no_select_1:
pop edi esi ecx ebx
pop esi edi ecx ebx eax
jmp prop_still
@@:
cmp ah,1

View File

@ -283,66 +283,59 @@ macro option_boxes_set_sys_color color_table,group
struc tree_list info_size,info_max_count,style, img_cx,img_cy,\
col_bkg,col_zag,col_txt, box_l,box_t,box_w,box_h, capt_cy,info_capt_offs,\
info_capt_len,el_focus, p_scrol,on_press {
.data_info dd 0
.info_size dw info_size
.info_max_count dd info_max_count
.style dd style
.data_nodes dd 0
.data_img dd 0
.img_cx dw img_cx
.img_cy dw img_cy
.data_img_sys dd 0
.ch_tim dd 0
.ls_tim dd 0
.tim_undo dd 0
.cur_pos dd 0
.col_bkg dd col_bkg
.col_zag dd col_zag
.col_txt dd col_txt
.box_left dd box_l
.box_top dd box_t
.box_width dd box_w
.box_height dd box_h
.capt_cy dw capt_cy
.info_capt_offs dw info_capt_offs
.info_capt_len dw info_capt_len
.el_focus dd el_focus
.p_scrol dd p_scrol
rb 4
.on_activate dd 0
.on_press dd on_press
info_capt_len,el_focus, p_scroll,on_press {
.box_left dd box_l
.box_top dd box_t
.box_width dd box_w
.box_height dd box_h
.data_info dd 0
.info_size dw info_size
.info_max_count dd info_max_count
.style dd style
.data_nodes dd 0
.data_img dd 0
.img_cx dw img_cx
.img_cy dw img_cy
.data_img_sys dd 0
.ch_tim dd 0
.tim_undo dd 0
.cur_pos dd 0
.col_bkg dd col_bkg
.col_zag dd col_zag
.col_txt dd col_txt
.capt_cy dw capt_cy
.info_capt_offs dw info_capt_offs
.info_capt_len dw info_capt_len
.el_focus dd el_focus
.p_scroll dd p_scroll
.on_press dd on_press
}
tl_data_info equ dword[edi] ;㪠§ â¥«ì ­  ®á­®¢­ë¥ ¤ ­ë¥
tl_info_size equ word[edi +4] ;à §¬¥à ¤ ­­ëå ¢ë¤¥«ï¥¬ëå ¤«ï ª ¦¤®£® 㧫  (¯®«ì§®¢ â¥«ìá쪨¥ ¤ ­­ë¥ + ⥪áâ ¤«ï ¯®¤¯¨á¨)
tl_info_max_count equ dword[edi+6] ;¬ ªá¨¬ «ì­®¥ ª®«¨ç¥á⢮ 㧫®¢, ª®â®àë¥ ¬®¦­® ¤®¡ ¢¨âì ¢ í«¥¬¥­â
tl_style equ dword[edi+10] ;á⨫¨ í«¥¬¥­â 
tl_data_nodes equ dword[edi+14] ;㪠§ â¥«ì ­  áâàãªâãàë 㧫®¢
tl_data_img equ dword[edi+18] ;㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨ï á ¨ª®­ª ¬¨ 㧫®¢
tl_img_cx equ word[edi+22] ;è¨à¨­  ¨ª®­®ª
tl_img_cy equ word[edi+24] ;¢ëá®â  ¨ª®­®ª
tl_data_img_sys equ dword[edi+26] ;㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨§®¡à ¦¥­¨ï (áâ५ª¨, ¯«îᨪ¨)
tl_ch_tim equ dword[edi+30] ;ª®«¨ç¥á⢮ ¨§¬¥­¥­¨© ¢ ä ©«¥
tl_tim_undo equ dword[edi+38] ;ª®«¨ç¥á⢮ ®â¬¥­¥­­ëå ¤¥©á⢨©
tl_cur_pos equ dword[edi+42] ;¯®§¨æ¨ï ªãàá®à 
tl_col_bkg equ dword[edi+46] ;梥â ä®­ 
tl_col_zag equ dword[edi+50] ;梥⠧ £®«®¢ª 
tl_col_txt equ dword[edi+54] ;梥â ⥪áâ 
tl_box_left equ dword[edi+58]
tl_box_top equ dword[edi+62]
tl_box_width equ dword[edi+66]
tl_box_height equ dword[edi+70]
tl_capt_cy equ word[edi+74] ;¢ëá®â  ¯®¤¯¨á¨
tl_info_capt_offs equ word[edi+76] ;ᤢ¨£ ¤«ï ­ ç «  ⥪áâ  (¯®¤¯¨á¨ 㧫 )
tl_info_capt_len equ word[edi+78] ;¤«¨­­  ⥪áâ  ¯®¤¯¨á¨ 㧫  (¥á«¨ = 0 â® ¤® ª®­æ  áâàãªâãàë)
tl_el_focus equ dword[edi+80] ;㪠§ â¥«ì ­  áâàãªâãàã í«¥¬¥­â  ¢ 䮪ãá¥
tl_p_scrol equ dword[edi+84] ;㪠§ â¥«ì ­  áâàãªâãàã áªà®««¨­£ 
tl_on_press equ dword[edi+96] ;㪠§ â¥«ì ­  äã­ªæ¨î, ª®â®à ï ¢ë§ë¢ ¥âáï ¯à¨ ­ ¦ â¨¨ Enter
;data_info dd ? ;+ 0 㪠§ â¥«ì ­  ®á­®¢­ë¥ ¤ ­ë¥
;ls_tim dd ? ;+34 ¢à¥¬ï ¯®á«¥¤­¥£® á®åà ­¥­¨ï
;on_activate dd ? ;+92 㪠§ â¥«ì ­  äã­ªæ¨î ¯à¨  ªâ¨¢¨à®¢ ­¨¨ 㧫 
tl_box_left equ dword[edi]
tl_box_top equ dword[edi+ 4]
tl_box_width equ dword[edi+ 8]
tl_box_height equ dword[edi+12]
tl_data_info equ dword[edi+16] ;㪠§ â¥«ì ­  ®á­®¢­ë¥ ¤ ­ë¥
tl_info_size equ word[edi+20] ;à §¬¥à ¤ ­­ëå ¢ë¤¥«ï¥¬ëå ¤«ï ª ¦¤®£® 㧫  (¯®«ì§®¢ â¥«ìá쪨¥ ¤ ­­ë¥ + ⥪áâ ¤«ï ¯®¤¯¨á¨)
tl_info_max_count equ dword[edi+22] ;¬ ªá¨¬ «ì­®¥ ª®«¨ç¥á⢮ 㧫®¢, ª®â®àë¥ ¬®¦­® ¤®¡ ¢¨âì ¢ í«¥¬¥­â
tl_style equ dword[edi+26] ;á⨫¨ í«¥¬¥­â 
tl_data_nodes equ dword[edi+30] ;㪠§ â¥«ì ­  áâàãªâãàë 㧫®¢
tl_data_img equ dword[edi+34] ;㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨ï á ¨ª®­ª ¬¨ 㧫®¢
tl_img_cx equ word[edi+38] ;è¨à¨­  ¨ª®­®ª
tl_img_cy equ word[edi+40] ;¢ëá®â  ¨ª®­®ª
tl_data_img_sys equ dword[edi+42] ;㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨§®¡à ¦¥­¨ï (áâ५ª¨, ¯«îᨪ¨)
tl_ch_tim equ dword[edi+46] ;ª®«¨ç¥á⢮ ¨§¬¥­¥­¨© ¢ ä ©«¥
tl_tim_undo equ dword[edi+50] ;ª®«¨ç¥á⢮ ®â¬¥­¥­­ëå ¤¥©á⢨©
tl_cur_pos equ dword[edi+54] ;¯®§¨æ¨ï ªãàá®à 
tl_col_bkg equ dword[edi+58] ;梥â ä®­ 
tl_col_zag equ dword[edi+62] ;梥⠧ £®«®¢ª 
tl_col_txt equ dword[edi+66] ;梥â ⥪áâ 
tl_capt_cy equ word[edi+70] ;¢ëá®â  ¯®¤¯¨á¨
tl_info_capt_offs equ word[edi+72] ;ᤢ¨£ ¤«ï ­ ç «  ⥪áâ  (¯®¤¯¨á¨ 㧫 )
tl_info_capt_len equ word[edi+74] ;¤«¨­­  ⥪áâ  ¯®¤¯¨á¨ 㧫  (¥á«¨ = 0 â® ¤® ª®­æ  áâàãªâãàë)
tl_el_focus equ dword[edi+76] ;㪠§ â¥«ì ­  áâàãªâãàã í«¥¬¥­â  ¢ 䮪ãá¥
tl_p_scroll equ dword[edi+80] ;㪠§ â¥«ì ­  áâàãªâãàã áªà®««¨­£ 
tl_on_press equ dword[edi+84] ;㪠§ â¥«ì ­  äã­ªæ¨î, ª®â®à ï ¢ë§ë¢ ¥âáï ¯à¨ ­ ¦ â¨¨ Enter
;ª®­áâ ­âë á⨫ï
tl_key_no_edit equ 1b ;í«¥¬¥­â ­¥«ì§ï । ªâ¨à®¢ âì ­  ª« ¢¨ âãॠ(¨§¬¥­ïâì ã஢­¨, 㤠«ïâì)
@ -355,7 +348,7 @@ tl_err_load_caption equ 1b ;
tl_err_load_info_size equ 100b ;­¥ ᮢ¯ ¤ ¥â à §¬¥à ¨­ä®à¬ æ¨®­­®© áâàãªâãàë ¯à¨ ®âªàë⨨
tl_load_mode_add equ 0x20000 ;®¯æ¨ï áç¨â뢠­¨ï ¢ ०¨¬¥ ¤®¡ ¢«¥­¨ï ¨­ä®à¬ æ¨¨
tl_save_load_heder_size equ 26 ;à §¬¥à § £®«®¢ª  ¤«ï § ¯¨á¨/ç⥭¨ï í«¥¬¥­â®¢
tl_offs_box equ 58 ;­ ç «® BOX áâàãªâãàë ¤«ï tree_list
tl_offs_box equ 0 ;­ ç «® BOX áâàãªâãàë ¤«ï tree_list
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Basic macros for use TextEditor ;

View File

@ -76,10 +76,7 @@
<h2><a name="fun_add">tl_node_add</a></h2>
<p>Добавляет узел, в позицию указанную курсором. Пример добавления узла:</p>
<pre> push dword tree1
push dword 0x10002
push dword data_buffer
call dword[tl_node_add]</pre>
<pre> stdcall dword[tl_node_add], tree1,0x10002,data_buffer</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>0x10002</b> - параметры узла (старшие байты 0x0001 - индекс иконки, отображаемой возле узла; меньший байт 0x02 - уровень вложености узла); <b>data_buffer</b> - указатель на дынные, добавляемые в узел.</p>
@ -89,8 +86,7 @@
<h2><a name="fun_get_d">tl_node_get_data</a></h2>
<p>Берет указатель на данные (пользовательские и подпись) из узла под курсором.</p>
<p>Пример 1:</p>
<pre> stdcall [tl_node_get_data], tree1
pop eax</pre>
<pre> stdcall [tl_node_get_data], tree1</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>eax</b> - указатель на дынные узла.</p>
@ -98,14 +94,14 @@
<pre> NODE_SIZE equ 200
node_data rb NODE_SIZE
.........
push ecx esi edi
push eax ecx esi edi
stdcall [tl_node_get_data], tree1
pop esi
mov esi,eax
mov edi,node_data
mov ecx,NODE_SIZE
cld
rep movsb
pop edi esi ecx</pre>
pop edi esi ecx eax</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>NODE_SIZE</b> - размер дынных узла;
<b>node_data</b> - копия на дынных узла.</p>
@ -146,34 +142,25 @@ pop edi esi ecx</pre>
<h2><a name="fun_poi_gi">tl_node_poi_get_info</a></h2>
<p>Берет внутренний указатель на структуру описывающую узел. Пример использования функции:</p>
<pre> push dword tree1
push dword 0
call dword[tl_node_poi_get_info]
pop esi</pre>
<pre> stdcall dword[tl_node_poi_get_info], tree1, 0</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>0</b> - позиция узла, с которого берется указатель;
<b>esi</b> - óêàçàòåëü íà ñòðóêòóðó îïèñûâàþùóþ óçåë.</p>
<b>eax</b> - óêàçàòåëü íà ñòðóêòóðó îïèñûâàþùóþ óçåë.</p>
<p><b>Замечание.</b> Если узел с указанным индексом не найден, в указателе возвращается 0.</p>
<h2><a name="fun_poi_gni">tl_node_poi_get_next_info</a></h2>
<p>Берет указатель на следующий элемент в цепи, без учета открытия/закрытия дочерних узлов. Пример использования функции:</p>
<pre> push tree1
push esi
call dword[tl_node_poi_get_next_info]
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó</pre>
<pre> stdcall dword[tl_node_poi_get_next_info], tree1, eax</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>esi</b> - äî âûçîâà ôóíêöèè óêàçàòåëü íà ñòðóêòóðó îïèñûâàþùóþ óçåë, ïîñëå âûçîâà óêàçàòåëü íà ñòðóêòóðó îïèñûâàþùóþ ñëåäóùèé óçåë â öåïè.</p>
<b>eax</b> - äî âûçîâà ôóíêöèè óêàçàòåëü íà ñòðóêòóðó îïèñûâàþùóþ óçåë, ïîñëå âûçîâà óêàçàòåëü íà ñòðóêòóðó îïèñûâàþùóþ ñëåäóùèé óçåë â öåïè.</p>
<p><b>Замечание.</b> Если следущий узел не найден, в указателе возвращается 0.</p>
<h2><a name="fun_poi_gd">tl_node_poi_get_data</a></h2>
<p>Берет указатель на данные (пользовательские и подпись) из узла указанного в указателе. Пример использования функции:</p>
<pre> push dword tree1
push dword esi
call dword[tl_node_poi_get_data]
pop eax ;ïîëó÷àåì äàííûå óçëà</pre>
<pre> stdcall dword[tl_node_poi_get_data], tree1,esi</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>esi</b> - указатель на структуру описывающую узел;
<b>eax</b> - óêàçàòåëü íà äàííûå óçëà, îïèñààíîãî â esi.</p>
<b>eax</b> - óêàçàòåëü íà äàííûå óçëà, îïèñàííîãî â esi.</p>
<p>Указатель, возвращаемый функцией <i>tl_node_poi_get_data</i> аналогичен указателю возвращаемому функцией <i>tl_node_get_data</i>. Отличие функций в том, что <i>tl_node_poi_get_data</i> работает без задействования курсора. Функциями <i>tl_node_poi_get_info</i>, <i>tl_node_poi_get_next_info</i> и <i>tl_node_poi_get_data</i> можно считывать информацию о узлах элемента, при этом не меняя текущего положения курсора. Т. е. можно организовать доступ к даным элемента в &quot;фоновом режиме&quot;.</p>
<h2><a name="fun_sme">tl_save_mem</a></h2>
@ -181,12 +168,7 @@ pop edi esi ecx</pre>
<pre> MEM_SIZE equ 5000
node_data rb MEM_SIZE
.........
push dword tree1
push dword 0
push dword node_data
push dword MEM_SIZE
call dword[tl_save_mem]
pop eax</pre>
stdcall dword[tl_save_mem], tree1, 0, node_data, MEM_SIZE</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>0</b> - опция сохранения в начало блока памяти (если = 1, то добавляет элемент после других сохраненных ранее);
<b>node_data</b> - указатель на блок памяти;
@ -198,12 +180,7 @@ pop edi esi ecx</pre>
<pre> MEM_SIZE equ 5000
node_data rb MEM_SIZE
.........
push dword tree1
push dword 0
push dword node_data
push dword MEM_SIZE
call dword[tl_load_mem]
pop eax</pre>
stdcall dword[tl_load_mem], tree1, 0, node_data, MEM_SIZE</pre>
<p>где: <b>tree1</b> - структура tree_list;
<b>0</b> - индекс считываемого элемента;
<b>node_data</b> - указатель на блок памяти;
@ -217,11 +194,11 @@ pop edi esi ecx</pre>
node_data rb MEM_SIZE
.........
;сохраняем данные в 'node_data'
stdcall dword[tl_save_mem], MEM_SIZE, node_data, 0, tree1
stdcall dword[tl_save_mem], tree1, 0, node_data, MEM_SIZE
pop eax ;код ошибки
.........
;получаем размер данных в 'node_data'
stdcall dword[tl_get_mem_size], node_data, tree1
stdcall dword[tl_get_mem_size], tree1, node_data
pop ecx ;размер данных, должен быть &lt;= MEM_SIZE</pre>
<h2><a name="version">version_tree_list</a></h2>
@ -230,36 +207,33 @@ pop edi esi ecx</pre>
<h1><a name="struc_tree_list">Структура tree_list</a></h1>
<pre>struc tree_list info_size,info_max_count,style, img_cx,img_cy,\
col_bkg,col_zag,col_txt, box_l,box_t,box_w,box_h, capt_cy,info_capt_offs,\
info_capt_len,el_focus, p_scrol,on_press
info_capt_len,el_focus, p_scroll,on_press
{
.data_info dd 0
.info_size dw info_size
.info_max_count dd info_max_count
.style dd style
.data_nodes dd 0
.data_img dd 0
.img_cx dw img_cx
.img_cy dw img_cy
.data_img_sys dd 0
.ch_tim dd 0
.ls_tim dd 0
.tim_undo dd 0
.cur_pos dd 0
.col_bkg dd col_bkg
.col_zag dd col_zag
.col_txt dd col_txt
.box_left dd box_l
.box_top dd box_t
.box_width dd box_w
.box_height dd box_h
.capt_cy dw capt_cy
.info_capt_offs dw info_capt_offs
.info_capt_len dw info_capt_len
.el_focus dd el_focus
.p_scrol dd p_scrol
rb 4
.on_activate dd 0
.on_press dd on_press
.box_left dd box_l
.box_top dd box_t
.box_width dd box_w
.box_height dd box_h
.data_info dd 0
.info_size dw info_size
.info_max_count dd info_max_count
.style dd style
.data_nodes dd 0
.data_img dd 0
.img_cx dw img_cx
.img_cy dw img_cy
.data_img_sys dd 0
.ch_tim dd 0
.tim_undo dd 0
.cur_pos dd 0
.col_bkg dd col_bkg
.col_zag dd col_zag
.col_txt dd col_txt
.capt_cy dw capt_cy
.info_capt_offs dw info_capt_offs
.info_capt_len dw info_capt_len
.el_focus dd el_focus
.p_scroll dd p_scroll
.on_press dd on_press
}</pre>
<p><b>info_size</b> - количество байт, которое будет выделено для каждого узла. Часть этой памяти пользователь может использовать для своих целей (регулируется через <i>info_capt_offs</i> и <i>info_capt_len</i> см. рис. 2) а остальная часть будет использована как подпись узла.</p>
<p><b>info_max_count</b> - максимальное количество узлов, которые можно добавить в элемент.</p>
@ -274,7 +248,7 @@ pop edi esi ecx</pre>
<p><b>col_txt</b> - цвет текста.</p>
<p><b>capt_cy</b> - высота строки для подписи вверху элемента, если меньше 9 подпись не выводится.</p>
<p><b>info_capt_len</b> - длинна текста для подписи. Если равно 0, то длинна считается так: <i>info_size - info_capt_offs</i>.</p>
<p><b>p_scrol</b> - óêàçàòåëü íà ñòðóêòóðó ñêðîëëèíãà, ñâÿçàííîãî ñ äàííûì ýëåìåíòîì.</p>
<p><b>p_scroll</b> - óêàçàòåëü íà ñòðóêòóðó ñêðîëëèíãà, ñâÿçàííîãî ñ äàííûì ýëåìåíòîì.</p>
<p><b>on_press</b> - указатель на функцию, которая будет вызвана при нажатии [<b>Enter</b>]. Если указатель равен 0 то ничего не будет вызываться.</p>
<p><img src="info_size.png"></p>
@ -294,6 +268,6 @@ pop edi esi ecx</pre>
<p>Стиль не отображает уровни (как в ListBox все узлы одного уровня).</p>
<hr>
<p>Äîêóìåíòàöèÿ îáíîâëÿëàñü ïîñëåäíèé ðàç 30.09.10.</p>
<p>Äîêóìåíòàöèÿ îáíîâëÿëàñü ïîñëåäíèé ðàç 10.11.15.</p>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -217,8 +217,7 @@ pop eax
;ä®­®¢ë© 梥⠡ãä¥à  ¤®«¦¥­ ¡ëâì 0xffffff, ¨­ ç¥ ­¥ ¯à®¨§®©¤¥â ®¡à¥§ª 
;¯® ä®­®¢®¬ã 梥âã ¨ âà ä à¥â ¡ã¤¥â § ­¨¬ â 쬭®£® ¬¥áâ  ¢ ¯ ¬ïâ¨
align 4
proc CreateTrapharetBuffer, buf:dword, img_data:dword
push eax edi
proc CreateTrapharetBuffer uses eax edi, buf:dword, img_data:dword
mov edi,dword[buf]
;§ ¯®«­¥­¨¥ ¤ ­­ëå ¡ãä¥à 
@ -234,7 +233,6 @@ proc CreateTrapharetBuffer, buf:dword, img_data:dword
stdcall [buf2d_conv_24_to_8], edi,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8¡¨â
;®¡à¥§ ¥¬ «¨è­¨¥ ªà ï ¡ãä¥à , ¤«ï ¡®«¥¥ ¡ëáâண® à¨á®¢ ­¨ï
stdcall [buf2d_crop_color], edi,buf2d_color,BUF2D_OPT_CROP_TOP+BUF2D_OPT_CROP_BOTTOM+BUF2D_OPT_CROP_RIGHT+BUF2D_OPT_CROP_LEFT
pop edi eax
ret
endp
@ -636,12 +634,11 @@ txt_tile_type_0 rb FILE_NAME_MAX
align 4
user_is_select:
push ecx esi edi
push eax ecx esi edi
stdcall [tl_node_get_data], tree1
pop esi
cmp esi,0 ;¥á«¨ ¨¬ï ¨£àë ¯ãá⮥
cmp eax,0 ;¥á«¨ ¨¬ï ¨£àë ¯ãá⮥
je @f
mov esi,eax
mov edi,ini_name
mov ecx,FILE_NAME_MAX
cld
@ -650,7 +647,7 @@ user_is_select:
mov byte[game_select_mode],0
call InitAll
@@:
pop edi esi ecx
pop edi esi ecx eax
call draw_window
ret
@ -753,23 +750,25 @@ align 4
start:
load_libraries l_libs_start,load_lib_end
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
mov ebp,lib0
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
cmp dword [lib0+ll_struc_size-4],0
jnz @f
cmp dword [lib1+ll_struc_size-4],0
jnz @f
cmp dword [lib2+ll_struc_size-4],0
jnz @f
cmp dword [lib3+ll_struc_size-4],0
jnz @f
jmp .lib
@@:
mov ebp,lib1
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
.lib:
mcall 40,0x27
mcall 48,3,sc,sizeof.system_colors ;¯®«ãç ¥¬ á¨á⥬­ë¥ 梥â 
;******************************************************************************
; ¯®¤£®â®¢ª  ᯨ᪠ ¨£®à
; ¯®¤£®â®¢ª  ᯨ᪠ ¨£à
;******************************************************************************
stdcall dword[tl_data_init], tree1
@ -792,7 +791,7 @@ start:
inc dl
push ecx edx
stdcall dword[ini_get_str],file_name,ini_sec_files,key_game,txt_tile_type_0,FILE_NAME_MAX,ini_def_decorat_file
stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1 ;¤®¡ ¢«ï¥¬ ­ §¢ ­¨¥ ¨£àë
stdcall dword[tl_node_add], tree1, 0, txt_tile_type_0 ;¤®¡ ¢«ï¥¬ ­ §¢ ­¨¥ ¨£àë
stdcall dword[tl_cur_next], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª ¨£à
pop edx ecx
loop @b
@ -983,13 +982,12 @@ push esi
int 0x40
pop esi
mov eax,4 ; ð¡R÷ÿ-ð? ¢?ò¡¢ÿ
mov bx,BUT1_H
add ebx,3*65536;+3
mov ecx,dword[color_but_te]
or ecx,0x80000000
mov edx,txt_game_a
int 0x40
mcall 4
ror ebx,16
add ebx,BUT1_NEXT_TOP
@ -1037,16 +1035,15 @@ pop esi
align 4
proc draw_rect_border, client_rect:dword, user_box:dword
pushad
mov edi,dword[client_rect]
mov esi,dword[user_box]
cmp esi,0
je @f
mov edi,dword[client_rect]
mov ebx,dword[edi+8] ;+8 = width
inc bx
mov ecx,dword[esi+4] ;+4 = top
mov edx,[sc.work]
mov eax,13
int 0x40 ;top
mcall 13 ;top
mov eax,dword[esi+4] ;+4 = top
add eax,dword[esi+12] ;+12 = height
@ -1057,8 +1054,7 @@ proc draw_rect_border, client_rect:dword, user_box:dword
mov cx,word[edi+12] ;+12 = bottom
inc cx
sub cx,ax
mov eax,13
int 0x40 ;bottom
mcall 13 ;bottom
.no_bottom:
mov ebx,dword[esi] ;+0 left
@ -1066,8 +1062,7 @@ proc draw_rect_border, client_rect:dword, user_box:dword
shl ecx,16
mov cx,word[esi+12] ;+12 = height
inc cx
mov eax,13
int 0x40 ;left
mcall 13 ;left
mov eax,dword[esi] ;+0 left
add eax,dword[esi+8] ;+8 = width
@ -1076,8 +1071,7 @@ proc draw_rect_border, client_rect:dword, user_box:dword
mov bx,word[edi+8] ;+8 = right
sub bx,ax
inc bx
mov eax,13
int 0x40 ;right
mcall 13 ;right
@@:
popad
ret
@ -1182,29 +1176,24 @@ l_libs_start:
load_lib_end:
align 4
proc mem_copy, source:dword, destination:dword, len:dword
push ecx esi edi
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
cld
mov esi, dword[source]
mov edi, dword[destination]
mov ecx, dword[len]
rep movsb
pop edi esi ecx
ret
endp
align 4
convert_to_str:
pushad
;mov eax,dword[value]
;mov edi,dword[text]
mov dword[edi+1],0
cld
call .str
popad
ret
align 4
.str:
mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
@ -1214,15 +1203,12 @@ align 4
xor edx,edx ;®ç¨áâ¨âì edx
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
push edx ;¯®«®¦¨âì ¢ á⥪
;dec edi ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
;sbb al,$69 ;- ç¥áâ­® ¤ ­­ ï ¨­áâàãªæ¨ï ¬¥­ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ­¥ §­ î ª ª íâ® à ¡®â ¥â
;das ;¯®á«¥ ¤ ­­®© ª®¬ ­¤ë ª ª ¡ë ¯à®¨á室¨â 㬥­ì襭¨¥ al ­  66h (¢ ª­¨£¥ ­ ¯¨á ­® ¤à㣮¥)
or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥
stosb ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
ret ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
ret ;¢¥à­ãâìáï ®ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
last_time dd 0
@ -1230,7 +1216,7 @@ image_data dd 0 ;
image_data_gray dd 0 ;¯ ¬ïâì á ¢à¥¬¥­­ë¬¨ á¥à묨 ¨§®¡à ¦¥­¨ï¬¨ ¢ ä®à¬ â¥ 24-bit, ¨§ ª®â®àëå ¡ã¤ãâ ᮧ¤ ¢ âìáï âà ä à¥âë
run_file_70 FileInfoBlock
hed db 'Nu pogodi 17.09.10',0 ;¯®¤¯¨áì ®ª­ 
hed db 'Nu pogodi 10.11.15',0 ;¯®¤¯¨áì ®ª­ 
sc system_colors ;á¨á⥬­ë¥ 梥â 
count_of_dir_list_files equ 10
@ -1449,11 +1435,10 @@ dd 0,0
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
align 16
i_end:
rb 1024
align 16
procinfo process_information
rb 1024
stacktop:
sys_path rb 4096
file_name:

View File

@ -55,29 +55,21 @@ align 4
start:
load_libraries l_libs_start,load_lib_end
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
mov ebp,lib0
cmp dword [ebp+ll_struc_size-4],0
jz @f
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
cmp dword [lib0+ll_struc_size-4],0
jnz @f
cmp dword [lib1+ll_struc_size-4],0
jnz @f
cmp dword [lib2+ll_struc_size-4],0
jnz @f
cmp dword [lib3+ll_struc_size-4],0
jnz @f
jmp .lib
@@:
mcall -1 ;exit not correct
@@:
mov ebp,lib1
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
mov ebp,lib2
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
mov ebp,lib3
cmp dword [ebp+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
.lib:
copy_path ini_name,sys_path,file_name,0x0
copy_path ini_name,sys_path,file_name,0
stdcall dword[ini_get_str],file_name,ini_sec,ini_k_cache,dword[edit1.text],dword[edit1.max],ini_def_cache
stdcall [str_len],dword[edit1.text],dword[edit1.max]
mov dword[edit1.size],eax
@ -93,7 +85,7 @@ start:
stdcall dword[ini_get_str],file_name,ini_sec,ini_ext,txt_tile_type_0,dword[tree1.info_capt_len],ini_ext.def
cmp byte[txt_tile_type_0],0
je @f
stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1
stdcall dword[tl_node_add], tree1, 0, txt_tile_type_0
jmp @b
@@:
mov byte[ini_ext.number],'0' ;áç¨â뢠¥¬ ¯ à ¬¥âà ®â ext0 ª®â®àë© ¡ã¤¥â ¢ë¡à ­ ¢ ᯨ᪥
@ -102,7 +94,7 @@ start:
jne @f
mov dword[txt_tile_type_0],'.bmp' ;¥á«¨ ¢ *.ini ä ©«¥ ­¨ç¥£® ­¥â ¤®¡ ¢«ï¥¬ à áè¨à¥­¨¥ .bmp
@@:
stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1
stdcall dword[tl_node_add], tree1, 0, txt_tile_type_0
; init bmp file
stdcall mem.Alloc, dword RGB_TILE_SIZE+300 ;300 - § ¯ á­ë¥ ¡ ©âë á ãç¥â®¬ § £®«®¢ª  bmp ä ©« 
@ -117,8 +109,7 @@ start:
stdcall mem.Alloc, dword TREE_ICON_NOD16_BMP_SIZE
mov [tree_nod_icon],eax
copy_path fn_icon1,sys_path,file_name,0x0
mov eax,70 ;load icon file
copy_path fn_icon1,sys_path,file_name,0
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
@ -126,8 +117,7 @@ start:
m2m [run_file_70.Buffer], [tree_sys_icon]
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40
mcall 70,run_file_70
cmp ebx,0xffffffff
je @f
stdcall dword[img_decode], dword[tree_sys_icon],ebx,0
@ -140,12 +130,10 @@ start:
@@:
copy_path fn_icon2,sys_path,file_name,0x0
mov eax,70 ;load icon file
copy_path fn_icon2,sys_path,file_name,0
mov [run_file_70.Count], TREE_ICON_NOD16_BMP_SIZE
m2m [run_file_70.Buffer], [tree_nod_icon]
mov ebx,run_file_70
int 0x40
mcall 70,run_file_70
cmp ebx,0xffffffff
je @f
stdcall dword[img_decode], dword[tree_nod_icon],ebx,0
@ -178,8 +166,7 @@ red_win:
align 4
still:
mov eax,10
mcall
mcall 10
cmp al,0x1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
@ -188,14 +175,10 @@ still:
cmp al,0x3
jz button
push dword ch2
call [check_box_mouse]
push dword ch1
call [check_box_mouse]
stdcall [check_box_mouse],ch2
stdcall [check_box_mouse],ch1
stdcall [edit_box_mouse], edit1
stdcall [edit_box_mouse], edit2
stdcall [tl_mouse], tree1
stdcall [tl_mouse], tree2
@ -208,10 +191,8 @@ key:
stdcall [edit_box_key], edit1
stdcall [edit_box_key], edit2
push dword tree1
call [tl_key]
push dword tree2
call [tl_key]
stdcall [tl_key],tree1
stdcall [tl_key],tree2
mov ebx,dword[el_focus] ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ®ª­  treelist ¢ 䮪ãá¥
cmp ebx, dword tree1
@ -272,12 +253,10 @@ pushad
mcall 12,1
xor eax,eax
mov ebx,20*65536+min_window_w
mov ecx,20*65536+min_window_h
mov edx,[sc.work]
or edx,0x33000000
mov edi,hed
mcall
mcall ,20*65536+min_window_w,20*65536+min_window_h
mcall 9,procinfo,-1
@ -293,7 +272,7 @@ pushad
mov eax,dword[tree2.box_left] ;¤¢¨£ ¥¬ áªà®««¨­£
add eax,dword[tree2.box_width]
mov ebx,dword[tree2.p_scrol]
mov ebx,dword[tree2.p_scroll]
mov word[ebx+2],ax
mov dword[edit2.left],edi
@ -304,17 +283,10 @@ pushad
mov dword[wScrMetki.all_redraw],1
stdcall [scrollbar_ver_draw], dword wScrMetki
mov eax,8 ;ª­®¯ª 
mov ebx,145*65536+20
mov ecx,5*65536+25
mov edx,6
mov esi,[sc.work_button]
int 0x40
mcall 8,145*65536+20,5*65536+25,6 ;ª­®¯ª 
mov ebx,100*65536+20
mov ecx,5*65536+25
mov edx,5
int 0x40
mcall ,100*65536+20,5*65536+25,5
mov ebx,170*65536+40 ;ª­®¯ª  ¢ë§®¢  ¤¨ «®£  OpenDial
;mov ecx,5*65536+25
@ -503,14 +475,17 @@ button:
cmp ah,5
jne @f
call but_ZoomM
jmp still
@@:
cmp ah,6
jne @f
call but_ZoomP
jmp still
@@:
cmp ah,7
jne @f
call but_Refresh
jmp still
@@:
cmp ah,9
@ -521,18 +496,22 @@ button:
cmp ah,10
jne @f
call but_met_up
jmp still
@@:
cmp ah,11
jne @f
call but_met_dn
jmp still
@@:
cmp ah,12
jne @f
call fun_goto_met
jmp still
@@:
cmp ah,13 ;¤¨ «®£ OpenDialog ¤«ï ¯®¨áª  ¯ ¯ª¨
jne @f
call fun_opn_dlg
jmp still
@@:
cmp ah,1
jne still
@ -557,8 +536,7 @@ button:
;data_rgb - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) )
align 4
proc img_rgb_wdiv2 data_rgb:dword, size:dword
push eax ebx ecx edx
proc img_rgb_wdiv2 uses eax ebx ecx edx, data_rgb:dword, size:dword
mov eax,dword[data_rgb]
mov ecx,dword[size] ;ecx = size
imul ecx,3
@ -596,8 +574,6 @@ proc img_rgb_wdiv2 data_rgb:dword, size:dword
add eax,3
add ebx,6
loop @b
pop edx ecx ebx eax
ret
endp
@ -676,8 +652,7 @@ endp
;data_rgb - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) )
align 4
proc img_rgb_wmul2, data_rgb:dword, size:dword
push eax ebx ecx edx
proc img_rgb_wmul2 uses eax ebx ecx edx, data_rgb:dword, size:dword
;eax - source
;ebx - destination
mov ecx,dword[size] ;ecx = size
@ -697,7 +672,6 @@ proc img_rgb_wmul2, data_rgb:dword, size:dword
sub eax,3
sub ebx,6
loop @b
pop edx ecx ebx eax
ret
endp
@ -754,9 +728,7 @@ endp
;size - count img pixels (size img data / 3(rgb) )
;size_w - width img in pixels
align 4
proc img_rgb_hoffs, data_rgb:dword, size:dword, size_w:dword, hoffs:dword
push eax ebx ecx edx esi
proc img_rgb_hoffs uses eax ebx ecx edx esi, data_rgb:dword, size:dword, size_w:dword, hoffs:dword
mov esi,dword[size_w]
lea esi,[esi+esi*2] ;esi = width * 3(rgb)
imul esi,dword[hoffs]
@ -779,7 +751,6 @@ proc img_rgb_hoffs, data_rgb:dword, size:dword, size_w:dword, hoffs:dword
sub eax,3
sub ebx,3
loop @b
pop esi edx ecx ebx eax
ret
endp
@ -824,26 +795,22 @@ proc img_rgb_wcrop, data_rgb:dword, size_w_old:dword, size_w_new:dword, size_h:d
endp
align 4
proc mem_copy, source:dword, destination:dword, len:dword
push ecx esi edi
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
cld
mov esi, dword[source]
mov edi, dword[destination]
mov ecx, dword[len]
rep movsb
pop edi esi ecx
ret
endp
align 4
proc mem_clear, mem:dword, len:dword
push eax ecx edi
proc mem_clear uses eax ecx edi, mem:dword, len:dword
cld
xor al,al
mov edi, dword[mem]
mov ecx, dword[len]
repne stosb
pop edi ecx eax
ret
endp
@ -897,38 +864,7 @@ tree2 tree_list 32,300, tl_draw_par_line, 16,16,\
el_focus, wScrMetki,fun_goto_met
align 4
wScrMetki:
.x:
.size_x dw 16 ;+0
.start_x dw 0 ;+2
.y:
.size_y dw 100 ;+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
wScrMetki scrollbar 16,0, 100,0, 15, 100, 30,0, 0xeeeeee, 0xbbddff, 0, 1
ed_buffer: ;òåêñò äëÿ edit
.2: rb 32
@ -997,19 +933,21 @@ map: ;
align 4
tile_00 rb size_tile_struc * max_tiles_count
;íâ®â ª®¤ ­¥ ¬®©, ®­ ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã
;input:
; eax = value
; edi = string buffer
; eax - ç¨á«®
; edi - ¡ãä¥à ¤«ï áâப¨
; len - ¤«¨­­  ¡ãä¥à 
;output:
; edi =
align 4
tl_convert_to_str:
pushad
mov dword[edi+1],0;0x20202020
proc convert_int_to_str, len:dword
pushad
mov esi,[len]
add esi,edi
dec esi
call .str
popad
popad
ret
endp
align 4
.str:
@ -1021,22 +959,26 @@ align 4
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
push edx ;¯®«®¦¨âì ¢ á⥪
;dec edi ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
cmp edi,esi
jge @f
or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥
stosb ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
ret ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
mov byte[edi],0 ;¢ ª®­¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ­¥ ¢ë« §¨« ¬ãá®à
@@:
ret ;¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
hed db 'Planet viewer 16.01.13',0 ;¯®¤¯¨áì ®ª­ 
hed db 'Planet viewer 09.11.15',0 ;¯®¤¯¨áì ®ª­ 
sc system_colors ;á¨á⥬­ë¥ 梥â 
mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox
align 16
i_end:
rb 1024
align 16
procinfo process_information
rb 1024
stacktop:
sys_path rb 4096
file_name:

View File

@ -63,9 +63,9 @@ tile_delta_y equ byte[edi+31] ;ᤢ
; load_new_tile (¢¥àå­ïï ª à⨭ª )
;???
;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢¯à ¢®
align 4
CursorMoveRight: ;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢¯à ¢®
CursorMoveRight:
push ebx ecx
xor ebx,ebx
xor ecx,ecx
@ -87,9 +87,9 @@ CursorMoveRight: ;
pop ecx ebx
ret
;???
;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢­¨§
align 4
CursorMoveDown: ;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢­¨§
CursorMoveDown:
push ebx ecx
xor ebx,ebx
xor ecx,ecx
@ -111,24 +111,23 @@ CursorMoveDown: ;
pop ecx ebx
ret
;???
;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢¢¥àå, ¯® ᯨáªã
align 4
but_met_up: ;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢¢¥àå, ¯® ᯨáªã
but_met_up:
stdcall dword[tl_node_move_up], tree2
ret
;???
;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢­¨§, ¯® ᯨáªã?
align 4
but_met_dn: ;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢­¨§, ¯® ᯨáªã
but_met_dn:
stdcall dword[tl_node_move_down], tree2
ret
;???
;¬¥­ï¥¬ à áè¨à¥­¨¥ ¤«ï ª àâë
align 4
fun_new_map_type: ;¬¥­ï¥¬ à áè¨à¥­¨¥ ¤«ï ª àâë
fun_new_map_type:
push eax
stdcall dword[tl_node_get_data], tree1
pop eax
cmp eax,0
je @f
mov dword[txt_tile_type],eax
@ -138,8 +137,7 @@ fun_new_map_type: ;
;§ ¤ ¥¬ à á¯®«®¦¥­¨¥ â ©«®¢ ¯® á¥âª¥
align 4
proc tiles_init_grid, beg_tiles:dword, count:dword, cols:dword
push eax ebx ecx edx edi
proc tiles_init_grid uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, cols:dword
xor eax,eax
xor ebx,ebx
mov edi,[beg_tiles]
@ -156,7 +154,6 @@ proc tiles_init_grid, beg_tiles:dword, count:dword, cols:dword
inc bx
.old_lin:
loop @b
pop edi edx ecx ebx eax
ret
endp
@ -165,8 +162,7 @@ endp
;â ©«ë ¢ ¯à®â¨¢®¯®«®¦­ãî áâ®à®­ã, ¢ १ã«ìâ â¥ ª®®à¤¨­ âë ¡®«ì設á⢠ â ©«®¢ ­¥ ¬¥­ïîâáï
;  §­ ç¨â ¯à®£à ¬¬  ­¥ ¡ã¤¥â ¯¥à¥ç¨â뢠âì ¨å § ­®¢®, 祬 ¨ ¤®á⨣ ¥âáï ®¯â¨¬¨§ æ¨ï
align 4
proc tiles_grid_move_left, beg_tiles:dword, count:dword, cols:dword
push eax ebx ecx edx edi
proc tiles_grid_move_left uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, cols:dword
xor eax,eax
xor ebx,ebx
mov edi,[beg_tiles]
@ -180,15 +176,13 @@ proc tiles_grid_move_left, beg_tiles:dword, count:dword, cols:dword
dec tile_delta_x
add edi,size_tile_struc
loop @b
pop edi edx ecx ebx eax
ret
endp
;ᤢ¨£ ¥¬ á¥âªã ¢¯à ¢®, ¢ë«¥§è¨¥ á⮫¡æë ¡ã¤ãâ ¯¥à¥ª¨­ãâë ­  «¥¢ãî áâ®à®­ã
;¤¥« ¥â ⮦¥ çâ® ¨ tiles_grid_move_left ⮫쪮 ¤¢¨£ ¥â ª®®à¤¨­ âë ¢ ¤àã£ãî áâ®à®­ã
align 4
proc tiles_grid_move_right, beg_tiles:dword, count:dword, cols:dword
push eax ebx ecx edx edi
proc tiles_grid_move_right uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, cols:dword
xor eax,eax
xor ebx,ebx
mov edi,[beg_tiles]
@ -202,13 +196,11 @@ proc tiles_grid_move_right, beg_tiles:dword, count:dword, cols:dword
.no_jump:
add edi,size_tile_struc
loop @b
pop edi edx ecx ebx eax
ret
endp
align 4
proc tiles_grid_move_up, beg_tiles:dword, count:dword, rows:dword
push eax ebx ecx edx edi
proc tiles_grid_move_up uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, rows:dword
xor eax,eax
xor ebx,ebx
mov edi,[beg_tiles]
@ -222,13 +214,11 @@ proc tiles_grid_move_up, beg_tiles:dword, count:dword, rows:dword
dec tile_delta_y
add edi,size_tile_struc
loop @b
pop edi edx ecx ebx eax
ret
endp
align 4
proc tiles_grid_move_down, beg_tiles:dword, count:dword, rows:dword
push eax ebx ecx edx edi
proc tiles_grid_move_down uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, rows:dword
xor eax,eax
xor ebx,ebx
mov edi,[beg_tiles]
@ -242,35 +232,28 @@ proc tiles_grid_move_down, beg_tiles:dword, count:dword, rows:dword
.no_jump:
add edi,size_tile_struc
loop @b
pop edi edx ecx ebx eax
ret
endp
align 4
proc array_tile_function, beg_tiles:dword, count:dword, funct:dword
push ecx edi
proc array_tile_function uses ecx edi, beg_tiles:dword, count:dword, funct:dword
mov edi,[beg_tiles]
mov ecx,[count]
@@:
stdcall [funct],edi
add edi,size_tile_struc
loop @b
pop edi ecx
ret
endp
align 4
draw_tiles:
pushad
mov eax,47
mov ebx,0x20000
xor ecx,ecx
mov cl,byte[map.zoom]
mov edx,128*65536+13
movzx ecx,byte[map.zoom]
mov esi,[sc.work_text]
or esi,0x40000000
mov edi,[sc.work]
int 0x40
mcall 47,0x20000,, (128 shl 16)+13
stdcall array_tile_function, tile_00,max_tiles_count,draw_tile
popad
@ -466,40 +449,35 @@ but_ZoomM:
@@:
ret
;???
;á®åà ­¥­¨¥ ä ©«  á ¬¥âª ¬¨
align 4
but_MetSave: ;á®åà ­¥­¨¥ ä ©«  á ¬¥âª ¬¨
stdcall dword[tl_save_mem], TREE_ICON_SYS16_BMP_SIZE,[bmp_icon],0,tree2
but_MetSave:
stdcall dword[tl_save_mem], tree2,0,[bmp_icon],TREE_ICON_SYS16_BMP_SIZE
copy_path fn_metki,sys_path,file_name,0
push eax ebx ecx edi
copy_path fn_metki,sys_path,file_name,0x0
stdcall dword[tl_get_mem_size], tree2,[bmp_icon]
inc eax ;¤«ï § ¯¨á¨ ¢ ä ©« § ¢¥àè î饣® ­ã«ï
stdcall dword[tl_get_mem_size], [bmp_icon],tree2
pop ecx
inc ecx ;¤«ï § ¯¨á¨ ¢ ä ©« § ¢¥àè î饣® ­ã«ï
mov eax,70
m2m [run_file_70.Buffer], [bmp_icon]
mov [run_file_70.Function], 2
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov [run_file_70.Count], ecx
mov [run_file_70.Count], eax
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40
mcall 70,run_file_70
pop edi ecx ebx eax
jmp still
;???
;áç¨â뢠¥¬ ä ©« á ¬¥âª ¬¨
align 4
but_MetLoad: ;áç¨â뢠¥¬ ä ©« á ¬¥âª ¬¨
but_MetLoad:
cmp byte[met_fr_opn],0
jne .end_f
copy_path fn_metki,sys_path,file_name,0
pushad
mov byte[met_fr_opn],1
copy_path fn_metki,sys_path,file_name,0x0
mov eax,70 ;load icon file
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
@ -507,24 +485,21 @@ but_MetLoad: ;
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
m2m [run_file_70.Buffer], [bmp_icon]
mov eax,70
mov ebx,run_file_70
int 0x40
mcall 70,run_file_70
cmp ebx,0xffffffff
je @f
stdcall [tl_load_mem], TREE_ICON_SYS16_BMP_SIZE,dword[bmp_icon],0,tree2
stdcall [tl_cur_beg], tree2 ;?
stdcall [tl_draw], tree2 ;?
pop eax
stdcall [tl_load_mem], tree2,0,[bmp_icon],TREE_ICON_SYS16_BMP_SIZE
stdcall [tl_cur_beg], tree2
stdcall [tl_draw], tree2
@@:
mov byte[file_name],0 ;clear file name
popad
.end_f:
ret
;???
;¤®¡ ¢«¥­¨¥ ¬¥âª¨
align 4
but_MetAdd: ;¤®¡ ¢«¥­¨¥ ¬¥âª¨
but_MetAdd:
push eax
mov eax,dword[bmp_icon]
m2m dword[eax], dword[map.coord_x]
@ -532,17 +507,16 @@ but_MetAdd: ;
m2m word[eax+8], word[map.zoom]
add eax,12
stdcall dword[str_copy], eax,30,dword[edit2.text],30
stdcall dword[tl_node_add], dword[bmp_icon], 0, tree2
stdcall dword[tl_node_add], tree2, 0, dword[bmp_icon]
stdcall dword[tl_draw], tree2
pop eax
jmp still
;???
;¯¥à¥å®¤ ª ¢ë¡à ­­®© ¬¥âª¥
align 4
fun_goto_met: ;¯¥à¥å®¤ ª ¢ë¡à ­­®© ¬¥âª¥
fun_goto_met:
push eax
stdcall dword[tl_node_get_data], tree2
pop eax
cmp eax,0
je @f ;ªãàá®à ­¥ á⮨⠭  ¬¥âª¥
m2m dword[map.coord_x],dword[eax]
@ -563,38 +537,27 @@ but_Refresh:
ret
align 4
proc tile_init, tile:dword
push eax edi
proc tile_init uses eax edi, tile:dword
mov edi,[tile]
push dword RGB_TILE_SIZE+300
call mem.Alloc
stdcall mem.Alloc, RGB_TILE_SIZE+300
mov tile_rgb_icon,eax
push dword RGB_TILE_SIZE
call mem.Alloc
stdcall mem.Alloc, RGB_TILE_SIZE
mov tile_drobn_icon,eax
pop edi eax
ret
endp
align 4
proc tile_destroy, tile:dword
push edi
proc tile_destroy uses edi, tile:dword
mov edi,[tile]
push tile_rgb_icon
call mem.Free
push tile_drobn_icon
call mem.Free
pop edi
stdcall mem.Free,tile_rgb_icon
stdcall mem.Free,tile_drobn_icon
ret
endp
;???
align 4 ;§ £à㦠¥â â ©«ë, ¢ ®¯à¥¤¥«¥­­®© ®¡« áâ¨
proc load_tile, tile:dword
push eax ebx ecx edi
;§ £à㦠¥â â ©«ë, ¢ ®¯à¥¤¥«¥­­®© ®¡« áâ¨
align 4
proc load_tile uses eax ebx ecx edi, tile:dword
mov edi,dword[tile] ;ª®¯¨à㥬 㪠§ â¥«ì ­  áâàãªâãàã â ©« , çâ®-¡ë à ¡®â «¨ ª®­áâ ­âë
stdcall mem_copy, map,edi, 9 ;ª®¯¨à㥬 ª®®à¤¨­ âë ªãàá®à  ¢ áâàãªâãàã â ©« 
@ -748,7 +711,6 @@ proc load_tile, tile:dword
jmp .zoom
@@:
pop edi ecx ebx eax
ret
endp
@ -798,7 +760,6 @@ align 4 ;
proc load_new_tile, tile:dword
pushad
mov eax,70 ;load icon file
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
@ -806,8 +767,7 @@ proc load_new_tile, tile:dword
m2m [run_file_70.Buffer], [bmp_icon]
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40
mcall 70,run_file_70
mov edi,[tile]
; cmp ebx,0xffffffff
; je .no_load
@ -844,8 +804,7 @@ endp
;äã­ªæ¨ï £¥­¥à¨àã¥â ç áâì ¯ã⨠ª ä ©«ã ¢ ¢¨¤¥: \z?\?\x?\?\y?
align 4
proc get_tile_path, tile:dword
push eax ecx edi esi
proc get_tile_path uses eax ecx edi esi, tile:dword
mov ecx,300
mov edi,txt_tile_path
@@:
@ -869,7 +828,7 @@ proc get_tile_path, tile:dword
inc edi
xor eax,eax
mov al,byte[esi+8] ;+8 = zoom
call tl_convert_to_str
stdcall convert_int_to_str, 300
inc edi
cmp byte[esi+8],9 ;+8 = zoom
@ -883,7 +842,7 @@ proc get_tile_path, tile:dword
cmp eax,ecx
jge .out_of_rang ;coord_x ¡®«ìè¥ ¤®¯ãá⨬®£® §­ ç¥­¨ï ¯à¨ § ¤ ­­®¬ ¬ áèâ ¡¥
shr eax,10
call tl_convert_to_str
stdcall convert_int_to_str, 300
@@:
inc edi
@ -895,7 +854,7 @@ jge .out_of_rang ;coord_x
inc edi
mov eax,[esi] ;coord_x
call tl_convert_to_str
stdcall convert_int_to_str, 300
@@:
inc edi
@ -914,7 +873,7 @@ jge .out_of_rang ;coord_x
cmp eax,ecx
jge .out_of_rang ;coord_y ¡®«ìè¥ ¤®¯ãá⨬®£® §­ ç¥­¨ï ¯à¨ § ¤ ­­®¬ ¬ áèâ ¡¥
shr eax,10
call tl_convert_to_str
stdcall convert_int_to_str, 300
@@:
inc edi
@ -926,11 +885,10 @@ jge .out_of_rang ;coord_y
inc edi
mov eax,[esi+4] ;coord_y]
call tl_convert_to_str
stdcall convert_int_to_str, 300
.out_of_rang:
call get_all_path
pop esi edi ecx eax
ret
endp

View File

@ -272,8 +272,8 @@ proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
cmp ted_panel_id,TED_PANEL_SYNTAX
jne @f
stdcall dword[tl_node_get_data], tree1
pop dword[fn_col_option]
mov ebx,dword[fn_col_option]
mov [fn_col_option],eax
mov ebx,eax
call open_unpac_synt_file
cmp ebx,-1
je @f

File diff suppressed because one or more lines are too long

View File

@ -51,24 +51,22 @@ macro load_image_file path,buf,size
db 0
@@:
;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
copy_path .path_str,[32],file_name,0x0
copy_path .path_str,[32],file_name,0
else
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
end if
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax
mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov [run_file_70.Count], dword size
m2m [run_file_70.Buffer], [buf]
m2m [run_file_70.Buffer], eax
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
cmp ebx,0xffffffff
je @f
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
@ -210,29 +208,25 @@ mov ebp,lib0
mov eax,dword[icon_tl_sys]
mov dword[tree1.data_img],eax
;------------------------------------------------------------------------------
copy_path fn_syntax_dir,sys_path,file_name,0x0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
mov eax,70
mov ebx,tree_file_struct
int 0x40
cmp ebx,-1
je .end_dir_init
copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
mcall 70,tree_file_struct
cmp ebx,-1
je .end_dir_init
mov eax,dir_mem
add eax,32+4+1+3+4*6+8
mov ecx,ebx
@@:
mov ecx,ebx
@@:
cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..'
je .filter
;0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
stdcall dword[tl_node_add], eax,0x10000, tree1
stdcall dword[tl_node_add], tree1,0x10000,eax
stdcall dword[tl_cur_next], tree1
.filter:
add eax,304
loop @b
stdcall dword[tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ­  ­ ç «® ᯨ᪠
.end_dir_init:
.end_dir_init:
;--- load ini file ---
copy_path ini_name,sys_path,file_name,0
@ -326,12 +320,9 @@ draw_window:
mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t
call EvSize
mov eax,13 ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
xor ebx,ebx
mov ecx,ted_wnd_t
mov bx,word[procinfo.client_box.width]
movzx ebx,word[procinfo.client_box.width]
inc bx
int 0x40
mcall 13,,ted_wnd_t ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
call draw_but_toolbar
@ -361,14 +352,12 @@ mouse:
;output:
; ah = symbol
align 4
proc KeyConvertToASCII, table:dword
push ebx
proc KeyConvertToASCII uses ebx, table:dword
mov ebx,dword[table] ;convert scan to ascii
ror ax,8
xor ah,ah
add bx,ax
mov ah,byte[ebx]
pop ebx
ret
endp
@ -541,7 +530,7 @@ button:
@@:
stdcall [ted_delete], tedit0
stdcall dword[tl_data_clear], tree1
stdcall [tl_data_clear], tree1
mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0

View File

@ -153,7 +153,7 @@ prop_button:
stdcall str_instr, ebx,[edit3.text]
test al,al
jnz .end_add
stdcall dword[tl_node_add], ebx, (0 shl 16), tree3
stdcall dword[tl_node_add], tree3, (0 shl 16), ebx
stdcall dword[tl_cur_next], tree3
.end_add:
add ebx,MAX_COLOR_WORD_LEN+8 ;sizeof.TexColViv
@ -166,9 +166,9 @@ prop_button:
jne @f
;ª®¯¨à®¢ âì ¢ ¡ãä¥à
stdcall [tl_node_get_data],tree3
pop esi
or esi,esi
or eax,eax
jz .no_select_0
mov esi,eax
mov edi,[tedit0.buffer]
mov dword[edi],MAX_COLOR_WORD_LEN
mov dword[edi+4],0 ;text data
@ -199,19 +199,4 @@ editboxes_end:
string1 rb MAX_COLOR_WORD_LEN
align 4
w_scr_t3:
.size_x dw 16 ;+0
rb 2+2+2
.btn_high dd 15 ;+8
.type dd 1 ;+12
.max_area dd 100 ;+16
rb 4+4
.bckg_col dd 0xeeeeee ;+28
.frnt_col dd 0xbbddff ;+32
.line_col dd 0 ;+36
rb 4+2+2
.run_x:
rb 2+2+2+2+4+4+4+4+4+4
.all_redraw dd 0 ;+80
.ar_offset dd 1 ;+84
w_scr_t3 scrollbar 16,0, 3,0, 15, 100, 0,0, 0xeeeeee, 0xbbddff, 0, 1

View File

@ -38,24 +38,22 @@ macro load_image_file path,buf,size
db 0
@@:
;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
copy_path .path_str,[32],file_name,0x0
copy_path .path_str,[32],file_name,0
else
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
end if
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax
mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
mov [run_file_70.Function], 0
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov [run_file_70.Count], dword size
m2m [run_file_70.Buffer], [buf]
mov [run_file_70.Buffer], eax
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
cmp ebx,0xffffffff
je @f
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
@ -92,12 +90,11 @@ start:
load_libraries l_libs_start,load_lib_end
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
mov ebp,lib0
cmp dword [ebp+ll_struc_size-4],0
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
cmp dword [lib0+ll_struc_size-4],0
jz @f
mcall -1 ;exit not correct
@@:
@@:
;---------------------------------------------------------------------
stdcall dword[tl_data_init],dword tree1
@ -126,11 +123,7 @@ mov ecx,ebx
@@:
cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..'
je .filter
push dword tree1
push dword 0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
push dword eax
call dword[tl_node_add]
stdcall dword[tl_node_add],tree1,0x10000,eax ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
stdcall dword[tl_cur_next],tree1
.filter:
add eax,304
@ -330,9 +323,11 @@ button:
align 4
but_OpenSyntax:
push eax
stdcall [tl_node_get_data],tree1
pop dword [fn_col_option]
mov [fn_col_option],eax
call InitColText
pop eax
ret
align 4
@ -378,7 +373,7 @@ get_wnd_in_focus:
;@@:
ret
hed db 'TextEditor syntax file converter 01.07.14',0 ;¯®¤¯¨áì ®ª­ 
hed db 'TextEditor syntax file converter 10.11.15',0 ;¯®¤¯¨áì ®ª­ 
conv_tabl rb 128 ; â ¡«¨æ  ¤«ï ª®­¢¥àâ¨à®¢ ­¨ï scan-ª®¤  ¢ ascii-ª®¤
txt122 db '‡ £à. ä ©«',0
@ -402,10 +397,10 @@ l_libs_start:
load_lib_end:
align 16
i_end:
rb 1024
align 16
procinfo process_information
rb 1024
thread:
rb 1024
stacktop: