1) correction functions 'buf_filled_rect_by_size' and 'buf_line_h' in 'buf2d.obj'

2) fix & update 'kol_f_edit'

git-svn-id: svn://kolibrios.org@1717 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2010-12-13 15:21:52 +00:00
parent d93ba1183b
commit 8cc2207bd7
11 changed files with 337 additions and 296 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -164,9 +164,12 @@ push ebx
cmp eax,0 cmp eax,0
je .find_no je .find_no
cmp byte[eax],C_STR cmp dword[eax],C_STR
jne @f jne @f
stdcall get_code_struct,eax ;îáðàáîòêà îáúåêòà stdcall insert_text,txt_struct
stdcall insert_text_prop, eax,0
insert_nl
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], esi,tree2
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
cmp esi,0 cmp esi,0
@ -178,34 +181,34 @@ push ebx
call code_gen_obj ;ðåêóðñèâíûé âûçîâ äî÷åðíèõ îáúåêòîâ call code_gen_obj ;ðåêóðñèâíûé âûçîâ äî÷åðíèõ îáúåêòîâ
pop bx pop bx
.end_st: .end_st:
stdcall [ted_text_add], tedit0,txt_ends,6,ted_opt_ed_move_cursor stdcall insert_text,txt_ends
jmp .beg_iterat jmp .beg_iterat
@@: @@:
cmp byte[eax],C_TXT cmp dword[eax],C_TXT
jne @f jne @f
stdcall get_code_text,eax ;îáðàáîòêà îáúåêòà stdcall get_code_text,eax ;îáðàáîòêà îáúåêòà
@@: @@:
cmp byte[eax],C_INC cmp dword[eax],C_INC
jne @f jne @f
stdcall get_code_incl,eax ;îáðàáîòêà îáúåêòà stdcall get_code_incl,eax ;îáðàáîòêà îáúåêòà
@@: @@:
cmp byte[eax],C_COM cmp dword[eax],C_COM
jne @f jne @f
stdcall get_code_comment,eax ;îáðàáîòêà îáúåêòà stdcall get_code_comment,eax ;îáðàáîòêà îáúåêòà
@@: @@:
cmp byte[eax],C_VAR cmp dword[eax],C_VAR
jne @f jne @f
stdcall get_code_variable,eax,ebx ;îáðàáîòêà îáúåêòà stdcall get_code_variable,eax,ebx ;îáðàáîòêà îáúåêòà
@@: @@:
cmp byte[eax],C_WND cmp dword[eax],C_WND
jne @f jne @f
stdcall get_code_window,eax ;îáðàáîòêà îáúåêòà stdcall get_code_window,eax ;îáðàáîòêà îáúåêòà
@@: @@:
cmp byte[eax],C_ACO cmp dword[eax],C_ACO
jne @f jne @f
stdcall get_code_auto,eax ;îáðàáîòêà îáúåêòà stdcall get_code_auto,eax ;îáðàáîòêà îáúåêòà
@@: @@:
cmp byte[eax],C_KEY ;êëàâèàòóðà cmp dword[eax],C_KEY ;êëàâèàòóðà
jne @f jne @f
stdcall get_code_key,eax ;îáðàáîòêà îáúåêòà stdcall get_code_key,eax ;îáðàáîòêà îáúåêòà
@@: @@:
@ -218,17 +221,14 @@ push ebx
pop ebx pop ebx
ret ret
;äîáàâëåíèå îáúåêòà ñ ïðîãðàìíûì êîäîì (òåêñòîì)
align 4 align 4
proc get_code_text, p_obj:dword proc get_code_text, p_obj:dword
pushad ;pushad
insert_nl insert_nl
mov ebx,dword[p_obj] stdcall insert_text_prop, dword[p_obj],0
stdcall get_obj_text_col,ebx,0
stdcall str_len,edx
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
insert_nl insert_nl
popad ;popad
ret ret
endp endp
@ -238,13 +238,12 @@ proc get_code_auto, p_obj:dword
pushad pushad
insert_nl insert_nl
mov ebx,dword[p_obj] mov ebx,dword[p_obj]
mov ecx,dword[ebx+u_object.modif-u_object] test_bool_prop ebx,BIT_MOD_ACM
bt ecx,BIT_MOD_ACM
jae @f jae @f
;àâòîìàòè÷åñêèå ñîáûòèÿ îò ìûøè ;àâòîìàòè÷åñêèå ñîáûòèÿ îò ìûøè
call get_code_auto_m call get_code_auto_m
@@: @@:
bt ecx,BIT_MOD_ABU test_bool_prop ebx,BIT_MOD_ABU
jae @f jae @f
;ñîçäàíèå ôóíêöèè button ;ñîçäàíèå ôóíêöèè button
insert_but_beg insert_but_beg
@ -252,13 +251,12 @@ proc get_code_auto, p_obj:dword
insert_but_end insert_but_end
call get_code_a_but_fun ;êîäû ôóíêöèé, âûçûâàåìûõ ïðè íàæàòèè êíîïîê call get_code_a_but_fun ;êîäû ôóíêöèé, âûçûâàåìûõ ïðè íàæàòèè êíîïîê
@@: @@:
bt ecx,BIT_MOD_ACD test_bool_prop ebx,BIT_MOD_ACD
jae @f jae @f
call get_code_auto_data_el call get_code_auto_data_el
call get_code_auto_data_dop call get_code_auto_data_dop
xor edx,edx mov edx,C_LIB
mov dl,C_LIB
stdcall find_obj_in_file,edx ;eax - óêàçàòåëü íà ñòðóêòóðó áèáëèîòåêè stdcall find_obj_in_file,edx ;eax - óêàçàòåëü íà ñòðóêòóðó áèáëèîòåêè
cmp eax,0 cmp eax,0
je @f je @f
@ -298,7 +296,7 @@ proc get_code_auto_m
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
stdcall insert_text, txt_std_mouse_ed stdcall insert_text, txt_std_mouse_ed
;insert_sp ;insert_sp
@ -307,7 +305,7 @@ proc get_code_auto_m
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
insert_nl insert_nl
@@: @@:
cmp byte[ebx],C_CHB cmp dword[ebx],C_CHB
jne @f jne @f
stdcall insert_text, txt_std_mouse_cb stdcall insert_text, txt_std_mouse_cb
;insert_sp ;insert_sp
@ -343,7 +341,7 @@ proc get_code_auto_data_el
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt ;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
stdcall insert_text_prop, ebx,0 stdcall insert_text_prop, ebx,0
@ -396,7 +394,7 @@ proc get_code_auto_data_el
.null_string: .null_string:
insert_nl insert_nl
@@: @@:
cmp byte[ebx],C_DTT cmp dword[ebx],C_DTT
jne @f jne @f
stdcall insert_text, txt_txt stdcall insert_text, txt_txt
mov edx,fp_icon mov edx,fp_icon
@ -433,7 +431,7 @@ proc get_code_auto_data_libs_param
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_LIB cmp dword[ebx],C_LIB
jne @f jne @f
;0,1,2,3,4,5 - l_nam,s_dir,i_met,... ;0,1,2,3,4,5 - l_nam,s_dir,i_met,...
@ -501,7 +499,7 @@ proc get_code_auto_data_libs_struc
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_LIB cmp dword[ebx],C_LIB
jne @f jne @f
;0,1,2,3,4,5 - l_nam,s_dir,i_met,... ;0,1,2,3,4,5 - l_nam,s_dir,i_met,...
@ -567,7 +565,7 @@ proc get_code_auto_data_libs
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_LIB cmp dword[ebx],C_LIB
jne @f jne @f
;0,1,2,3,4,5 - l_nam,s_dir,i_met,... ;0,1,2,3,4,5 - l_nam,s_dir,i_met,...
stdcall insert_text, txt_align_4 stdcall insert_text, txt_align_4
@ -609,7 +607,7 @@ pushad
pop ecx ;ïîëó÷àåì äàííûå óçëà pop ecx ;ïîëó÷àåì äàííûå óçëà
cmp ecx,0 cmp ecx,0
je @f je @f
cmp byte[ecx],C_IFN cmp dword[ecx],C_IFN
jne @b jne @b
;âñòàâêà óêàçàòåëÿ íà ôóíêöèþ ;âñòàâêà óêàçàòåëÿ íà ôóíêöèþ
insert_tab insert_tab
@ -633,7 +631,7 @@ pushad
pop ecx ;ïîëó÷àåì äàííûå óçëà pop ecx ;ïîëó÷àåì äàííûå óçëà
cmp ecx,0 cmp ecx,0
je @f je @f
cmp byte[ecx],C_IFN cmp dword[ecx],C_IFN
jne @b jne @b
;âñòàâêà èìåíè èìïîðòèðîâàííîé ôóíêöèè ;âñòàâêà èìåíè èìïîðòèðîâàííîé ôóíêöèè
insert_tab insert_tab
@ -666,7 +664,7 @@ proc get_code_auto_data_dop
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt ;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
stdcall insert_text, txt_txt stdcall insert_text, txt_txt
@ -717,9 +715,6 @@ proc get_code_auto_data_dop
insert_0 insert_0
insert_nl insert_nl
@@: @@:
;cmp byte[ebx],C_CHB
;jne @f
;@@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], esi,tree2
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
@ -745,7 +740,7 @@ proc get_code_auto_but
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_BUT cmp dword[ebx],C_BUT
jne @f jne @f
insert_tab insert_tab
insert_cmp insert_cmp
@ -797,7 +792,7 @@ proc get_code_a_but_fun
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_BUT cmp dword[ebx],C_BUT
jne @f jne @f
stdcall get_obj_text_col,ebx,6 stdcall get_obj_text_col,ebx,6
stdcall str_len,edx stdcall str_len,edx
@ -851,7 +846,7 @@ proc get_code_funct_key
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
stdcall insert_text, txt_std_key_ed stdcall insert_text, txt_std_key_ed
stdcall insert_text_prop,ebx,0 stdcall insert_text_prop,ebx,0
@ -984,20 +979,20 @@ proc get_code_draw_obj
cmp ebx,0 cmp ebx,0
je .find_no je .find_no
cmp byte[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
stdcall insert_text, txt_editb_draw stdcall insert_text, txt_editb_draw
stdcall insert_text_prop, ebx,0 stdcall insert_text_prop, ebx,0
insert_nl insert_nl
@@: @@:
cmp byte[ebx],C_CHB cmp dword[ebx],C_CHB
jne @f jne @f
stdcall insert_text, txt_cbox_draw stdcall insert_text, txt_cbox_draw
stdcall insert_text_prop, ebx,0 stdcall insert_text_prop, ebx,0
insert_nl insert_nl
@@: @@:
cmp byte[ebx],C_BUT cmp dword[ebx],C_BUT
jne @f jne .ob_draw_but
insert_tab insert_tab
stdcall insert_text, txt_mov stdcall insert_text, txt_mov
insert_reg txt_eax insert_reg txt_eax
@ -1028,13 +1023,16 @@ proc get_code_draw_obj
insert_reg txt_edx insert_reg txt_edx
insert_coma insert_coma
stdcall insert_text_prop, ebx,0 stdcall insert_text_prop, ebx,0
insert_nl test_bool_prop ebx,BIT_MOD_BUT_NFON
jnc @f
insert_tab stdcall insert_text, txt_plus
stdcall insert_text, txt_or stdcall insert_text, txt_bit_30
insert_reg txt_edx @@:
insert_coma test_bool_prop ebx,BIT_MOD_BUT_NBORD
stdcall insert_text, txt_but_create jnc @f
stdcall insert_text, txt_plus
stdcall insert_text, txt_bit_29
@@:
insert_nl insert_nl
insert_tab insert_tab
@ -1047,8 +1045,8 @@ proc get_code_draw_obj
insert_tab insert_tab
stdcall insert_text, txt_i_40 stdcall insert_text, txt_i_40
insert_nl insert_nl
@@: .ob_draw_but:
cmp byte[ebx],C_REC cmp dword[ebx],C_REC
jne @f jne @f
insert_tab insert_tab
stdcall insert_text, txt_mov stdcall insert_text, txt_mov
@ -1087,8 +1085,8 @@ proc get_code_draw_obj
stdcall insert_text, txt_i_40 stdcall insert_text, txt_i_40
insert_nl insert_nl
@@: @@:
cmp byte[ebx],C_DTT ;ðèñîâàíèå òåêñòà ÷åðåç ñèñò. ô. 4 cmp dword[ebx],C_DTT ;ðèñîâàíèå òåêñòà ÷åðåç ñèñò. ô. 4
jne @f jne .ob_draw_text
insert_tab insert_tab
stdcall insert_text, txt_mov stdcall insert_text, txt_mov
insert_reg txt_eax insert_reg txt_eax
@ -1110,10 +1108,26 @@ proc get_code_draw_obj
insert_reg txt_ecx insert_reg txt_ecx
insert_coma insert_coma
stdcall insert_text_prop, ebx,3 stdcall insert_text_prop, ebx,3
test_bool_prop ebx,BIT_MOD_TXT_ASCII_0
jnc @f
;or ecx,0x80000000 - áèò äëÿ ñòðîêè ASCIIZ
stdcall insert_text,txt_plus
stdcall insert_text,txt_bit_31
@@:
test_bool_prop ebx,BIT_MOD_TXT_NO_TRAN
jnc @f
;or ecx,0x40000000 - áèò äëÿ íå ïðîçðà÷íîãî òåêñòà
stdcall insert_text,txt_plus
stdcall insert_text,txt_bit_30
@@:
test_bool_prop ebx,BIT_MOD_TXT_CHAR2
jnc @f
;or ecx,0x40000000 - áèò äëÿ 2-ãî ñèñò. øðèôòà
stdcall insert_text,txt_plus
stdcall insert_text,txt_bit_28
@@:
insert_nl insert_nl
;or ecx,0x80000000
insert_tab insert_tab
stdcall insert_text, txt_mov stdcall insert_text, txt_mov
insert_reg txt_edx insert_reg txt_edx
@ -1125,11 +1139,20 @@ proc get_code_draw_obj
insert_nl insert_nl
;mov esi,... ;mov esi,...
test_bool_prop ebx,BIT_MOD_TXT_NO_TRAN
jnc @f
insert_tab
stdcall insert_text, txt_mov
insert_reg txt_edi
insert_coma
stdcall insert_text_prop, ebx,4 ;öâåò ôîíà
insert_nl
@@:
insert_tab insert_tab
stdcall insert_text, txt_i_40 stdcall insert_text, txt_i_40
insert_nl insert_nl
@@: .ob_draw_text:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], esi,tree2
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
@ -1140,22 +1163,6 @@ proc get_code_draw_obj
ret ret
endp endp
align 4
proc get_code_struct, p_obj:dword
pushad
mov ebx,dword[p_obj]
;0 - name
stdcall [ted_text_add], tedit0,txt_struct,7,ted_opt_ed_move_cursor
stdcall insert_text_prop, ebx,0
insert_nl
popad
ret
endp
;ñîçäàòü êîä îáúÿâëåíèÿ ïåðåìåííîé ;ñîçäàòü êîä îáúÿâëåíèÿ ïåðåìåííîé
align 4 align 4
proc get_code_variable, p_obj:dword,o_lev:dword proc get_code_variable, p_obj:dword,o_lev:dword
@ -1166,7 +1173,7 @@ proc get_code_variable, p_obj:dword,o_lev:dword
mov ecx,dword[o_lev] mov ecx,dword[o_lev]
cmp cl,0 cmp cl,0
je .no_tab ;èçáåãàåì çàöèêëèâàíèÿ (0-1 = 2^32-1) je .no_tab ;èçáåãàåì çàöèêëèâàíèÿ (0-1 = 2^32-1)
and cx,0xff and ecx,0xff
cld cld
@@: @@:
insert_tab ;ôîðìèðîâàíèå îòñòóïà ïåðåä ïåðåìåííîé insert_tab ;ôîðìèðîâàíèå îòñòóïà ïåðåä ïåðåìåííîé
@ -1246,7 +1253,10 @@ txt_head_l db 'head_f_l',0
txt_err_m_i_lib db 'err_msg_import_',0 txt_err_m_i_lib db 'err_msg_import_',0
txt_head_i db 'head_f_i',0 txt_head_i db 'head_f_i',0
txt_ll_end db 'l_libs_end:',13,0 txt_ll_end db 'l_libs_end:',13,0
txt_but_create db '0x40000000',0 ;tmp txt_bit_28 db '0x10000000',0
txt_bit_29 db '0x20000000',0
txt_bit_30 db '0x40000000',0
txt_bit_31 db '0x80000000',0
txt_0x33000000 db '0x33000000',0 ;tmp txt_0x33000000 db '0x33000000',0 ;tmp
txt_struct db 'struct ',0 txt_struct db 'struct ',0
txt_met_end db '.end',0 txt_met_end db '.end',0

