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 if lang eq ru
capt db 'info 3ds ¢¥àá¨ï 05.11.15',0 ;¯®¤¯¨áì ®ª­  capt db 'info 3ds ¢¥àá¨ï 10.11.15',0 ;¯®¤¯¨áì ®ª­ 
else 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 end if
MAX_FILE_LEVEL equ 20 ;¬ ªá¨¬ «ì­ë© ã஢¥­ì ¢«®¦¥­­®á⨠¡«®ª®¢ ¤«ï  ­ «¨§  MAX_FILE_LEVEL equ 20 ;¬ ªá¨¬ «ì­ë© ã஢¥­ì ¢«®¦¥­­®á⨠¡«®ª®¢ ¤«ï  ­ «¨§ 

View File

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

View File

@ -30,12 +30,11 @@ pushad
inc byte[prop_wnd_run] inc byte[prop_wnd_run]
stdcall [tl_node_get_data],tree1 stdcall [tl_node_get_data],tree1
pop ebx
xor edx,edx xor edx,edx
mov dword[capt_p],txt_q mov dword[capt_p],txt_q
cmp ebx,0 cmp eax,0
je .no_points je .no_points
mov ebx,dword[ebx] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª  mov ebx,dword[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
add ebx,dword[open_file_lif] add ebx,dword[open_file_lif]
cmp word[ebx],CHUNK_VERTLIST cmp word[ebx],CHUNK_VERTLIST
@ -94,7 +93,7 @@ pushad
stdcall str_cat, obj_point.text,esi stdcall str_cat, obj_point.text,esi
stdcall str_cat, obj_point.text,Data_String stdcall str_cat, obj_point.text,Data_String
loop @b 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 stdcall dword[tl_cur_next], tree3
dec edx dec edx
cmp edx,0 cmp edx,0
@ -207,12 +206,11 @@ prop_button:
cmp ah,3 cmp ah,3
jne @f jne @f
;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë ;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
push ebx push eax ebx
stdcall [tl_node_get_data],tree3 stdcall [tl_node_get_data],tree3
pop ebx cmp eax,0
cmp ebx,0
je .no_select_0 je .no_select_0
mov ebx,[ebx] mov ebx,[eax]
mov word[NumberSymbolsAD],8 mov word[NumberSymbolsAD],8
finit finit
fld dword[ebx] fld dword[ebx]
@ -231,16 +229,16 @@ prop_button:
stdcall [edit_box_draw], edit2 stdcall [edit_box_draw], edit2
stdcall [edit_box_draw], edit3 stdcall [edit_box_draw], edit3
.no_select_0: .no_select_0:
pop ebx pop ebx eax
jmp prop_still
@@: @@:
cmp ah,4 cmp ah,4
jne @f jne @f
push ebx ecx esi edi push eax ebx ecx edi esi
stdcall [tl_node_get_data],tree3 stdcall [tl_node_get_data],tree3
pop ebx cmp eax,0
cmp ebx,0
je .no_select_1 je .no_select_1
mov ebx,[ebx] mov ebx,[eax]
finit finit
mov esi,string1 mov esi,string1
@ -291,12 +289,13 @@ prop_button:
stdcall str_cat, obj_point.text,esi stdcall str_cat, obj_point.text,esi
stdcall str_cat, obj_point.text,Data_String stdcall str_cat, obj_point.text,Data_String
loop .coord 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 stdcall dword[tl_draw], tree3
mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì' mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥ mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
.no_select_1: .no_select_1:
pop edi esi ecx ebx pop esi edi ecx ebx eax
jmp prop_still
@@: @@:
cmp ah,1 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,\ 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,\ 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 .box_left dd box_l
.info_size dw info_size .box_top dd box_t
.info_max_count dd info_max_count .box_width dd box_w
.style dd style .box_height dd box_h
.data_nodes dd 0 .data_info dd 0
.data_img dd 0 .info_size dw info_size
.img_cx dw img_cx .info_max_count dd info_max_count
.img_cy dw img_cy .style dd style
.data_img_sys dd 0 .data_nodes dd 0
.ch_tim dd 0 .data_img dd 0
.ls_tim dd 0 .img_cx dw img_cx
.tim_undo dd 0 .img_cy dw img_cy
.cur_pos dd 0 .data_img_sys dd 0
.col_bkg dd col_bkg .ch_tim dd 0
.col_zag dd col_zag .tim_undo dd 0
.col_txt dd col_txt .cur_pos dd 0
.box_left dd box_l .col_bkg dd col_bkg
.box_top dd box_t .col_zag dd col_zag
.box_width dd box_w .col_txt dd col_txt
.box_height dd box_h .capt_cy dw capt_cy
.capt_cy dw capt_cy .info_capt_offs dw info_capt_offs
.info_capt_offs dw info_capt_offs .info_capt_len dw info_capt_len
.info_capt_len dw info_capt_len .el_focus dd el_focus
.el_focus dd el_focus .p_scroll dd p_scroll
.p_scrol dd p_scrol .on_press dd on_press
rb 4
.on_activate dd 0
.on_press dd on_press
} }
tl_data_info equ dword[edi] ;㪠§ â¥«ì ­  ®á­®¢­ë¥ ¤ ­ë¥ tl_box_left equ dword[edi]
tl_info_size equ word[edi +4] ;à §¬¥à ¤ ­­ëå ¢ë¤¥«ï¥¬ëå ¤«ï ª ¦¤®£® 㧫  (¯®«ì§®¢ â¥«ìá쪨¥ ¤ ­­ë¥ + ⥪áâ ¤«ï ¯®¤¯¨á¨) tl_box_top equ dword[edi+ 4]
tl_info_max_count equ dword[edi+6] ;¬ ªá¨¬ «ì­®¥ ª®«¨ç¥á⢮ 㧫®¢, ª®â®àë¥ ¬®¦­® ¤®¡ ¢¨âì ¢ í«¥¬¥­â tl_box_width equ dword[edi+ 8]
tl_style equ dword[edi+10] ;á⨫¨ í«¥¬¥­â  tl_box_height equ dword[edi+12]
tl_data_nodes equ dword[edi+14] ;㪠§ â¥«ì ­  áâàãªâãàë 㧫®¢ tl_data_info equ dword[edi+16] ;㪠§ â¥«ì ­  ®á­®¢­ë¥ ¤ ­ë¥
tl_data_img equ dword[edi+18] ;㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨ï á ¨ª®­ª ¬¨ 㧫®¢ tl_info_size equ word[edi+20] ;à §¬¥à ¤ ­­ëå ¢ë¤¥«ï¥¬ëå ¤«ï ª ¦¤®£® 㧫  (¯®«ì§®¢ â¥«ìá쪨¥ ¤ ­­ë¥ + ⥪áâ ¤«ï ¯®¤¯¨á¨)
tl_img_cx equ word[edi+22] ;è¨à¨­  ¨ª®­®ª tl_info_max_count equ dword[edi+22] ;¬ ªá¨¬ «ì­®¥ ª®«¨ç¥á⢮ 㧫®¢, ª®â®àë¥ ¬®¦­® ¤®¡ ¢¨âì ¢ í«¥¬¥­â
tl_img_cy equ word[edi+24] ;¢ëá®â  ¨ª®­®ª tl_style equ dword[edi+26] ;á⨫¨ í«¥¬¥­â 
tl_data_img_sys equ dword[edi+26] ;㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨§®¡à ¦¥­¨ï (áâ५ª¨, ¯«îᨪ¨) tl_data_nodes equ dword[edi+30] ;㪠§ â¥«ì ­  áâàãªâãàë 㧫®¢
tl_ch_tim equ dword[edi+30] ;ª®«¨ç¥á⢮ ¨§¬¥­¥­¨© ¢ ä ©«¥ tl_data_img equ dword[edi+34] ;㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨ï á ¨ª®­ª ¬¨ 㧫®¢
tl_tim_undo equ dword[edi+38] ;ª®«¨ç¥á⢮ ®â¬¥­¥­­ëå ¤¥©á⢨© tl_img_cx equ word[edi+38] ;è¨à¨­  ¨ª®­®ª
tl_cur_pos equ dword[edi+42] ;¯®§¨æ¨ï ªãàá®à  tl_img_cy equ word[edi+40] ;¢ëá®â  ¨ª®­®ª
tl_col_bkg equ dword[edi+46] ;梥â ä®­  tl_data_img_sys equ dword[edi+42] ;㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨§®¡à ¦¥­¨ï (áâ५ª¨, ¯«îᨪ¨)
tl_col_zag equ dword[edi+50] ;梥⠧ £®«®¢ª  tl_ch_tim equ dword[edi+46] ;ª®«¨ç¥á⢮ ¨§¬¥­¥­¨© ¢ ä ©«¥
tl_col_txt equ dword[edi+54] ;梥â ⥪áâ  tl_tim_undo equ dword[edi+50] ;ª®«¨ç¥á⢮ ®â¬¥­¥­­ëå ¤¥©á⢨©
tl_box_left equ dword[edi+58] tl_cur_pos equ dword[edi+54] ;¯®§¨æ¨ï ªãàá®à 
tl_box_top equ dword[edi+62] tl_col_bkg equ dword[edi+58] ;梥â ä®­ 
tl_box_width equ dword[edi+66] tl_col_zag equ dword[edi+62] ;梥⠧ £®«®¢ª 
tl_box_height equ dword[edi+70] tl_col_txt equ dword[edi+66] ;梥â ⥪áâ 
tl_capt_cy equ word[edi+74] ;¢ëá®â  ¯®¤¯¨á¨ tl_capt_cy equ word[edi+70] ;¢ëá®â  ¯®¤¯¨á¨
tl_info_capt_offs equ word[edi+76] ;ᤢ¨£ ¤«ï ­ ç «  ⥪áâ  (¯®¤¯¨á¨ 㧫 ) tl_info_capt_offs equ word[edi+72] ;ᤢ¨£ ¤«ï ­ ç «  ⥪áâ  (¯®¤¯¨á¨ 㧫 )
tl_info_capt_len equ word[edi+78] ;¤«¨­­  ⥪áâ  ¯®¤¯¨á¨ 㧫  (¥á«¨ = 0 â® ¤® ª®­æ  áâàãªâãàë) tl_info_capt_len equ word[edi+74] ;¤«¨­­  ⥪áâ  ¯®¤¯¨á¨ 㧫  (¥á«¨ = 0 â® ¤® ª®­æ  áâàãªâãàë)
tl_el_focus equ dword[edi+80] ;㪠§ â¥«ì ­  áâàãªâãàã í«¥¬¥­â  ¢ 䮪ãᥠtl_el_focus equ dword[edi+76] ;㪠§ â¥«ì ­  áâàãªâãàã í«¥¬¥­â  ¢ 䮪ãá¥
tl_p_scrol equ dword[edi+84] ;㪠§ â¥«ì ­  áâàãªâãàã áªà®««¨­£  tl_p_scroll equ dword[edi+80] ;㪠§ â¥«ì ­  áâàãªâãàã áªà®««¨­£ 
tl_on_press equ dword[edi+96] ;㪠§ â¥«ì ­  äã­ªæ¨î, ª®â®à ï ¢ë§ë¢ ¥âáï ¯à¨ ­ ¦ â¨¨ Enter tl_on_press equ dword[edi+84] ;㪠§ â¥«ì ­  äã­ªæ¨î, ª®â®à ï ¢ë§ë¢ ¥âáï ¯à¨ ­ ¦ â¨¨ Enter
;data_info dd ? ;+ 0 㪠§ â¥«ì ­  ®á­®¢­ë¥ ¤ ­ë¥
;ls_tim dd ? ;+34 ¢à¥¬ï ¯®á«¥¤­¥£® á®åà ­¥­¨ï
;on_activate dd ? ;+92 㪠§ â¥«ì ­  äã­ªæ¨î ¯à¨  ªâ¨¢¨à®¢ ­¨¨ 㧫 
;ª®­áâ ­âë á⨫ï ;ª®­áâ ­âë á⨫ï
tl_key_no_edit equ 1b ;í«¥¬¥­â ­¥«ì§ï । ªâ¨à®¢ âì ­  ª« ¢¨ âãॠ(¨§¬¥­ïâì ã஢­¨, 㤠«ïâì) tl_key_no_edit equ 1b ;í«¥¬¥­â ­¥«ì§ï । ªâ¨à®¢ âì ­  ª« ¢¨ âãॠ(¨§¬¥­ïâì ã஢­¨, 㤠«ïâì)
@ -355,7 +348,7 @@ tl_err_load_caption equ 1b ;
tl_err_load_info_size equ 100b ;­¥ ᮢ¯ ¤ ¥â à §¬¥à ¨­ä®à¬ æ¨®­­®© áâàãªâãàë ¯à¨ ®âªàë⨨ tl_err_load_info_size equ 100b ;­¥ ᮢ¯ ¤ ¥â à §¬¥à ¨­ä®à¬ æ¨®­­®© áâàãªâãàë ¯à¨ ®âªàë⨨
tl_load_mode_add equ 0x20000 ;®¯æ¨ï áç¨â뢠­¨ï ¢ ०¨¬¥ ¤®¡ ¢«¥­¨ï ¨­ä®à¬ æ¨¨ tl_load_mode_add equ 0x20000 ;®¯æ¨ï áç¨â뢠­¨ï ¢ ०¨¬¥ ¤®¡ ¢«¥­¨ï ¨­ä®à¬ æ¨¨
tl_save_load_heder_size equ 26 ;à §¬¥à § £®«®¢ª  ¤«ï § ¯¨á¨/ç⥭¨ï í«¥¬¥­â®¢ 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 ; ;Basic macros for use TextEditor ;

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -55,29 +55,21 @@ align 4
start: start:
load_libraries l_libs_start,load_lib_end load_libraries l_libs_start,load_lib_end
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡  ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
mov ebp,lib0 cmp dword [lib0+ll_struc_size-4],0
cmp dword [ebp+ll_struc_size-4],0 jnz @f
jz @f cmp dword [lib1+ll_struc_size-4],0
mcall -1 ;exit not correct jnz @f
@@: cmp dword [lib2+ll_struc_size-4],0
mov ebp,lib1 jnz @f
cmp dword [ebp+ll_struc_size-4],0 cmp dword [lib3+ll_struc_size-4],0
jz @f jnz @f
mcall -1 ;exit not correct jmp .lib
@@: @@:
mov ebp,lib2 mcall -1 ;exit not correct
cmp dword [ebp+ll_struc_size-4],0 .lib:
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
@@:
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 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] stdcall [str_len],dword[edit1.text],dword[edit1.max]
mov dword[edit1.size],eax 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 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 cmp byte[txt_tile_type_0],0
je @f 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 jmp @b
@@: @@:
mov byte[ini_ext.number],'0' ;áç¨â뢠¥¬ ¯ à ¬¥âà ®â ext0 ª®â®àë© ¡ã¤¥â ¢ë¡à ­ ¢ ᯨ᪥ mov byte[ini_ext.number],'0' ;áç¨â뢠¥¬ ¯ à ¬¥âà ®â ext0 ª®â®àë© ¡ã¤¥â ¢ë¡à ­ ¢ ᯨ᪥
@ -102,7 +94,7 @@ start:
jne @f jne @f
mov dword[txt_tile_type_0],'.bmp' ;¥á«¨ ¢ *.ini ä ©«¥ ­¨ç¥£® ­¥â ¤®¡ ¢«ï¥¬ à áè¨à¥­¨¥ .bmp 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 ; init bmp file
stdcall mem.Alloc, dword RGB_TILE_SIZE+300 ;300 - § ¯ á­ë¥ ¡ ©âë á ãç¥â®¬ § £®«®¢ª  bmp ä ©«  stdcall mem.Alloc, dword RGB_TILE_SIZE+300 ;300 - § ¯ á­ë¥ ¡ ©âë á ãç¥â®¬ § £®«®¢ª  bmp ä ©« 
@ -117,8 +109,7 @@ start:
stdcall mem.Alloc, dword TREE_ICON_NOD16_BMP_SIZE stdcall mem.Alloc, dword TREE_ICON_NOD16_BMP_SIZE
mov [tree_nod_icon],eax mov [tree_nod_icon],eax
copy_path fn_icon1,sys_path,file_name,0x0 copy_path fn_icon1,sys_path,file_name,0
mov eax,70 ;load icon file
mov [run_file_70.Function], 0 mov [run_file_70.Function], 0
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
@ -126,8 +117,7 @@ start:
m2m [run_file_70.Buffer], [tree_sys_icon] m2m [run_file_70.Buffer], [tree_sys_icon]
mov byte[run_file_70+20], 0 mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name mov [run_file_70.FileName], file_name
mov ebx,run_file_70 mcall 70,run_file_70
int 0x40
cmp ebx,0xffffffff cmp ebx,0xffffffff
je @f je @f
stdcall dword[img_decode], dword[tree_sys_icon],ebx,0 stdcall dword[img_decode], dword[tree_sys_icon],ebx,0
@ -140,12 +130,10 @@ start:
@@: @@:
copy_path fn_icon2,sys_path,file_name,0x0 copy_path fn_icon2,sys_path,file_name,0
mov eax,70 ;load icon file
mov [run_file_70.Count], TREE_ICON_NOD16_BMP_SIZE mov [run_file_70.Count], TREE_ICON_NOD16_BMP_SIZE
m2m [run_file_70.Buffer], [tree_nod_icon] m2m [run_file_70.Buffer], [tree_nod_icon]
mov ebx,run_file_70 mcall 70,run_file_70
int 0x40
cmp ebx,0xffffffff cmp ebx,0xffffffff
je @f je @f
stdcall dword[img_decode], dword[tree_nod_icon],ebx,0 stdcall dword[img_decode], dword[tree_nod_icon],ebx,0
@ -172,58 +160,51 @@ start:
align 4 align 4
red_win: red_win:
call draw_window call draw_window
call but_MetLoad call but_MetLoad
call but_Refresh ; Auto Refresh after program start call but_Refresh ; Auto Refresh after program start
align 4 align 4
still: still:
mov eax,10 mcall 10
mcall
cmp al,0x1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­  cmp al,0x1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
jz red_win jz red_win
cmp al,0x2 cmp al,0x2
jz key jz key
cmp al,0x3 cmp al,0x3
jz button jz button
push dword ch2 stdcall [check_box_mouse],ch2
call [check_box_mouse] stdcall [check_box_mouse],ch1
push dword ch1 stdcall [edit_box_mouse], edit1
call [check_box_mouse] stdcall [edit_box_mouse], edit2
stdcall [tl_mouse], tree1
stdcall [tl_mouse], tree2
stdcall [edit_box_mouse], edit1 jmp still
stdcall [edit_box_mouse], edit2
stdcall [tl_mouse], tree1
stdcall [tl_mouse], tree2
jmp still
align 4 align 4
key: key:
push eax ebx push eax ebx
mcall 2 mcall 2
stdcall [edit_box_key], edit1 stdcall [edit_box_key], edit1
stdcall [edit_box_key], edit2 stdcall [edit_box_key], edit2
push dword tree1 stdcall [tl_key],tree1
call [tl_key] stdcall [tl_key],tree2
push dword tree2
call [tl_key]
mov ebx,dword[el_focus] ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ®ª­  treelist ¢ 䮪ãᥠmov ebx,dword[el_focus] ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ®ª­  treelist ¢ 䮪ãá¥
cmp ebx, dword tree1 cmp ebx, dword tree1
je .end_f je .end_f
cmp ebx, dword tree2 cmp ebx, dword tree2
je .end_f je .end_f
;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ⥪áâ®¢ë¥ ¯®«ï ¢ 䮪ãᥠ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ⥪áâ®¢ë¥ ¯®«ï ¢ 䮪ãá¥
test word[edit1.flags],10b ;ed_focus test word[edit1.flags],10b ;ed_focus
jne .end_f jne .end_f
test word[edit2.flags],10b ;ed_focus test word[edit2.flags],10b ;ed_focus
jne .end_f jne .end_f
cmp ah,179 ;Right cmp ah,179 ;Right
jne @f jne @f
@ -261,9 +242,9 @@ key:
call but_ZoomP call but_ZoomP
@@: @@:
.end_f: .end_f:
pop ebx eax pop ebx eax
jmp still jmp still
align 4 align 4
@ -272,12 +253,10 @@ pushad
mcall 12,1 mcall 12,1
xor eax,eax xor eax,eax
mov ebx,20*65536+min_window_w
mov ecx,20*65536+min_window_h
mov edx,[sc.work] mov edx,[sc.work]
or edx,0x33000000 or edx,0x33000000
mov edi,hed mov edi,hed
mcall mcall ,20*65536+min_window_w,20*65536+min_window_h
mcall 9,procinfo,-1 mcall 9,procinfo,-1
@ -293,7 +272,7 @@ pushad
mov eax,dword[tree2.box_left] ;¤¢¨£ ¥¬ áªà®««¨­£ mov eax,dword[tree2.box_left] ;¤¢¨£ ¥¬ áªà®««¨­£
add eax,dword[tree2.box_width] add eax,dword[tree2.box_width]
mov ebx,dword[tree2.p_scrol] mov ebx,dword[tree2.p_scroll]
mov word[ebx+2],ax mov word[ebx+2],ax
mov dword[edit2.left],edi mov dword[edit2.left],edi
@ -304,17 +283,10 @@ pushad
mov dword[wScrMetki.all_redraw],1 mov dword[wScrMetki.all_redraw],1
stdcall [scrollbar_ver_draw], dword wScrMetki 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] mov esi,[sc.work_button]
int 0x40 mcall 8,145*65536+20,5*65536+25,6 ;ª­®¯ª 
mov ebx,100*65536+20 mcall ,100*65536+20,5*65536+25,5
mov ecx,5*65536+25
mov edx,5
int 0x40
mov ebx,170*65536+40 ;ª­®¯ª  ¢ë§®¢  ¤¨ «®£  OpenDial mov ebx,170*65536+40 ;ª­®¯ª  ¢ë§®¢  ¤¨ «®£  OpenDial
;mov ecx,5*65536+25 ;mov ecx,5*65536+25
@ -490,75 +462,81 @@ lib4_name db 'proc_lib.obj',0
;library structures ;library structures
l_libs_start: l_libs_start:
lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, boxlib_import,err_message_import0, head_f_i lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, boxlib_import,err_message_import0, head_f_i
lib1 l_libs lib1_name, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, libimg_import, err_message_import1, head_f_i lib1 l_libs lib1_name, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, libimg_import, err_message_import1, head_f_i
lib2 l_libs lib2_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l, strlib_import, err_message_import2, head_f_i lib2 l_libs lib2_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l, strlib_import, err_message_import2, head_f_i
lib3 l_libs lib3_name, sys_path, file_name, system_dir3, err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i lib3 l_libs lib3_name, sys_path, file_name, system_dir3, err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
lib4 l_libs lib4_name, sys_path, file_name, system_dir4, err_message_found_lib4, head_f_l, proclib_import, err_message_import4, head_f_i lib4 l_libs lib4_name, sys_path, file_name, system_dir4, err_message_found_lib4, head_f_l, proclib_import, err_message_import4, head_f_i
load_lib_end: load_lib_end:
align 4 align 4
button: button:
mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨ mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
cmp ah,5 cmp ah,5
jne @f jne @f
call but_ZoomM call but_ZoomM
@@: jmp still
cmp ah,6 @@:
jne @f cmp ah,6
call but_ZoomP jne @f
@@: call but_ZoomP
cmp ah,7 jmp still
jne @f @@:
call but_Refresh cmp ah,7
@@: jne @f
call but_Refresh
jmp still
@@:
cmp ah,9 cmp ah,9
jz but_MetSave jz but_MetSave
cmp ah,8 cmp ah,8
jz but_MetAdd jz but_MetAdd
cmp ah,10 cmp ah,10
jne @f jne @f
call but_met_up call but_met_up
@@: jmp still
cmp ah,11 @@:
jne @f cmp ah,11
call but_met_dn jne @f
@@: call but_met_dn
cmp ah,12 jmp still
jne @f @@:
call fun_goto_met cmp ah,12
@@: jne @f
cmp ah,13 ;¤¨ «®£ OpenDialog ¤«ï ¯®¨áª  ¯ ¯ª¨ call fun_goto_met
jne @f jmp still
call fun_opn_dlg @@:
@@: cmp ah,13 ;¤¨ «®£ OpenDialog ¤«ï ¯®¨áª  ¯ ¯ª¨
cmp ah,1 jne @f
jne still call fun_opn_dlg
jmp still
@@:
cmp ah,1
jne still
.exit: .exit:
push dword[bmp_icon] push dword[bmp_icon]
call mem.Free call mem.Free
stdcall array_tile_function, tile_00,max_tiles_count,tile_destroy stdcall array_tile_function, tile_00,max_tiles_count,tile_destroy
stdcall dword[tl_data_clear], tree1 stdcall dword[tl_data_clear], tree1
mov dword[tree2.data_img_sys],0 ;ç¨á⨬ 㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨ª®­ª¨, mov dword[tree2.data_img_sys],0 ;ç¨á⨬ 㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨ª®­ª¨,
;â. ª. ®­¨ ¡ë«¨ 㤠«¥­ë ¢¥àå­¥© ä㭪樥© tl_data_clear ;â. ª. ®­¨ ¡ë«¨ 㤠«¥­ë ¢¥àå­¥© ä㭪樥© tl_data_clear
;¯®¢â®à­ë© ¢ë§®¢ tl_data_clear ¡¥§ ç¨á⪨ 㪠§ â¥«ï ¢ë§¢¥â ®è¨¡ªã ;¯®¢â®à­ë© ¢ë§®¢ tl_data_clear ¡¥§ ç¨á⪨ 㪠§ â¥«ï ¢ë§¢¥â ®è¨¡ªã
mov dword[tree2.data_img],0 ;ç¨á⨬ 㪠§ â¥«ì ­  ¨ª®­ª¨ 㧫®¢ mov dword[tree2.data_img],0 ;ç¨á⨬ 㪠§ â¥«ì ­  ¨ª®­ª¨ 㧫®¢
stdcall dword[tl_data_clear], tree2 stdcall dword[tl_data_clear], tree2
; stdcall dword[img_destroy], dword[data_icon] ; stdcall dword[img_destroy], dword[data_icon]
mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
;input: ;input:
;data_rgb - pointer to rgb data ;data_rgb - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) ) ;size - count img pixels (size img data / 3(rgb) )
align 4 align 4
proc img_rgb_wdiv2 data_rgb:dword, size:dword proc img_rgb_wdiv2 uses eax ebx ecx edx, data_rgb:dword, size:dword
push eax ebx ecx edx
mov eax,dword[data_rgb] mov eax,dword[data_rgb]
mov ecx,dword[size] ;ecx = size mov ecx,dword[size] ;ecx = size
imul ecx,3 imul ecx,3
@ -596,8 +574,6 @@ proc img_rgb_wdiv2 data_rgb:dword, size:dword
add eax,3 add eax,3
add ebx,6 add ebx,6
loop @b loop @b
pop edx ecx ebx eax
ret ret
endp endp
@ -676,29 +652,27 @@ endp
;data_rgb - pointer to rgb data ;data_rgb - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) ) ;size - count img pixels (size img data / 3(rgb) )
align 4 align 4
proc img_rgb_wmul2, data_rgb:dword, size:dword proc img_rgb_wmul2 uses eax ebx ecx edx, data_rgb:dword, size:dword
push eax ebx ecx edx ;eax - source
;eax - source ;ebx - destination
;ebx - destination mov ecx,dword[size] ;ecx = size
mov ecx,dword[size] ;ecx = size mov eax,ecx
mov eax,ecx dec eax
dec eax lea eax,[eax+eax*2] ;eax = (size-1)*3
lea eax,[eax+eax*2] ;eax = (size-1)*3 mov ebx,eax ;ebx = size*3
mov ebx,eax ;ebx = size*3 add eax,dword[data_rgb] ;eax = pointer + size*3
add eax,dword[data_rgb] ;eax = pointer + size*3 add ebx,eax ;ebx = pointer + 2*size*3
add ebx,eax ;ebx = pointer + 2*size*3 @@:
@@: mov edx,dword[eax] ;edx = pixel color
mov edx,dword[eax] ;edx = pixel color mov word[ebx],dx
mov word[ebx],dx mov word[ebx+3],dx
mov word[ebx+3],dx shr edx,16
shr edx,16 mov byte[ebx+2],dl
mov byte[ebx+2],dl mov byte[ebx+3+2],dl
mov byte[ebx+3+2],dl sub eax,3
sub eax,3 sub ebx,6
sub ebx,6 loop @b
loop @b ret
pop edx ecx ebx eax
ret
endp endp
;äã­ªæ¨ï ¤«ï à áâ¢ ­¨ï ¨§®¡à ¦¥­¨ï ¯® ¢ëá®â¥ ¢ 2 à §  ;äã­ªæ¨ï ¤«ï à áâ¢ ­¨ï ¨§®¡à ¦¥­¨ï ¯® ¢ëá®â¥ ¢ 2 à § 
@ -754,33 +728,30 @@ endp
;size - count img pixels (size img data / 3(rgb) ) ;size - count img pixels (size img data / 3(rgb) )
;size_w - width img in pixels ;size_w - width img in pixels
align 4 align 4
proc img_rgb_hoffs, data_rgb:dword, size:dword, size_w:dword, hoffs:dword proc img_rgb_hoffs uses eax ebx ecx edx esi, data_rgb:dword, size:dword, size_w:dword, hoffs:dword
push eax ebx ecx edx esi mov esi,dword[size_w]
lea esi,[esi+esi*2] ;esi = width * 3(rgb)
imul esi,dword[hoffs]
mov esi,dword[size_w] mov eax,dword[size]
lea esi,[esi+esi*2] ;esi = width * 3(rgb) lea eax,[eax+eax*2]
imul esi,dword[hoffs] add eax,dword[data_rgb] ;eax = pointer to end pixel + 1
sub eax,3
mov ebx,eax
add ebx,esi
mov eax,dword[size] mov ecx,dword[size]
lea eax,[eax+eax*2] dec ecx
add eax,dword[data_rgb] ;eax = pointer to end pixel + 1 @@:
sub eax,3 mov edx,dword[eax] ;edx = pixel color
mov ebx,eax mov word[ebx],dx
add ebx,esi shr edx,16
mov byte[ebx+2],dl
mov ecx,dword[size] sub eax,3
dec ecx sub ebx,3
@@: loop @b
mov edx,dword[eax] ;edx = pixel color ret
mov word[ebx],dx
shr edx,16
mov byte[ebx+2],dl
sub eax,3
sub ebx,3
loop @b
pop esi edx ecx ebx eax
ret
endp endp
@ -824,27 +795,23 @@ proc img_rgb_wcrop, data_rgb:dword, size_w_old:dword, size_w_new:dword, size_h:d
endp endp
align 4 align 4
proc mem_copy, source:dword, destination:dword, len:dword proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
push ecx esi edi cld
cld mov esi, dword[source]
mov esi, dword[source] mov edi, dword[destination]
mov edi, dword[destination] mov ecx, dword[len]
mov ecx, dword[len] rep movsb
rep movsb ret
pop edi esi ecx
ret
endp endp
align 4 align 4
proc mem_clear, mem:dword, len:dword proc mem_clear uses eax ecx edi, mem:dword, len:dword
push eax ecx edi cld
cld xor al,al
xor al,al mov edi, dword[mem]
mov edi, dword[mem] mov ecx, dword[len]
mov ecx, dword[len] repne stosb
repne stosb ret
pop edi ecx eax
ret
endp endp
align 4 align 4
@ -897,38 +864,7 @@ tree2 tree_list 32,300, tl_draw_par_line, 16,16,\
el_focus, wScrMetki,fun_goto_met el_focus, wScrMetki,fun_goto_met
align 4 align 4
wScrMetki: wScrMetki scrollbar 16,0, 100,0, 15, 100, 30,0, 0xeeeeee, 0xbbddff, 0, 1
.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
ed_buffer: ;òåêñò äëÿ edit ed_buffer: ;òåêñò äëÿ edit
.2: rb 32 .2: rb 32
@ -997,46 +933,52 @@ map: ;
align 4 align 4
tile_00 rb size_tile_struc * max_tiles_count tile_00 rb size_tile_struc * max_tiles_count
;íâ®â ª®¤ ­¥ ¬®©, ®­ ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã
;input: ;input:
; eax = value ; eax - ç¨á«®
; edi = string buffer ; edi - ¡ãä¥à ¤«ï áâப¨
; len - ¤«¨­­  ¡ãä¥à 
;output: ;output:
; edi =
align 4 align 4
tl_convert_to_str: proc convert_int_to_str, len:dword
pushad pushad
mov dword[edi+1],0;0x20202020 mov esi,[len]
call .str add esi,edi
popad dec esi
ret call .str
popad
ret
endp
align 4 align 4
.str: .str:
mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«® mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®©
cmp eax,ecx ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax cmp eax,ecx ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
jb @f jb @f
xor edx,edx ;®ç¨áâ¨âì edx xor edx,edx ;®ç¨áâ¨âì edx
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
push edx ;¯®«®¦¨âì ¢ á⥪ push edx ;¯®«®¦¨âì ¢ á⥪
;dec edi ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨ ;dec edi ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
pop eax pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï)) @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ cmp edi,esi
stosb ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi jge @f
ret ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥
stosb ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
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 ;á¨á⥬­ë¥ æ¢¥â  sc system_colors ;á¨á⥬­ë¥ 梥â 
mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox
align 16
i_end: i_end:
rb 1024
align 16
procinfo process_information procinfo process_information
rb 1024
stacktop: stacktop:
sys_path rb 4096 sys_path rb 4096
file_name: file_name:

View File

@ -63,9 +63,9 @@ tile_delta_y equ byte[edi+31] ;ᤢ
; load_new_tile (¢¥àå­ïï ª à⨭ª ) ; load_new_tile (¢¥àå­ïï ª à⨭ª )
;??? ;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢¯à ¢®
align 4 align 4
CursorMoveRight: ;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢¯à ¢® CursorMoveRight:
push ebx ecx push ebx ecx
xor ebx,ebx xor ebx,ebx
xor ecx,ecx xor ecx,ecx
@ -87,9 +87,9 @@ CursorMoveRight: ;
pop ecx ebx pop ecx ebx
ret ret
;??? ;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢­¨§
align 4 align 4
CursorMoveDown: ;¯¥à¥¤¢¨£ ¥¬ ª®®à¤¨­ âã ªãàá®à  ¢­¨§ CursorMoveDown:
push ebx ecx push ebx ecx
xor ebx,ebx xor ebx,ebx
xor ecx,ecx xor ecx,ecx
@ -111,24 +111,23 @@ CursorMoveDown: ;
pop ecx ebx pop ecx ebx
ret ret
;??? ;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢¢¥àå, ¯® ᯨáªã
align 4 align 4
but_met_up: ;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢¢¥àå, ¯® ᯨáªã but_met_up:
stdcall dword[tl_node_move_up], tree2 stdcall dword[tl_node_move_up], tree2
ret ret
;??? ;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢­¨§, ¯® ᯨáªã?
align 4 align 4
but_met_dn: ;¯¥à¥¬¥é¥­¨¥ ¬¥âª¨ ¢­¨§, ¯® ᯨáªã but_met_dn:
stdcall dword[tl_node_move_down], tree2 stdcall dword[tl_node_move_down], tree2
ret ret
;??? ;¬¥­ï¥¬ à áè¨à¥­¨¥ ¤«ï ª àâë
align 4 align 4
fun_new_map_type: ;¬¥­ï¥¬ à áè¨à¥­¨¥ ¤«ï ª àâë fun_new_map_type:
push eax push eax
stdcall dword[tl_node_get_data], tree1 stdcall dword[tl_node_get_data], tree1
pop eax
cmp eax,0 cmp eax,0
je @f je @f
mov dword[txt_tile_type],eax mov dword[txt_tile_type],eax
@ -138,8 +137,7 @@ fun_new_map_type: ;
;§ ¤ ¥¬ à á¯®«®¦¥­¨¥ â ©«®¢ ¯® á¥âª¥ ;§ ¤ ¥¬ à á¯®«®¦¥­¨¥ â ©«®¢ ¯® á¥âª¥
align 4 align 4
proc tiles_init_grid, beg_tiles:dword, count:dword, cols:dword proc tiles_init_grid uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, cols:dword
push eax ebx ecx edx edi
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx
mov edi,[beg_tiles] mov edi,[beg_tiles]
@ -156,7 +154,6 @@ proc tiles_init_grid, beg_tiles:dword, count:dword, cols:dword
inc bx inc bx
.old_lin: .old_lin:
loop @b loop @b
pop edi edx ecx ebx eax
ret ret
endp endp
@ -165,8 +162,7 @@ endp
;â ©«ë ¢ ¯à®â¨¢®¯®«®¦­ãî áâ®à®­ã, ¢ १ã«ìâ â¥ ª®®à¤¨­ âë ¡®«ì設á⢠ â ©«®¢ ­¥ ¬¥­ïîâáï ;â ©«ë ¢ ¯à®â¨¢®¯®«®¦­ãî áâ®à®­ã, ¢ १ã«ìâ â¥ ª®®à¤¨­ âë ¡®«ì設á⢠ â ©«®¢ ­¥ ¬¥­ïîâáï
;  §­ ç¨â ¯à®£à ¬¬  ­¥ ¡ã¤¥â ¯¥à¥ç¨â뢠âì ¨å § ­®¢®, 祬 ¨ ¤®á⨣ ¥âáï ®¯â¨¬¨§ æ¨ï ;  §­ ç¨â ¯à®£à ¬¬  ­¥ ¡ã¤¥â ¯¥à¥ç¨â뢠âì ¨å § ­®¢®, 祬 ¨ ¤®á⨣ ¥âáï ®¯â¨¬¨§ æ¨ï
align 4 align 4
proc tiles_grid_move_left, beg_tiles:dword, count:dword, cols:dword proc tiles_grid_move_left uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, cols:dword
push eax ebx ecx edx edi
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx
mov edi,[beg_tiles] mov edi,[beg_tiles]
@ -180,15 +176,13 @@ proc tiles_grid_move_left, beg_tiles:dword, count:dword, cols:dword
dec tile_delta_x dec tile_delta_x
add edi,size_tile_struc add edi,size_tile_struc
loop @b loop @b
pop edi edx ecx ebx eax
ret ret
endp endp
;ᤢ¨£ ¥¬ á¥âªã ¢¯à ¢®, ¢ë«¥§è¨¥ á⮫¡æë ¡ã¤ãâ ¯¥à¥ª¨­ãâë ­  «¥¢ãî áâ®à®­ã ;ᤢ¨£ ¥¬ á¥âªã ¢¯à ¢®, ¢ë«¥§è¨¥ á⮫¡æë ¡ã¤ãâ ¯¥à¥ª¨­ãâë ­  «¥¢ãî áâ®à®­ã
;¤¥« ¥â ⮦¥ çâ® ¨ tiles_grid_move_left ⮫쪮 ¤¢¨£ ¥â ª®®à¤¨­ âë ¢ ¤àã£ãî áâ®à®­ã ;¤¥« ¥â ⮦¥ çâ® ¨ tiles_grid_move_left ⮫쪮 ¤¢¨£ ¥â ª®®à¤¨­ âë ¢ ¤àã£ãî áâ®à®­ã
align 4 align 4
proc tiles_grid_move_right, beg_tiles:dword, count:dword, cols:dword proc tiles_grid_move_right uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, cols:dword
push eax ebx ecx edx edi
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx
mov edi,[beg_tiles] mov edi,[beg_tiles]
@ -202,13 +196,11 @@ proc tiles_grid_move_right, beg_tiles:dword, count:dword, cols:dword
.no_jump: .no_jump:
add edi,size_tile_struc add edi,size_tile_struc
loop @b loop @b
pop edi edx ecx ebx eax
ret ret
endp endp
align 4 align 4
proc tiles_grid_move_up, beg_tiles:dword, count:dword, rows:dword proc tiles_grid_move_up uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, rows:dword
push eax ebx ecx edx edi
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx
mov edi,[beg_tiles] mov edi,[beg_tiles]
@ -222,13 +214,11 @@ proc tiles_grid_move_up, beg_tiles:dword, count:dword, rows:dword
dec tile_delta_y dec tile_delta_y
add edi,size_tile_struc add edi,size_tile_struc
loop @b loop @b
pop edi edx ecx ebx eax
ret ret
endp endp
align 4 align 4
proc tiles_grid_move_down, beg_tiles:dword, count:dword, rows:dword proc tiles_grid_move_down uses eax ebx ecx edx edi, beg_tiles:dword, count:dword, rows:dword
push eax ebx ecx edx edi
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx
mov edi,[beg_tiles] mov edi,[beg_tiles]
@ -242,35 +232,28 @@ proc tiles_grid_move_down, beg_tiles:dword, count:dword, rows:dword
.no_jump: .no_jump:
add edi,size_tile_struc add edi,size_tile_struc
loop @b loop @b
pop edi edx ecx ebx eax
ret ret
endp endp
align 4 align 4
proc array_tile_function, beg_tiles:dword, count:dword, funct:dword proc array_tile_function uses ecx edi, beg_tiles:dword, count:dword, funct:dword
push ecx edi
mov edi,[beg_tiles] mov edi,[beg_tiles]
mov ecx,[count] mov ecx,[count]
@@: @@:
stdcall [funct],edi stdcall [funct],edi
add edi,size_tile_struc add edi,size_tile_struc
loop @b loop @b
pop edi ecx
ret ret
endp endp
align 4 align 4
draw_tiles: draw_tiles:
pushad pushad
mov eax,47 movzx ecx,byte[map.zoom]
mov ebx,0x20000
xor ecx,ecx
mov cl,byte[map.zoom]
mov edx,128*65536+13
mov esi,[sc.work_text] mov esi,[sc.work_text]
or esi,0x40000000 or esi,0x40000000
mov edi,[sc.work] mov edi,[sc.work]
int 0x40 mcall 47,0x20000,, (128 shl 16)+13
stdcall array_tile_function, tile_00,max_tiles_count,draw_tile stdcall array_tile_function, tile_00,max_tiles_count,draw_tile
popad popad
@ -466,65 +449,57 @@ but_ZoomM:
@@: @@:
ret ret
;??? ;á®åà ­¥­¨¥ ä ©«  á ¬¥âª ¬¨
align 4 align 4
but_MetSave: ;á®åà ­¥­¨¥ ä ©«  á ¬¥âª ¬¨ but_MetSave:
stdcall dword[tl_save_mem], TREE_ICON_SYS16_BMP_SIZE,[bmp_icon],0,tree2 stdcall dword[tl_save_mem], tree2,0,[bmp_icon],TREE_ICON_SYS16_BMP_SIZE
push eax ebx ecx edi copy_path fn_metki,sys_path,file_name,0
copy_path fn_metki,sys_path,file_name,0x0 push eax ebx ecx edi
stdcall dword[tl_get_mem_size], tree2,[bmp_icon]
inc eax ;¤«ï § ¯¨á¨ ¢ ä ©« § ¢¥àè î饣® ­ã«ï
stdcall dword[tl_get_mem_size], [bmp_icon],tree2 m2m [run_file_70.Buffer], [bmp_icon]
pop ecx mov [run_file_70.Function], 2
inc ecx ;¤«ï § ¯¨á¨ ¢ ä ©« § ¢¥àè î饣® ­ã«ï mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov [run_file_70.Count], eax
mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mcall 70,run_file_70
pop edi ecx ebx eax
jmp still
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 byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name
mov ebx,run_file_70
int 0x40
pop edi ecx ebx eax
jmp still
;???
align 4 align 4
but_MetLoad: ;áç¨â뢠¥¬ ä ©« á ¬¥âª ¬¨ but_MetLoad:
cmp byte[met_fr_opn],0 cmp byte[met_fr_opn],0
jne .end_f jne .end_f
pushad copy_path fn_metki,sys_path,file_name,0
mov byte[met_fr_opn],1 pushad
copy_path fn_metki,sys_path,file_name,0x0 mov byte[met_fr_opn],1
mov eax,70 ;load icon file mov [run_file_70.Function], 0
mov [run_file_70.Function], 0 mov [run_file_70.Position], 0
mov [run_file_70.Position], 0 mov [run_file_70.Flags], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Count], TREE_ICON_SYS16_BMP_SIZE
mov [run_file_70.Count], TREE_ICON_SYS16_BMP_SIZE mov byte[run_file_70+20], 0
mov byte[run_file_70+20], 0 mov [run_file_70.FileName], file_name
mov [run_file_70.FileName], file_name m2m [run_file_70.Buffer], [bmp_icon]
m2m [run_file_70.Buffer], [bmp_icon] mcall 70,run_file_70
mov eax,70 cmp ebx,0xffffffff
mov ebx,run_file_70 je @f
int 0x40 stdcall [tl_load_mem], tree2,0,[bmp_icon],TREE_ICON_SYS16_BMP_SIZE
cmp ebx,0xffffffff stdcall [tl_cur_beg], tree2
je @f stdcall [tl_draw], tree2
stdcall [tl_load_mem], TREE_ICON_SYS16_BMP_SIZE,dword[bmp_icon],0,tree2 @@:
stdcall [tl_cur_beg], tree2 ;? mov byte[file_name],0 ;clear file name
stdcall [tl_draw], tree2 ;? popad
pop eax .end_f:
@@: ret
mov byte[file_name],0 ;clear file name
popad
.end_f:
ret
;??? ;¤®¡ ¢«¥­¨¥ ¬¥âª¨
align 4 align 4
but_MetAdd: ;¤®¡ ¢«¥­¨¥ ¬¥âª¨ but_MetAdd:
push eax push eax
mov eax,dword[bmp_icon] mov eax,dword[bmp_icon]
m2m dword[eax], dword[map.coord_x] m2m dword[eax], dword[map.coord_x]
@ -532,26 +507,25 @@ but_MetAdd: ;
m2m word[eax+8], word[map.zoom] m2m word[eax+8], word[map.zoom]
add eax,12 add eax,12
stdcall dword[str_copy], eax,30,dword[edit2.text],30 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 stdcall dword[tl_draw], tree2
pop eax pop eax
jmp still jmp still
;??? ;¯¥à¥å®¤ ª ¢ë¡à ­­®© ¬¥âª¥
align 4 align 4
fun_goto_met: ;¯¥à¥å®¤ ª ¢ë¡à ­­®© ¬¥âª¥ fun_goto_met:
push eax push eax
stdcall dword[tl_node_get_data], tree2 stdcall dword[tl_node_get_data], tree2
pop eax cmp eax,0
cmp eax,0 je @f ;ªãàá®à ­¥ á⮨⠭  ¬¥âª¥
je @f ;ªãàá®à ­¥ á⮨⠭  ¬¥âª¥ m2m dword[map.coord_x],dword[eax]
m2m dword[map.coord_x],dword[eax] m2m dword[map.coord_y],dword[eax+4]
m2m dword[map.coord_y],dword[eax+4] m2m word[map.zoom],word[eax+8]
m2m word[map.zoom],word[eax+8] call but_Refresh
call but_Refresh @@:
@@: pop eax
pop eax ret
ret
;??? ;???
align 4 align 4
@ -563,38 +537,27 @@ but_Refresh:
ret ret
align 4 align 4
proc tile_init, tile:dword proc tile_init uses eax edi, tile:dword
push eax edi mov edi,[tile]
mov edi,[tile] stdcall mem.Alloc, RGB_TILE_SIZE+300
mov tile_rgb_icon,eax
push dword RGB_TILE_SIZE+300 stdcall mem.Alloc, RGB_TILE_SIZE
call mem.Alloc mov tile_drobn_icon,eax
mov tile_rgb_icon,eax ret
push dword RGB_TILE_SIZE
call mem.Alloc
mov tile_drobn_icon,eax
pop edi eax
ret
endp endp
align 4 align 4
proc tile_destroy, tile:dword proc tile_destroy uses edi, tile:dword
push edi mov edi,[tile]
mov edi,[tile] stdcall mem.Free,tile_rgb_icon
push tile_rgb_icon stdcall mem.Free,tile_drobn_icon
call mem.Free ret
push tile_drobn_icon
call mem.Free
pop edi
ret
endp endp
;??? ;§ £à㦠¥â â ©«ë, ¢ ®¯à¥¤¥«¥­­®© ®¡« áâ¨
align 4 ;§ £à㦠¥â â ©«ë, ¢ ®¯à¥¤¥«¥­­®© ®¡« á⨠align 4
proc load_tile, tile:dword proc load_tile uses eax ebx ecx edi, tile:dword
push eax ebx ecx edi
mov edi,dword[tile] ;ª®¯¨à㥬 㪠§ â¥«ì ­  áâàãªâãàã â ©« , çâ®-¡ë à ¡®â «¨ ª®­áâ ­âë mov edi,dword[tile] ;ª®¯¨à㥬 㪠§ â¥«ì ­  áâàãªâãàã â ©« , çâ®-¡ë à ¡®â «¨ ª®­áâ ­âë
stdcall mem_copy, map,edi, 9 ;ª®¯¨à㥬 ª®®à¤¨­ âë ªãàá®à  ¢ áâàãªâãàã â ©«  stdcall mem_copy, map,edi, 9 ;ª®¯¨à㥬 ª®®à¤¨­ âë ªãàá®à  ¢ áâàãªâãàã â ©« 
@ -748,7 +711,6 @@ proc load_tile, tile:dword
jmp .zoom jmp .zoom
@@: @@:
pop edi ecx ebx eax
ret ret
endp endp
@ -798,7 +760,6 @@ align 4 ;
proc load_new_tile, tile:dword proc load_new_tile, tile:dword
pushad pushad
mov eax,70 ;load icon file
mov [run_file_70.Function], 0 mov [run_file_70.Function], 0
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
@ -806,8 +767,7 @@ proc load_new_tile, tile:dword
m2m [run_file_70.Buffer], [bmp_icon] m2m [run_file_70.Buffer], [bmp_icon]
mov byte[run_file_70+20], 0 mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name mov [run_file_70.FileName], file_name
mov ebx,run_file_70 mcall 70,run_file_70
int 0x40
mov edi,[tile] mov edi,[tile]
; cmp ebx,0xffffffff ; cmp ebx,0xffffffff
; je .no_load ; je .no_load
@ -844,8 +804,7 @@ endp
;äã­ªæ¨ï £¥­¥à¨àã¥â ç áâì ¯ã⨠ª ä ©«ã ¢ ¢¨¤¥: \z?\?\x?\?\y? ;äã­ªæ¨ï £¥­¥à¨àã¥â ç áâì ¯ã⨠ª ä ©«ã ¢ ¢¨¤¥: \z?\?\x?\?\y?
align 4 align 4
proc get_tile_path, tile:dword proc get_tile_path uses eax ecx edi esi, tile:dword
push eax ecx edi esi
mov ecx,300 mov ecx,300
mov edi,txt_tile_path mov edi,txt_tile_path
@@: @@:
@ -869,7 +828,7 @@ proc get_tile_path, tile:dword
inc edi inc edi
xor eax,eax xor eax,eax
mov al,byte[esi+8] ;+8 = zoom mov al,byte[esi+8] ;+8 = zoom
call tl_convert_to_str stdcall convert_int_to_str, 300
inc edi inc edi
cmp byte[esi+8],9 ;+8 = zoom cmp byte[esi+8],9 ;+8 = zoom
@ -883,7 +842,7 @@ proc get_tile_path, tile:dword
cmp eax,ecx cmp eax,ecx
jge .out_of_rang ;coord_x ¡®«ìè¥ ¤®¯ãá⨬®£® §­ ç¥­¨ï ¯à¨ § ¤ ­­®¬ ¬ áèâ ¡¥ jge .out_of_rang ;coord_x ¡®«ìè¥ ¤®¯ãá⨬®£® §­ ç¥­¨ï ¯à¨ § ¤ ­­®¬ ¬ áèâ ¡¥
shr eax,10 shr eax,10
call tl_convert_to_str stdcall convert_int_to_str, 300
@@: @@:
inc edi inc edi
@ -895,7 +854,7 @@ jge .out_of_rang ;coord_x
inc edi inc edi
mov eax,[esi] ;coord_x mov eax,[esi] ;coord_x
call tl_convert_to_str stdcall convert_int_to_str, 300
@@: @@:
inc edi inc edi
@ -914,7 +873,7 @@ jge .out_of_rang ;coord_x
cmp eax,ecx cmp eax,ecx
jge .out_of_rang ;coord_y ¡®«ìè¥ ¤®¯ãá⨬®£® §­ ç¥­¨ï ¯à¨ § ¤ ­­®¬ ¬ áèâ ¡¥ jge .out_of_rang ;coord_y ¡®«ìè¥ ¤®¯ãá⨬®£® §­ ç¥­¨ï ¯à¨ § ¤ ­­®¬ ¬ áèâ ¡¥
shr eax,10 shr eax,10
call tl_convert_to_str stdcall convert_int_to_str, 300
@@: @@:
inc edi inc edi
@ -926,11 +885,10 @@ jge .out_of_rang ;coord_y
inc edi inc edi
mov eax,[esi+4] ;coord_y] mov eax,[esi+4] ;coord_y]
call tl_convert_to_str stdcall convert_int_to_str, 300
.out_of_rang: .out_of_rang:
call get_all_path call get_all_path
pop esi edi ecx eax
ret ret
endp 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 cmp ted_panel_id,TED_PANEL_SYNTAX
jne @f jne @f
stdcall dword[tl_node_get_data], tree1 stdcall dword[tl_node_get_data], tree1
pop dword[fn_col_option] mov [fn_col_option],eax
mov ebx,dword[fn_col_option] mov ebx,eax
call open_unpac_synt_file call open_unpac_synt_file
cmp ebx,-1 cmp ebx,-1
je @f 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 db 0
@@: @@:
;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬ ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
copy_path .path_str,[32],file_name,0x0 copy_path .path_str,[32],file_name,0
else else
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®© copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
end if end if
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax mov [buf],eax
mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
mov [run_file_70.Function], 0 mov [run_file_70.Function], 0
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
mov [run_file_70.Count], dword size 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 byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name mov [run_file_70.FileName], file_name
mov ebx,run_file_70 mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
cmp ebx,0xffffffff cmp ebx,0xffffffff
je @f je @f
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
@ -210,29 +208,25 @@ mov ebp,lib0
mov eax,dword[icon_tl_sys] mov eax,dword[icon_tl_sys]
mov dword[tree1.data_img],eax mov dword[tree1.data_img],eax
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
copy_path fn_syntax_dir,sys_path,file_name,0x0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á  copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
mov eax,70 mcall 70,tree_file_struct
mov ebx,tree_file_struct
int 0x40
cmp ebx,-1 cmp ebx,-1
je .end_dir_init je .end_dir_init
mov eax,dir_mem
mov eax,dir_mem add eax,32+4+1+3+4*6+8
add eax,32+4+1+3+4*6+8 mov ecx,ebx
mov ecx,ebx @@:
@@: cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..'
cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥­ ¬¨ '.' ¨ '..' je .filter
je .filter ;0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®©
;0x10000 ;1*2^16 - £¤¥ 1 ­®¬¥à ¨ª®­ª¨ á ª­¨£®© stdcall dword[tl_node_add], tree1,0x10000,eax
stdcall dword[tl_node_add], eax,0x10000, tree1 stdcall dword[tl_cur_next], tree1
.filter:
stdcall dword[tl_cur_next], tree1 add eax,304
.filter: loop @b
add eax,304 stdcall dword[tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ­  ­ ç «® ᯨ᪠
loop @b .end_dir_init:
stdcall dword[tl_cur_beg],tree1 ;áâ ¢¨¬ ªãàá®à ­  ­ ç «® ᯨ᪠
.end_dir_init:
;--- load ini file --- ;--- load ini file ---
copy_path ini_name,sys_path,file_name,0 copy_path ini_name,sys_path,file_name,0
@ -293,7 +287,7 @@ mov ecx,ebx
align 4 align 4
red_win: red_win:
call draw_window call draw_window
align 4 align 4
still: still:
@ -326,12 +320,9 @@ draw_window:
mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t
call EvSize call EvSize
mov eax,13 ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨ movzx ebx,word[procinfo.client_box.width]
xor ebx,ebx
mov ecx,ted_wnd_t
mov bx,word[procinfo.client_box.width]
inc bx inc bx
int 0x40 mcall 13,,ted_wnd_t ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
call draw_but_toolbar call draw_but_toolbar
@ -361,15 +352,13 @@ mouse:
;output: ;output:
; ah = symbol ; ah = symbol
align 4 align 4
proc KeyConvertToASCII, table:dword proc KeyConvertToASCII uses ebx, table:dword
push ebx mov ebx,dword[table] ;convert scan to ascii
mov ebx,dword[table] ;convert scan to ascii ror ax,8
ror ax,8 xor ah,ah
xor ah,ah add bx,ax
add bx,ax mov ah,byte[ebx]
mov ah,byte[ebx] ret
pop ebx
ret
endp endp
align 4 align 4
@ -541,7 +530,7 @@ button:
@@: @@:
stdcall [ted_delete], tedit0 stdcall [ted_delete], tedit0
stdcall dword[tl_data_clear], tree1 stdcall [tl_data_clear], tree1
mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0 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] stdcall str_instr, ebx,[edit3.text]
test al,al test al,al
jnz .end_add 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 stdcall dword[tl_cur_next], tree3
.end_add: .end_add:
add ebx,MAX_COLOR_WORD_LEN+8 ;sizeof.TexColViv add ebx,MAX_COLOR_WORD_LEN+8 ;sizeof.TexColViv
@ -166,9 +166,9 @@ prop_button:
jne @f jne @f
;ª®¯¨à®¢ âì ¢ ¡ãä¥à ;ª®¯¨à®¢ âì ¢ ¡ãä¥à
stdcall [tl_node_get_data],tree3 stdcall [tl_node_get_data],tree3
pop esi or eax,eax
or esi,esi
jz .no_select_0 jz .no_select_0
mov esi,eax
mov edi,[tedit0.buffer] mov edi,[tedit0.buffer]
mov dword[edi],MAX_COLOR_WORD_LEN mov dword[edi],MAX_COLOR_WORD_LEN
mov dword[edi+4],0 ;text data mov dword[edi+4],0 ;text data
@ -199,19 +199,4 @@ editboxes_end:
string1 rb MAX_COLOR_WORD_LEN string1 rb MAX_COLOR_WORD_LEN
align 4 align 4
w_scr_t3: w_scr_t3 scrollbar 16,0, 3,0, 15, 100, 0,0, 0xeeeeee, 0xbbddff, 0, 1
.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

View File

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