View File

@ -23,8 +23,7 @@ pushad
jmp .end_draw jmp .end_draw
@@: @@:
xor edx,edx mov edx,C_WND
mov dl,C_WND
stdcall find_obj_in_file,edx ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®ª­  stdcall find_obj_in_file,edx ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®ª­ 
cmp eax,0 cmp eax,0
je .end_draw je .end_draw
@ -80,16 +79,16 @@ pushad
stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;¯à®à¨á®¢ª  ¯à ¢®£® ᪨­  stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;¯à®à¨á®¢ª  ¯à ¢®£® ᪨­ 
.end_skin: .end_skin:
xor edx,edx ;爲矼・ャ 」燿茯逾皙ィ・ 戓・ャ・ュ粱 ;à¨á㥬 £à ä¨ç¥áª¨¥ í«¥¬¥­âë
mov dl,C_BUT mov edx,C_BUT
stdcall draw_arr_objects, edx,draw_obj_but stdcall draw_arr_objects, edx,draw_obj_but
mov dl,C_EDB mov edx,C_EDB
stdcall draw_arr_objects, edx,draw_obj_edit stdcall draw_arr_objects, edx,draw_obj_edit
mov dl,C_CHB mov edx,C_CHB
stdcall draw_arr_objects, edx,draw_obj_check stdcall draw_arr_objects, edx,draw_obj_check
mov dl,C_DTT mov edx,C_DTT
stdcall draw_arr_objects, edx,draw_obj_text stdcall draw_arr_objects, edx,draw_obj_text
mov dl,C_REC mov edx,C_REC
stdcall draw_arr_objects, edx,draw_obj_rect_f13 stdcall draw_arr_objects, edx,draw_obj_rect_f13
.end_draw: .end_draw:
@ -142,7 +141,13 @@ endl
mov ecx,eax mov ecx,eax
stdcall get_obj_text_col,ebx,5 stdcall get_obj_text_col,ebx,5
stdcall conv_str_to_int,edx stdcall conv_str_to_int,edx
test_bool_prop ebx,BIT_MOD_BUT_NFON
jc .no_draw_fon
stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
jmp @f
.no_draw_fon: ;­¥ ¯à®à¨á®¢ë¢ ¥¬ ª­®¯ªã
stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
@@:
popad popad
ret ret
endp endp

View File

@ -30,7 +30,7 @@ align 4
but_obj_paste: but_obj_paste:
push eax ebx ecx edi push eax ebx ecx edi
mov eax,[tree2.data_info] ;¤ ­­ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ­¨ï mov eax,[tree2.data_info] ;¤ ­­ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ­¨ï
mov bl,byte[eax] mov ebx,dword[eax]
call find_obj_in_opt call find_obj_in_opt
xor ecx,ecx xor ecx,ecx
mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ  mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ 
@ -114,23 +114,21 @@ get_obj_win_param:
align 4 align 4
proc get_obj_text_col, obj:dword, ind:dword proc get_obj_text_col, obj:dword, ind:dword
mov edx,dword[obj] mov edx,dword[obj]
inc edx ;goto text add edx,4 ;goto text
push ebx push ebx ecx
mov ebx,dword[ind] mov ecx,dword[ind]
cmp bx,0 cmp cx,0
je .end_fun je .end_fun
shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ­®¬¥à ¨áª®¬®© ª®«®­ª¨ mov ebx,dword[edx-4] ;¢ ebx ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ 
mov bl,byte[edx-1] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ 
push ecx edi push edi
call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ  call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ 
add edi,obj_opt.Col-obj_opt add edi,obj_opt.Col-obj_opt
dec bh dec ecx
and ebx,0xff00 shl ecx,1 ;㬭®¦ ¥¬ ­  2
shr ebx,7 ;ᤢ¨£ ¥¬ ­  7, â.ª. ­ã¦­® §­ ç¥­¨¥ bh 㬭®¦¥­­®¥ ­  2 add edi,ecx ;+ ind*2
add edi,ebx ;+ ¡ë¢è¥¥ bh*2
xor ecx,ecx xor ecx,ecx
mov cx,word[edi] ;ecx - ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï mov cx,word[edi] ;ecx - ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï
add edx,ecx add edx,ecx
@ -144,9 +142,9 @@ push ebx
mov edx,0 ;not text mov edx,0 ;not text
@@: @@:
pop edi ecx pop edi
.end_fun: .end_fun:
pop ebx pop ecx ebx
ret ret
endp endp
@ -158,20 +156,17 @@ endp
align 4 align 4
proc get_obj_text_len_col, obj:dword, ind:dword proc get_obj_text_len_col, obj:dword, ind:dword
xor eax,eax xor eax,eax
push ebx push ebx ecx edi
mov ebx,dword[ind] mov ecx,dword[ind]
shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ­®¬¥à ¨áª®¬®© ª®«®­ª¨
mov eax,dword[obj] mov eax,dword[obj]
mov bl,byte[eax] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ  mov ebx,dword[eax] ;¢ ebx ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ 
xor eax,eax xor eax,eax
push edi
call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ  call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ 
add edi,obj_opt.Col-obj_opt add edi,obj_opt.Col-obj_opt
and ebx,0xff00 shl ecx,1 ;㬭®¦ ¥¬ ­  2
shr ebx,7 ;ᤢ¨£ ¥¬ ­  7, â.ª. ­ã¦­® §­ ç¥­¨¥ bh 㬭®¦¥­­®¥ ­  2 add edi,ecx ;+ ind*2
add edi,ebx ;+ ¡ë¢è¥¥ bh*2
mov ax,word[edi] ;eax - ᤨ£ ¤«ï á«¥¤ã饣® ¯®«ï mov ax,word[edi] ;eax - ᤨ£ ¤«ï á«¥¤ã饣® ¯®«ï
cmp ax,0 cmp ax,0
@ -191,9 +186,8 @@ push ebx
mov eax,0 ;not text mov eax,0 ;not text
@@: @@:
pop edi
.end_fun: .end_fun:
pop ebx pop edi ecx ebx
ret ret
endp endp
@ -201,7 +195,7 @@ align 4
proc draw_obj_icon, o_type:dword,n_col:dword, coord_y:dword proc draw_obj_icon, o_type:dword,n_col:dword, coord_y:dword
pushad pushad
xor ebx,ebx xor ebx,ebx
mov bl,byte[o_type] mov ebx,dword[o_type]
call find_obj_in_opt call find_obj_in_opt
add edi,obj_opt.img-obj_opt ;get index (+0) add edi,obj_opt.img-obj_opt ;get index (+0)
@ -231,54 +225,6 @@ proc draw_obj_icon, o_type:dword,n_col:dword, coord_y:dword
ret ret
endp endp
;¢ë¢®¤ ⥪áâ  á ¯®¤¯¨áìî
align 4
proc draw_obj_caption, o_type:dword,n_col:dword, coord_y:dword
pushad
stdcall get_obj_text_len_col, [foc_obj], [n_col] ;eax - ¤«¨­­  ¯®«ï
cmp eax,1
jl .no_draw
xor ebx,ebx
mov bl,byte[o_type]
call find_obj_in_opt
mov edx,edi
add edx,obj_opt.caption-obj_opt
mov eax,[n_col]
mov ebx,150
shl ebx,16
add ebx,dword[coord_y]
add ebx,3
mov ecx,0 ;text color
mov esi,edx
.beg_found:
cmp byte[esi],0
je .end_found
cmp byte[esi],'*'
je @f
inc esi
jmp .beg_found
@@:
cmp eax,0
je .end_found
dec eax
inc esi
mov edx,esi ;¯¥à¥ª«îç ¥¬ ­ ç «® áâப¨ ­  á«¥¤. ¯®¤¯¨áì
jmp .beg_found
.end_found:
cmp esi,edx
jle .no_draw
sub esi,edx ;esi = text len
mov eax,4
int 0x40
.no_draw:
popad
ret
endp
align 4 align 4
proc draw_icon, ind:dword,coord_x:dword,coord_y:dword proc draw_icon, ind:dword,coord_x:dword,coord_y:dword
pushad pushad
@ -301,16 +247,16 @@ proc draw_icon, ind:dword,coord_x:dword,coord_y:dword
endp endp
;input ;input
; bl = cod object ; ebx = cod object
;output: ;output:
; edi = pointer to option struct ; edi = pointer to option struct
align 4 align 4
find_obj_in_opt: find_obj_in_opt:
push ecx push ecx
xor ecx,ecx ;find 'bl' in options xor ecx,ecx ;find 'ebx' in options
mov edi,obj_opt mov edi,obj_opt
@@: @@:
cmp bl,[edi] ;find cmp ebx,dword[edi] ;find
je @f je @f
inc ecx inc ecx
cmp ecx,MAX_OBJ_TYPES cmp ecx,MAX_OBJ_TYPES
@ -343,7 +289,7 @@ push ebx esi
cmp eax,0 cmp eax,0
je .find_no je .find_no
cmp byte[eax],bl ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ cmp dword[eax],ebx ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
je .find_yes je .find_yes
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], esi,tree2
@ -370,7 +316,7 @@ push ebx esi
cmp dword[obj_find_last],0 cmp dword[obj_find_last],0
je .find_no je .find_no
mov ebx,[o_type] mov ebx,dword[o_type]
stdcall dword[tl_node_poi_get_next_info], dword[obj_find_last],tree2 stdcall dword[tl_node_poi_get_next_info], dword[obj_find_last],tree2
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
@ -384,7 +330,7 @@ push ebx esi
cmp eax,0 cmp eax,0
je .find_no je .find_no
cmp byte[eax],bl ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ cmp dword[eax],ebx ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
je .find_yes je .find_yes
stdcall dword[tl_node_poi_get_next_info], esi, tree2 stdcall dword[tl_node_poi_get_next_info], esi, tree2

View File

@ -15,6 +15,8 @@ prop_start:
pushad pushad
mcall 40,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩ mcall 40,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
call init_obj_count_txt_props ;¯®«ãç ¥¬ ç¨á«® ¨á¯®«ì§ã¥¬ëå ¯®«¥©
; ­ áâனª  ⥪á⮢ëå ¯®«¥© ; ­ áâனª  ⥪á⮢ëå ¯®«¥©
xor ebx,ebx xor ebx,ebx
mov edi,edit2 mov edi,edit2
@ -35,7 +37,7 @@ pushad
mov dword[tree3.data_img_sys],eax mov dword[tree3.data_img_sys],eax
mov edx,[foc_obj] mov edx,[foc_obj]
cmp byte[edx],C_VAR cmp dword[edx],C_VAR
jne .sel_end jne .sel_end
stdcall [tl_node_poi_get_info], 0,tree2 stdcall [tl_node_poi_get_info], 0,tree2
@ -49,10 +51,10 @@ pushad
mov ebx,[foc_obj] mov ebx,[foc_obj]
cmp ebx,esi cmp ebx,esi
je .add_end ;¨§¡¥£ ¥¬ 横«¨ç¥áª®© áá뫪¨ je .add_end ;¨§¡¥£ ¥¬ 横«¨ç¥áª®© áá뫪¨
mov bl,[esi] mov ebx,dword[esi]
cmp bl,C_TDF cmp ebx,C_TDF
je .add_beg je .add_beg
cmp bl,C_STR cmp ebx,C_STR
je .add_beg je .add_beg
jmp .add_end jmp .add_end
.add_beg: .add_beg:
@ -60,7 +62,7 @@ pushad
mov edi,u_object mov edi,u_object
mov dword[edi],eax mov dword[edi],eax
add edi,4 add edi,4
inc esi ;¯¥à¥å®¤¨¬ ­  ¨¬ï ®¡ê¥ªâ  add esi,u_object.txt-u_object ;¯¥à¥å®¤¨¬ ­  ¨¬ï ®¡ê¥ªâ 
mov ecx,MAX_LEN_OBJ_TXT mov ecx,MAX_LEN_OBJ_TXT
cld cld
rep movsb rep movsb
@ -107,7 +109,7 @@ pushad
;ãáâ ­®¢ª  ­®¢ëå ¯®¤¯¨á¥© ;ãáâ ­®¢ª  ­®¢ëå ¯®¤¯¨á¥©
mov esi,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ­  ®¡ê¥ªâ mov esi,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ­  ®¡ê¥ªâ
mov bl,byte[esi] mov ebx,dword[esi]
call find_obj_in_opt call find_obj_in_opt
mov edi,dword[edi+obj_opt.bit_prop-obj_opt] mov edi,dword[edi+obj_opt.bit_prop-obj_opt]
cmp edi,0 cmp edi,0
@ -161,7 +163,7 @@ pushad
mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ­  ®¡ê¥ªâ mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ­  ®¡ê¥ªâ
cmp edx,0 cmp edx,0
je @f je @f
mov bl,[edx] mov ebx,dword[edx]
call find_obj_in_opt call find_obj_in_opt
add edi,obj_opt.info-obj_opt ;edi - ¯®¤¯¨áì (­ §¢ ­¨¥ ®¡ê¥ªâ ) add edi,obj_opt.info-obj_opt ;edi - ¯®¤¯¨áì (­ §¢ ­¨¥ ®¡ê¥ªâ )
@@: @@:
@ -195,11 +197,12 @@ pushad
stdcall draw_icon, 17,ebx,ecx ;17 - save stdcall draw_icon, 17,ebx,ecx ;17 - save
mov edi,edit2 mov edi,edit2
mov ecx,[obj_count_txt_props]
cld
.cycle: .cycle:
stdcall [edit_box_draw], edi ;à¨á㥬 ¯®«ï ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ  stdcall [edit_box_draw], edi
add edi,ed_struc_size add edi,ed_struc_size
cmp edi,prop_wnd_edits_end loop .cycle
jl .cycle
cmp [err_ini0],1 cmp [err_ini0],1
je .exit_fun je .exit_fun
@ -219,7 +222,7 @@ pushad
cmp ebx,MAX_OPT_FIELDS cmp ebx,MAX_OPT_FIELDS
jl .draw_column jl .draw_column
cmp byte[edx],C_VAR cmp dword[edx],C_VAR
jne .no_tree jne .no_tree
mov dword[w_scr_t3.all_redraw],1 mov dword[w_scr_t3.all_redraw],1
stdcall [tl_draw], tree3 stdcall [tl_draw], tree3
@ -231,6 +234,7 @@ pushad
mcall 12,2 mcall 12,2
popad popad
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
align 4 align 4
prop_still: prop_still:
pushad pushad
@ -251,44 +255,137 @@ prop_still:
popad popad
jmp prop_still jmp prop_still
;¢ 横«¥ ¯à®¡¥£ ¥¬ ¯® ¢á¥¬ ¯®«ï¬ ᮠ᢮©á⢠¬¨,
;çâ®-¡ë ¯®áç¨â âì ç¨á«® ¨á¯®«ì§ã¥¬ëå ¯®«¥©
align 4 align 4
prop_key: init_obj_count_txt_props:
push eax edi pushad
mcall 2 mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ­  ®¡ê¥ªâ
xor ebx,ebx
mov edi,edit2 mov edi,edit2
.cycle: .cycle:
stdcall [edit_box_key], edi stdcall get_obj_text_len_col, edx,ebx ;eax - ¤«¨­­  ¯®«ï
cmp eax,1
jl @f ;¢ë室 ¨§ 横«  ¥á«¨ ¯®«¥ ­¥ ¨á¯®«ì§ã¥âìáï
inc ebx
add edi,ed_struc_size add edi,ed_struc_size
cmp edi,prop_wnd_edits_end cmp edi,prop_wnd_edits_end
jl .cycle jl .cycle
@@:
mov [obj_count_txt_props],ebx
popad
ret
mov edi,[foc_obj] ;¢ë¢®¤ ⥪á⮢ëå ¯®¤¯¨á¥© ¤«ï ¯®«¥© ᮠ᢮©á⢠¬¨
cmp byte[edi],C_VAR align 4
proc draw_obj_caption, o_type:dword,n_col:dword, coord_y:dword
pushad
stdcall get_obj_text_len_col, [foc_obj], [n_col] ;eax - ¤«¨­­  ¯®«ï
cmp eax,1
jl .no_draw
xor ebx,ebx
mov ebx,dword[o_type]
call find_obj_in_opt
mov edx,edi
add edx,obj_opt.caption-obj_opt
mov eax,[n_col]
mov ebx,143 ;®âáâ㯠᫥¢ 
shl ebx,16
add ebx,dword[coord_y]
add ebx,3
mov ecx,0 ;text color
mov esi,edx
.beg_found:
cmp byte[esi],0
je .end_found
cmp byte[esi],'*'
je @f
inc esi
jmp .beg_found
@@:
cmp eax,0
je .end_found
dec eax
inc esi
mov edx,esi ;¯¥à¥ª«îç ¥¬ ­ ç «® áâப¨ ­  á«¥¤. ¯®¤¯¨áì
jmp .beg_found
.end_found:
cmp esi,edx
jle .no_draw
sub esi,edx ;esi = text len
mov eax,4
int 0x40
.no_draw:
popad
ret
endp
align 4
proc set_obj_win_param, col:dword, edit:dword
pushad
stdcall get_obj_text_col, [foc_obj], [col] ;edx - text
stdcall get_obj_text_len_col, [foc_obj], [col] ;eax - ¤«¨­­  ¯®«ï
mov edi,[edit]
cmp eax,1
jl @f
dec eax
mov ed_max,eax ;ed_max = edi+.max
mov ed_focus_border_color, dword 0xff
mov ed_blur_border_color, dword 0x808080
stdcall [edit_box_set_text], edi,edx ;®¡­®¢«ï¥¬ editbox
jmp .end_f
@@:
mov ed_max,dword MAX_LEN_OBJ_TXT
;stdcall [edit_box_set_text], edi,txt_null
.end_f:
popad
ret
endp
align 4
prop_key:
push eax ecx edi
mcall 2
mov edi,edit2
mov ecx,[obj_count_txt_props]
cld
.cycle:
stdcall [edit_box_key], edi
add edi,ed_struc_size
loop .cycle
mov edi,dword[foc_obj]
cmp dword[edi],C_VAR
jne @f jne @f
stdcall [tl_key], tree3 stdcall [tl_key], tree3
@@: @@:
pop edi eax pop edi ecx eax
ret ret
align 4 align 4
prop_mouse: prop_mouse:
push edi push ecx edi
mov edi,edit2 mov edi,edit2
mov ecx,[obj_count_txt_props]
cld
.cycle: .cycle:
stdcall [edit_box_mouse], edi stdcall [edit_box_mouse], edi
add edi,ed_struc_size add edi,ed_struc_size
cmp edi,prop_wnd_edits_end loop .cycle
jl .cycle
mov edi,[foc_obj] mov edi,dword[foc_obj]
cmp byte[edi],C_VAR cmp dword[edi],C_VAR
jne @f jne @f
stdcall [tl_mouse], tree3 stdcall [tl_mouse], tree3
@@: @@:
checkboxes_mouse2 check_boxes,check_boxes_end checkboxes_mouse2 check_boxes,check_boxes_end
pop edi ecx
pop edi
ret ret
align 4 align 4

View File

@ -20,7 +20,7 @@ include 'obj_codes.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
hed db 'kol_f_edit 10.12.10',0 hed db 'kol_f_edit 13.12.10',0
sizeof.TreeList equ 20 ;need for element 'tree_list' sizeof.TreeList equ 20 ;need for element 'tree_list'
@ -43,28 +43,23 @@ WND_CAPT_COLOR equ 0xb0d0ff
BUF_SIZE equ 1000 BUF_SIZE equ 1000
;modif ;modif
CPP_MOD_ACM equ 2 ;ᮡëâ¨ï ¬ëè¨ BIT_MOD_ACI equ 0 ;¯®¤ª«î祭¨ï ä ©«®¢
BIT_MOD_ACM equ 1 ;ᮡëâ¨ï ¬ëè¨ BIT_MOD_ACM equ 1 ;ᮡëâ¨ï ®â ¬ëè¨
CPP_MOD_ACI equ 4 ; ¢ª«î祭¨ï BIT_MOD_ACD equ 2 ;¤ ­­ë¥ ®¡ê¥ªâ®¢
BIT_MOD_ACI equ 2 ; ¢ª«î祭¨ï BIT_MOD_ABU equ 3 ;á¢ï§ë¢ ­¨¥ ª­®¯®ª
CPP_MOD_ACD equ 8 ;¤ ­­ë¥ ®¡ê¥ªâ®¢ ;CPP_MOD_WI_CA equ 16 ; áâ¨«ì ®ª­  ¯®¤¯¨áì
BIT_MOD_ACD equ 3 ;¤ ­­ë¥ ®¡ê¥ªâ®¢ ;CPP_MOD_WI_AO equ 32 ; áâ¨«ì ®ª­  ª®®à¤¨­ âë ®â­®á¨â¥«ì­® ª«¨¥­â᪮© ®¡« áâ¨
CPP_MOD_ABU equ 16 ;á¢ï§ë¢ ­¨¥ ª­®¯®ª ;CPP_MOD_WI_RD equ 64 ; áâ¨«ì ®ª­  ¯¥à¥à¨á®¢ª  ®ª­ 
BIT_MOD_ABU equ 4 ;á¢ï§ë¢ ­¨¥ ª­®¯®ª ;CPP_MOD_WI_GR equ 128 ; áâ¨«ì ®ª­  £à ¤¨¥­â
;CPP_MOD_CHE equ 512 ; ch_flag_en - ¢ë¡à ­ CheckBox
CPP_MOD_WI_CA equ 16 ; áâ¨«ì ®ª­  ¯®¤¯¨áì BIT_MOD_TXT_ASCII_0 equ 0 ; ⥪áâ § ª ­ç¨¢. 0
CPP_MOD_WI_AO equ 32 ; áâ¨«ì ®ª­  ª®®à¤¨­ âë ®â­®á¨â¥«ì­® ª«¨¥­â᪮© ®¡« á⨠BIT_MOD_TXT_NO_TRAN equ 1 ; ⥪á⠯஧à ç­ë©
CPP_MOD_WI_RD equ 64 ; áâ¨«ì ®ª­  ¯¥à¥à¨á®¢ª  ®ª­  BIT_MOD_TXT_CHAR2 equ 2 ; ⥪áâ 2-¬ èà¨ä⮬
CPP_MOD_WI_GR equ 128 ; áâ¨«ì ®ª­  £à ¤¨¥­â ;CPP_MOD_EDIT_FOC equ 1 ; EditBox ¢ 䮪ãá¥
CPP_MOD_CHE equ 512 ; ch_flag_en - ¢ë¡à ­ CheckBox ;CPP_MOD_EDIT_FIO equ 2 ;
CPP_MOD_TXT_ASCII_0 equ 1 ; ⥪áâ § ª ­ç¨¢. 0 ;CPP_MOD_RE_GR equ 1 ; £à ¤¨¥­â­ë© ¯àאַ㣮«ì­¨ª
CPP_MOD_TXT_TRAN equ 4 ; ⥪á⠯஧à ç­ë© BIT_MOD_BUT_NFON equ 0 ; á⨫ì Button ­¥ à¨á®¢ âì ª­®¯ªã
CPP_MOD_TXT_CHAR2 equ 2 ; ⥪áâ 2-¬ èà¨ä⮬ BIT_MOD_BUT_NBORD equ 1 ; á⨫ì Button ­¥ à¨á®¢ âì £à ­¨æã
CPP_MOD_EDIT_FOC equ 1 ; EditBox ¢ 䮪ãá¥
CPP_MOD_EDIT_FIO equ 2 ;
CPP_MOD_RE_GR equ 1 ; £à ¤¨¥­â­ë© ¯àאַ㣮«ì­¨ª
CPP_MOD_BUT_NFON equ 1 ; á⨫ì Button ­¥ à¨á®¢ âì ª­®¯ªã
CPP_MOD_BUT_NBORD equ 2 ; á⨫ì Button ­¥ à¨á®¢ âì £à ­¨æã
macro load_image_file path,buf,size ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨© macro load_image_file path,buf,size ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
{ {
@ -106,21 +101,20 @@ struct FileInfoBlock
ends ends
struct object struct object
c db ? ;0 id dd ? ;¨¤¥­â¨ä¨ª â®à ®¡ê¥ªâ 
txt rb MAX_LEN_OBJ_TXT ;1 txt rb MAX_LEN_OBJ_TXT ;⥪áâ®¢ë¥ á¢®©á⢠
lvl db 0 ;1+mt lvl db 0
clo db 0 ;2+mt clo db 0
rb 8 ;3+mt ­¥ ¨á¯®«ì§ã¥âáï, ®âáâ «®áì ®â Win ¢¥àᨨ typid dd ? ;­®¬¥à ®¡ê¥ªâ  ®¯à¥¤¥«ïî饣® ⨯ ¯¥à¥¬¥­­®©
typid dd ? ;3+8+mt modif dd ? ;¡¨â®¢ë¥ ᢮©á⢠
modif dd ? ;7+8+mt
ends ends
struct ObjOpt struct ObjOpt
db ? dd ?
bl_type db ? bl_type db ?
graph db ? graph db ?
info rb 30 info rb 30
caption rb 200 caption rb MAX_OPT_CAPTION
Col rw MAX_OPT_FIELDS Col rw MAX_OPT_FIELDS
img rw MAX_OPT_FIELDS ;¨­¤¥ªáë ª à⨭®ª (¢ ä ©«¥ 'icon.bmp') img rw MAX_OPT_FIELDS ;¨­¤¥ªáë ª à⨭®ª (¢ ä ©«¥ 'icon.bmp')
bit_prop dd 0 ;¡¨â®¢ë¥ ᢮©á⢠ bit_prop dd 0 ;¡¨â®¢ë¥ ᢮©á⢠
@ -151,6 +145,12 @@ icon_font_s1 dd 0 ;㪠
fn_syntax db 'asm.syn',0 ;¨¬ï § £à㦠¥¬®£® ä ©«  ᨭ⠪á¨á  fn_syntax db 'asm.syn',0 ;¨¬ï § £à㦠¥¬®£® ä ©«  ᨭ⠪á¨á 
;¬ ªà®á ¤«ï ¯à®¢¥àª¨ ¡¨â®¢®£® ᢮©á⢠
macro test_bool_prop obj_reg,n_prop
{
bt dword[obj_reg+u_object.modif-u_object],n_prop
}
include 'ced_wnd_m.inc' include 'ced_wnd_m.inc'
include 'ced_wnd_prop.inc' ;ä ©« á äã­ªæ¨ï¬¨ ®ª­  ᢮©á⢠®¡ê¥ªâ  include 'ced_wnd_prop.inc' ;ä ©« á äã­ªæ¨ï¬¨ ®ª­  ᢮©á⢠®¡ê¥ªâ 
include 'ced_constr.inc' ;ä ©« á äã­ªæ¨ï¬¨ ®ª­  ª®­áâàãªâ®à  include 'ced_constr.inc' ;ä ©« á äã­ªæ¨ï¬¨ ®ª­  ª®­áâàãªâ®à 
@ -268,8 +268,8 @@ start:
mov eax,obj_opt ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë mov eax,obj_opt ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
@@: @@:
mov bl,byte[eax] mov ebx,dword[eax]
cmp bl,0 cmp ebx,0
je @f je @f
;xor ecx,ecx ;¢ ecx ¡ã¤¥â ¨­¤¥ªá ¨ª®­ª¨ ;xor ecx,ecx ;¢ ecx ¡ã¤¥â ¨­¤¥ªá ¨ª®­ª¨
mov cx,word[eax+obj_opt.img-obj_opt] mov cx,word[eax+obj_opt.img-obj_opt]
@ -617,8 +617,8 @@ but_open_proj:
stdcall dword[tl_info_clear], tree2 stdcall dword[tl_info_clear], tree2
mov eax,ced_info ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë mov eax,ced_info ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
@@: @@:
mov bl,byte[eax] mov ebx,dword[eax]
cmp bl,0 cmp ebx,0
je @f je @f
call find_obj_in_opt ;edi = pointer to ObjOpt struct call find_obj_in_opt ;edi = pointer to ObjOpt struct
@ -629,10 +629,10 @@ but_open_proj:
xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬ xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
.zero: .zero:
shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨ shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨
mov cl,byte[eax+1+MAX_LEN_OBJ_TXT] ;ã஢¥­ì ®¡ê¥ªâ  mov cl,byte[eax++u_object.lvl-u_object] ;ã஢¥­ì ®¡ê¥ªâ 
;tl_node_close_open - ­¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ­  ã§«ë ¨¬¥î騥 ¤®ç¥à­¨¥ ;tl_node_close_open - ­¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ­  ã§«ë ¨¬¥î騥 ¤®ç¥à­¨¥
mov ch,byte[eax+2+MAX_LEN_OBJ_TXT] ;§ ªàëâë©/®âªàëâë© mov ch,byte[eax++u_object.clo-u_object] ;§ ªàëâë©/®âªàëâë©
stdcall dword[tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ stdcall dword[tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
@ -666,34 +666,33 @@ but_save_proj:
pop esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  pop esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
mov bl,byte[edx+2] ;bl - ã஢¥­ì ®¡ê¥ªâ  mov bl,byte[edx+2] ;bl - ã஢¥­ì ®¡ê¥ªâ 
mov byte[esi+1+MAX_LEN_OBJ_TXT],bl mov byte[esi+u_object.lvl-u_object],bl
mov bl,byte[edx+3] ;bl - ®âªàë⨥/§ ªàë⨥ ®¡ê¥ªâ  mov bl,byte[edx+3] ;bl - ®âªàë⨥/§ ªàë⨥ ®¡ê¥ªâ 
mov byte[esi+2+MAX_LEN_OBJ_TXT],bl mov byte[esi+u_object.clo-u_object],bl
;¢ëç¨á«ï¥¬ ­®¢ë© ¨­¤¥ªá ¤«ï ⨯  ®¡ê¥ªâ  ;¢ëç¨á«ï¥¬ ­®¢ë© ¨­¤¥ªá ¤«ï ⨯  ®¡ê¥ªâ 
mov ebx,[esi+3+8+MAX_LEN_OBJ_TXT] ;ebx - ⨯ ®¡ê¥ªâ  mov ebx,[esi+u_object.typid-u_object] ;ebx - ⨯ ®¡ê¥ªâ 
;á®å࠭塞 ⨯ ®¡ê¥ªâ  ;á®å࠭塞 ⨯ ®¡ê¥ªâ 
push ebx push ebx
imul ebx,sizeof.TreeList imul ebx,sizeof.TreeList
add ebx,[tree2.data_nodes] ;ebx - 㪠§ â¥«ì ®¡ê¥ªâ 㪠§ë¢ î騩 ⨯ add ebx,[tree2.data_nodes] ;ebx - 㪠§ â¥«ì ®¡ê¥ªâ 㪠§ë¢ î騩 ⨯
stdcall get_obj_npp,ebx stdcall get_obj_npp,ebx
mov [esi+3+8+MAX_LEN_OBJ_TXT],eax mov [esi+u_object.typid-u_object],eax
mov eax,esi mov eax,esi
;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ­¥­¨ï ;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ­¥­¨ï
xor ecx,ecx xor ecx,ecx
mov cx,word[tree2.info_size] mov cx,word[tree2.info_size]
cld cld
rep movsb rep movsb
;¢®ááâ ­ ¢«¨¢ ¥¬ ⨯ ®¡ê¥ªâ  ;¢®ááâ ­ ¢«¨¢ ¥¬ ⨯ ®¡ê¥ªâ 
pop dword[eax+3+8+MAX_LEN_OBJ_TXT] pop dword[eax+u_object.typid-u_object]
stdcall [tl_node_poi_get_next_info], edx,tree2 stdcall [tl_node_poi_get_next_info], edx,tree2
pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b jmp @b
@@: @@:
mov byte[edi],0 mov dword[edi],0 ;¬¥âª  ª®­æ  ä ©« 
inc edi add edi,4
mov ecx,edi mov ecx,edi
sub ecx,ced_info ;ecx - à §¬¥à á®å࠭塞®£® ä ©«  sub ecx,ced_info ;ecx - à §¬¥à á®å࠭塞®£® ä ©« 
@ -807,30 +806,6 @@ on_file_object_select:
;call draw_window ;call draw_window
ret ret
align 4
proc set_obj_win_param, col:dword, edit:dword
pushad
stdcall get_obj_text_col, [foc_obj], [col] ;edx - text
stdcall get_obj_text_len_col, [foc_obj], [col] ;eax - ¤«¨­­  ¯®«ï
mov edi,[edit]
cmp eax,1
jl @f
dec eax
mov ed_max,eax ;ed_max = edi+.max
mov ed_focus_border_color, dword 0xff
mov ed_blur_border_color, dword 0x808080
stdcall [edit_box_set_text], edi,edx ;®¡­®¢«ï¥¬ editbox
jmp .end_f
@@:
mov ed_max,dword MAX_LEN_OBJ_TXT
mov ed_focus_border_color, dword 0xffffff ;¤¥« ¥¬ ­¥¢¨¤¨¬ãî  ªâ¨¢­ãî à ¬ªã
mov ed_blur_border_color, dword 0xffffff ;¤¥« ¥¬ ­¥¢¨¤¨¬ãî ä®­®¢ãî à ¬ªã
stdcall [edit_box_set_text], edi,txt_null
.end_f:
popad
ret
endp
;äã­ªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ ­ ¦ â¨¨ Enter ¢ ®ª­¥ tree1 ;äã­ªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ ­ ¦ â¨¨ Enter ¢ ®ª­¥ tree1
;¤®¡ ¢«ï¥â ­®¢ë© ®¡ê¥ªâ ¢ ®ª­® tree2 ;¤®¡ ¢«ï¥â ­®¢ë© ®¡ê¥ªâ ¢ ®ª­® tree2
align 4 align 4
@ -844,8 +819,8 @@ push eax ebx ecx
mov cx,word[eax+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ  mov cx,word[eax+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ 
shl ecx,16 shl ecx,16
stdcall mem_clear, u_object,sizeof.object stdcall mem_clear, u_object,sizeof.object
mov bl,byte[eax] mov ebx,dword[eax]
mov byte[u_object.c],bl mov dword[u_object.id],ebx
stdcall dword[tl_node_add], u_object, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ stdcall dword[tl_node_add], u_object, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
@@: @@:
pop ecx ebx eax pop ecx ebx eax
@ -956,11 +931,11 @@ mouse_dd dd ?
el_focus dd tree1 el_focus dd tree1
;¤¥à¥¢® ᮠᯨ᪮¬ ¢®§¬®¦­ëå ⨯®¢ ®¡ê¥ªâ®¢ ;¤¥à¥¢® ᮠᯨ᪮¬ ¢®§¬®¦­ëå ⨯®¢ ®¡ê¥ªâ®¢
tree1 tree_list sizeof.ObjOpt,20+2, tl_key_no_edit+tl_draw_par_line+tl_list_box_mode,\ tree1 tree_list sizeof.ObjOpt,20+2, tl_key_no_edit+tl_draw_par_line+tl_list_box_mode,\
16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,50,125,280, 0,3,0, el_focus,\ 16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,50,125,280, 0,obj_opt.info-obj_opt,0, el_focus,\
w_scr_t1,on_add_object w_scr_t1,on_add_object
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥ ;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
tree2 tree_list sizeof.object,MAX_CED_OBJECTS+2, tl_draw_par_line,\ tree2 tree_list sizeof.object,MAX_CED_OBJECTS+2, tl_draw_par_line,\
16,16, 0xffffff,0xb0d0ff,0xd000ff, 155,50,130,280, 13,1,MAX_LEN_OBJ_TXT, el_focus,\ 16,16, 0xffffff,0xb0d0ff,0xd000ff, 155,50,130,280, 13,u_object.txt-u_object,MAX_LEN_OBJ_TXT, el_focus,\
w_scr_t2,on_file_object_select w_scr_t2,on_file_object_select
msgbox_0: msgbox_0:
@ -1168,6 +1143,7 @@ obj_opt ObjOpt
cur_x dd 0 cur_x dd 0
cur_y dd 0 cur_y dd 0
foc_obj dd 0 ;®¡ê¥ªâ ¢ 䮪ãᥠfoc_obj dd 0 ;®¡ê¥ªâ ¢ 䮪ãá¥
obj_count_txt_props dd 0 ;ª®«¨ç¥á⢮ ¨á¯®«ì§ã¥¬ëå ⥪á⮢ëå ᢮©áâ¢
obj_m_win dd 0 ;áâàãªâãà  £« ¢­®£® ®ª­  obj_m_win dd 0 ;áâàãªâãà  £« ¢­®£® ®ª­ 
; ;

View File

@ -2,15 +2,15 @@
include 'obj_codes.inc' include 'obj_codes.inc'
macro ObjOpt c,bl_type,graph,info,caption,Col,img,bit_prop macro ObjOpt id,bl_type,graph,info,caption,Col,img,bit_prop
{ {
db c dd id
db bl_type db bl_type
db graph db graph
@@: db info @@: db info
rb @b+30-$ rb @b+30-$
@@: db caption @@: db caption
rb @b+MAX_LEN_OBJ_TXT-$ rb @b+MAX_OPT_CAPTION-$
dw Col dw Col
dw img ;¨­¤¥ªáë ª à⨭®ª (¢ ä ©«¥ 'icon.bmp') dw img ;¨­¤¥ªáë ª à⨭®ª (¢ ä ©«¥ 'icon.bmp')
dd bit_prop+0 dd bit_prop+0
@ -33,7 +33,8 @@ ObjOpt C_BUT, 1,1,'
<20, 40, 60, 80,100,120, 0, 0, 0, 0, 0>,\ <20, 40, 60, 80,100,120, 0, 0, 0, 0, 0>,\
<29, 15, 16, 26, 27, 25, -1, -1, -1, -1,-1>,\ <29, 15, 16, 26, 27, 25, -1, -1, -1, -1,-1>,\
txt_bit_but txt_bit_but
ObjOpt C_EDB, 1,1,'’¥ªá⮢®¥ ¯®«¥','***®âáâ㯠ᢥàåã*梥â ä®­ *梥⠢뤥«¥­¨ï ¯à¨ 㤥ন¢ ­¨¨ shift ¨«¨ ¬ë誮©*梥â à ¬ª¨*¯à¨ ­¥ ªâ¨¢­®¬ ¡®ªá¥ 梥â à ¬ª¨*梥â ⥪áâ *¬ ªá¨¬ «ì­ ï ¤«¨­  ⥪áâ *­ ç «ì­ë© ⥪áâ',\ ObjOpt C_EDB, 1,1,'’¥ªá⮢®¥ ¯®«¥',\
'¨¬ï áâàãªâãàë editbox*è¨à¨­  ¯®«ï*®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*梥â ä®­ *梥⠢뤥«¥­¨ï ¯à¨ 㤥ন¢ ­¨¨ shift ¨«¨ ¬ë誮©*梥â à ¬ª¨*梥â à ¬ª¨ ¯à¨ ­¥ ªâ¨¢­®¬ ¯®«¥*梥â ⥪áâ *¬ ªá¨¬ «ì­ ï ¤«¨­  ⥪áâ *­ ç «ì­ë© ⥪áâ',\
<30, 40, 50, 60, 80,100,120,140,160,170, 0>,\ <30, 40, 50, 60, 80,100,120,140,160,170, 0>,\
<10, 26, 15, 16, 25, 25, 25, 25, 25, -1, 4>,\ <10, 26, 15, 16, 25, 25, 25, 25, 25, -1, 4>,\
txt_bit_edit txt_bit_edit
@ -47,7 +48,7 @@ ObjOpt C_CHB, 1,1,'
ObjOpt C_TXT, 1,0,'asm ª®¤','',\ ObjOpt C_TXT, 1,0,'asm ª®¤','',\
< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\ < 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
<11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> <11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_WND, 1,1,'Žª­®','**®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*è¨à¨­ *¢ëá®â *梥⠪«¨¥­â᪮© ®¡« áâ¨*梥⠧ £®«®¢ª  (¥á«¨ ¥áâì)',\ ObjOpt C_WND, 1,1,'Žª­®','§ £®«®¢®ª ®ª­ *áâ¨«ì ®ª­ *®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*è¨à¨­ *¢ëá®â *梥⠪«¨¥­â᪮© ®¡« áâ¨*梥⠧ £®«®¢ª  (¥á«¨ ¥áâì)',\
<98,100,110,120,130,150,170, 0, 0, 0, 0>,\ <98,100,110,120,130,150,170, 0, 0, 0, 0>,\
<12, -1, 15, 16, 26, 27, 25, 25, -1, -1, -1>,\ <12, -1, 15, 16, 26, 27, 25, 25, -1, -1, -1>,\
txt_bit_wnd txt_bit_wnd

View File

@ -2,22 +2,23 @@
; ¢ םג®¬ ה ©«¥ ב®<EFBFBD>א ­כ ×®¤כ ®<EFBFBD>ך¥×ג®¢ ; ¢ םג®¬ ה ©«¥ ב®<EFBFBD>א ­כ ×®¤כ ®<EFBFBD>ך¥×ג®¢
; ;
C_TDF equ 't' ;typedef C_TDF equ 'Type' ;typedef
C_ACO equ 'a' ; ¢â®¬ â¨ç¥áª¨¥ ª®¤ë (auto code) C_ACO equ ('a' shl 24) ; ¢â®¬ â¨ç¥áª¨¥ ª®¤ë (auto code)
C_STR equ 's' ;struct C_STR equ ('s' shl 24) ;struct
C_INC equ '#' ;include C_INC equ ('#' shl 24) ;include
C_TXT equ 'd' ;¡«®ª ª®¤  (¤ ­­ëå) C_TXT equ ('d' shl 24) ;¡«®ª ª®¤  (¤ ­­ëå)
C_VAR equ '-' ;¯¥à¥¬¥­­ ï C_VAR equ ('-' shl 24) ;¯¥à¥¬¥­­ ï
C_COM equ ';' ;ª®¬¬¥­â à¨© C_COM equ (';' shl 24) ;ª®¬¬¥­â à¨©
C_WND equ 'w' ;®ª­® C_WND equ ('w' shl 24) ;®ª­®
C_CHB equ 'c' ;CheckBox C_CHB equ ('c' shl 24) ;CheckBox
C_OPT equ 'o' ;OptionBox C_OPT equ ('o' shl 24) ;OptionBox
C_EDB equ 'e' ;EditBox C_EDB equ ('e' shl 24) ;EditBox
C_BUT equ 'b' ;Button C_BUT equ ('b' shl 24) ;Button
C_DTT equ 'x' ;à¨á®¢ âì ⥪áâ C_DTT equ ('x' shl 24) ;à¨á®¢ âì ⥪áâ
C_REC equ 'r' ;à¨á®¢ âì ¯àאַ㣮«ì­¨ª C_REC equ 'Rect' ;à¨á®¢ âì ¯àאַ㣮«ì­¨ª
C_KEY equ 'k' ;ª« ¢¨ âãà  C_KEY equ ('k' shl 24) ;ª« ¢¨ âãà 
C_LIB equ 'l' ;¡¨¡«¨®â¥ª  C_LIB equ 'Libr' ;¡¨¡«¨®â¥ª 
C_IFN equ 'f' ;¡¨¡«¨®â¥ç­ ï ¯®¤ª«îç ¥¬ ï äã­ªæ¨ï C_IFN equ ('f' shl 24) ;¡¨¡«¨®â¥ç­ ï ¯®¤ª«îç ¥¬ ï äã­ªæ¨ï
MAX_LEN_OBJ_TXT equ 200 MAX_LEN_OBJ_TXT equ 200 ;¬ ªá¨¬ «ì­ ï ¤«¨­­  ⥪á⮢ëå ª ᢮©á⢠®¡ê¥ªâ 
MAX_OPT_CAPTION equ 250 ;¬ ªá¨¬ «ì­ ï ¤«¨­­  ¯®¤¯¨á¥© ª ᢮©á⢠¬ ®¡ê¥ªâ 

View File

@ -1045,12 +1045,15 @@ proc buf_line_h, buf_struc:dword, coord_x0:dword, coord_y0:dword, coord_x1:dword
mov ecx,dword[coord_y0] mov ecx,dword[coord_y0]
mov edx,dword[color] mov edx,dword[color]
mov esi,dword[coord_x1] mov esi,dword[coord_x1]
cmp ebx,esi
jle @f
xchg ebx,esi ;¥á«¨ x0 > x1 â® ¬¥­ï¥¬ ¬¥áâ ¬¨ x0 ¨ x1
@@: ;for (x=x0 ; x<x1; x++) ;------------------------------------ @@: ;横« ¯® ®á¨ x ®â x0 ¤® x1
call draw_pixel
inc ebx
cmp ebx,esi cmp ebx,esi
jge @f jge @f
call draw_pixel
inc ebx
jmp @b jmp @b
@@: @@:
.end24: .end24:
@ -1099,6 +1102,8 @@ pushad
mov edx,[w] mov edx,[w]
add edx,eax add edx,eax
mov ecx,[h] mov ecx,[h]
cmp ecx,1 ;áà ¢­¥­¨¥ á ¬¨­¨¬ «ì­® ¢®§¬®¦­®© ¢ëá®â®©
jl .coord_end ;¥á«¨ ¢ëá®â  ¬¥­ìè¥ 1-£® ¯¨ªá¥«ï
mov esi,dword[color] mov esi,dword[color]
cld cld
@@: @@: