forked from KolibriOS/kolibrios
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:
parent
d93ba1183b
commit
8cc2207bd7
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 42 KiB |
Binary file not shown.
@ -164,9 +164,12 @@ push ebx
|
||||
cmp eax,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[eax],C_STR
|
||||
cmp dword[eax],C_STR
|
||||
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
|
||||
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
cmp esi,0
|
||||
@ -178,34 +181,34 @@ push ebx
|
||||
call code_gen_obj ;ðåêóðñèâíûé âûçîâ äî÷åðíèõ îáúåêòîâ
|
||||
pop bx
|
||||
.end_st:
|
||||
stdcall [ted_text_add], tedit0,txt_ends,6,ted_opt_ed_move_cursor
|
||||
stdcall insert_text,txt_ends
|
||||
jmp .beg_iterat
|
||||
@@:
|
||||
cmp byte[eax],C_TXT
|
||||
cmp dword[eax],C_TXT
|
||||
jne @f
|
||||
stdcall get_code_text,eax ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
cmp byte[eax],C_INC
|
||||
cmp dword[eax],C_INC
|
||||
jne @f
|
||||
stdcall get_code_incl,eax ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
cmp byte[eax],C_COM
|
||||
cmp dword[eax],C_COM
|
||||
jne @f
|
||||
stdcall get_code_comment,eax ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
cmp byte[eax],C_VAR
|
||||
cmp dword[eax],C_VAR
|
||||
jne @f
|
||||
stdcall get_code_variable,eax,ebx ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
cmp byte[eax],C_WND
|
||||
cmp dword[eax],C_WND
|
||||
jne @f
|
||||
stdcall get_code_window,eax ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
cmp byte[eax],C_ACO
|
||||
cmp dword[eax],C_ACO
|
||||
jne @f
|
||||
stdcall get_code_auto,eax ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
cmp byte[eax],C_KEY ;êëàâèàòóðà
|
||||
cmp dword[eax],C_KEY ;êëàâèàòóðà
|
||||
jne @f
|
||||
stdcall get_code_key,eax ;îáðàáîòêà îáúåêòà
|
||||
@@:
|
||||
@ -218,17 +221,14 @@ push ebx
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
|
||||
;äîáàâëåíèå îáúåêòà ñ ïðîãðàìíûì êîäîì (òåêñòîì)
|
||||
align 4
|
||||
proc get_code_text, p_obj:dword
|
||||
pushad
|
||||
;pushad
|
||||
insert_nl
|
||||
mov ebx,dword[p_obj]
|
||||
stdcall get_obj_text_col,ebx,0
|
||||
stdcall str_len,edx
|
||||
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
|
||||
stdcall insert_text_prop, dword[p_obj],0
|
||||
insert_nl
|
||||
popad
|
||||
;popad
|
||||
ret
|
||||
endp
|
||||
|
||||
@ -238,13 +238,12 @@ proc get_code_auto, p_obj:dword
|
||||
pushad
|
||||
insert_nl
|
||||
mov ebx,dword[p_obj]
|
||||
mov ecx,dword[ebx+u_object.modif-u_object]
|
||||
bt ecx,BIT_MOD_ACM
|
||||
test_bool_prop ebx,BIT_MOD_ACM
|
||||
jae @f
|
||||
;àâòîìàòè÷åñêèå ñîáûòèÿ îò ìûøè
|
||||
call get_code_auto_m
|
||||
@@:
|
||||
bt ecx,BIT_MOD_ABU
|
||||
test_bool_prop ebx,BIT_MOD_ABU
|
||||
jae @f
|
||||
;ñîçäàíèå ôóíêöèè button
|
||||
insert_but_beg
|
||||
@ -252,13 +251,12 @@ proc get_code_auto, p_obj:dword
|
||||
insert_but_end
|
||||
call get_code_a_but_fun ;êîäû ôóíêöèé, âûçûâàåìûõ ïðè íàæàòèè êíîïîê
|
||||
@@:
|
||||
bt ecx,BIT_MOD_ACD
|
||||
test_bool_prop ebx,BIT_MOD_ACD
|
||||
jae @f
|
||||
call get_code_auto_data_el
|
||||
call get_code_auto_data_dop
|
||||
|
||||
xor edx,edx
|
||||
mov dl,C_LIB
|
||||
mov edx,C_LIB
|
||||
stdcall find_obj_in_file,edx ;eax - óêàçàòåëü íà ñòðóêòóðó áèáëèîòåêè
|
||||
cmp eax,0
|
||||
je @f
|
||||
@ -298,7 +296,7 @@ proc get_code_auto_m
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_EDB
|
||||
cmp dword[ebx],C_EDB
|
||||
jne @f
|
||||
stdcall insert_text, txt_std_mouse_ed
|
||||
;insert_sp
|
||||
@ -307,7 +305,7 @@ proc get_code_auto_m
|
||||
stdcall [ted_text_add], tedit0,edx,eax,ted_opt_ed_move_cursor
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_CHB
|
||||
cmp dword[ebx],C_CHB
|
||||
jne @f
|
||||
stdcall insert_text, txt_std_mouse_cb
|
||||
;insert_sp
|
||||
@ -343,7 +341,7 @@ proc get_code_auto_data_el
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_EDB
|
||||
cmp dword[ebx],C_EDB
|
||||
jne @f
|
||||
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
|
||||
stdcall insert_text_prop, ebx,0
|
||||
@ -396,7 +394,7 @@ proc get_code_auto_data_el
|
||||
.null_string:
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_DTT
|
||||
cmp dword[ebx],C_DTT
|
||||
jne @f
|
||||
stdcall insert_text, txt_txt
|
||||
mov edx,fp_icon
|
||||
@ -433,7 +431,7 @@ proc get_code_auto_data_libs_param
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_LIB
|
||||
cmp dword[ebx],C_LIB
|
||||
jne @f
|
||||
;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
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_LIB
|
||||
cmp dword[ebx],C_LIB
|
||||
jne @f
|
||||
;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
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_LIB
|
||||
cmp dword[ebx],C_LIB
|
||||
jne @f
|
||||
;0,1,2,3,4,5 - l_nam,s_dir,i_met,...
|
||||
stdcall insert_text, txt_align_4
|
||||
@ -609,7 +607,7 @@ pushad
|
||||
pop ecx ;ïîëó÷àåì äàííûå óçëà
|
||||
cmp ecx,0
|
||||
je @f
|
||||
cmp byte[ecx],C_IFN
|
||||
cmp dword[ecx],C_IFN
|
||||
jne @b
|
||||
;âñòàâêà óêàçàòåëÿ íà ôóíêöèþ
|
||||
insert_tab
|
||||
@ -633,7 +631,7 @@ pushad
|
||||
pop ecx ;ïîëó÷àåì äàííûå óçëà
|
||||
cmp ecx,0
|
||||
je @f
|
||||
cmp byte[ecx],C_IFN
|
||||
cmp dword[ecx],C_IFN
|
||||
jne @b
|
||||
;âñòàâêà èìåíè èìïîðòèðîâàííîé ôóíêöèè
|
||||
insert_tab
|
||||
@ -666,7 +664,7 @@ proc get_code_auto_data_dop
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_EDB
|
||||
cmp dword[ebx],C_EDB
|
||||
jne @f
|
||||
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
|
||||
stdcall insert_text, txt_txt
|
||||
@ -717,9 +715,6 @@ proc get_code_auto_data_dop
|
||||
insert_0
|
||||
insert_nl
|
||||
@@:
|
||||
;cmp byte[ebx],C_CHB
|
||||
;jne @f
|
||||
;@@:
|
||||
|
||||
stdcall dword[tl_node_poi_get_next_info], esi,tree2
|
||||
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
@ -745,7 +740,7 @@ proc get_code_auto_but
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_BUT
|
||||
cmp dword[ebx],C_BUT
|
||||
jne @f
|
||||
insert_tab
|
||||
insert_cmp
|
||||
@ -797,7 +792,7 @@ proc get_code_a_but_fun
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_BUT
|
||||
cmp dword[ebx],C_BUT
|
||||
jne @f
|
||||
stdcall get_obj_text_col,ebx,6
|
||||
stdcall str_len,edx
|
||||
@ -851,7 +846,7 @@ proc get_code_funct_key
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_EDB
|
||||
cmp dword[ebx],C_EDB
|
||||
jne @f
|
||||
stdcall insert_text, txt_std_key_ed
|
||||
stdcall insert_text_prop,ebx,0
|
||||
@ -984,20 +979,20 @@ proc get_code_draw_obj
|
||||
cmp ebx,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[ebx],C_EDB
|
||||
cmp dword[ebx],C_EDB
|
||||
jne @f
|
||||
stdcall insert_text, txt_editb_draw
|
||||
stdcall insert_text_prop, ebx,0
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_CHB
|
||||
cmp dword[ebx],C_CHB
|
||||
jne @f
|
||||
stdcall insert_text, txt_cbox_draw
|
||||
stdcall insert_text_prop, ebx,0
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_BUT
|
||||
jne @f
|
||||
cmp dword[ebx],C_BUT
|
||||
jne .ob_draw_but
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_eax
|
||||
@ -1028,13 +1023,16 @@ proc get_code_draw_obj
|
||||
insert_reg txt_edx
|
||||
insert_coma
|
||||
stdcall insert_text_prop, ebx,0
|
||||
insert_nl
|
||||
|
||||
insert_tab
|
||||
stdcall insert_text, txt_or
|
||||
insert_reg txt_edx
|
||||
insert_coma
|
||||
stdcall insert_text, txt_but_create
|
||||
test_bool_prop ebx,BIT_MOD_BUT_NFON
|
||||
jnc @f
|
||||
stdcall insert_text, txt_plus
|
||||
stdcall insert_text, txt_bit_30
|
||||
@@:
|
||||
test_bool_prop ebx,BIT_MOD_BUT_NBORD
|
||||
jnc @f
|
||||
stdcall insert_text, txt_plus
|
||||
stdcall insert_text, txt_bit_29
|
||||
@@:
|
||||
insert_nl
|
||||
|
||||
insert_tab
|
||||
@ -1047,8 +1045,8 @@ proc get_code_draw_obj
|
||||
insert_tab
|
||||
stdcall insert_text, txt_i_40
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_REC
|
||||
.ob_draw_but:
|
||||
cmp dword[ebx],C_REC
|
||||
jne @f
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
@ -1087,8 +1085,8 @@ proc get_code_draw_obj
|
||||
stdcall insert_text, txt_i_40
|
||||
insert_nl
|
||||
@@:
|
||||
cmp byte[ebx],C_DTT ;ðèñîâàíèå òåêñòà ÷åðåç ñèñò. ô. 4
|
||||
jne @f
|
||||
cmp dword[ebx],C_DTT ;ðèñîâàíèå òåêñòà ÷åðåç ñèñò. ô. 4
|
||||
jne .ob_draw_text
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_eax
|
||||
@ -1110,10 +1108,26 @@ proc get_code_draw_obj
|
||||
insert_reg txt_ecx
|
||||
insert_coma
|
||||
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
|
||||
|
||||
;or ecx,0x80000000
|
||||
|
||||
insert_tab
|
||||
stdcall insert_text, txt_mov
|
||||
insert_reg txt_edx
|
||||
@ -1125,11 +1139,20 @@ proc get_code_draw_obj
|
||||
insert_nl
|
||||
|
||||
;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
|
||||
stdcall insert_text, txt_i_40
|
||||
insert_nl
|
||||
@@:
|
||||
.ob_draw_text:
|
||||
|
||||
stdcall dword[tl_node_poi_get_next_info], esi,tree2
|
||||
pop esi ;ïåðåõîäèì ê ñëåäóùåìó óçëó
|
||||
@ -1140,22 +1163,6 @@ proc get_code_draw_obj
|
||||
ret
|
||||
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
|
||||
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]
|
||||
cmp cl,0
|
||||
je .no_tab ;èçáåãàåì çàöèêëèâàíèÿ (0-1 = 2^32-1)
|
||||
and cx,0xff
|
||||
and ecx,0xff
|
||||
cld
|
||||
@@:
|
||||
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_head_i db 'head_f_i',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_struct db 'struct ',0
|
||||
txt_met_end db '.end',0
|
||||
|
@ -23,8 +23,7 @@ pushad
|
||||
jmp .end_draw
|
||||
@@:
|
||||
|
||||
xor edx,edx
|
||||
mov dl,C_WND
|
||||
mov edx,C_WND
|
||||
stdcall find_obj_in_file,edx ;eax - 㪠§ ⥫ì áâàãªâãàã ®ª
|
||||
cmp eax,0
|
||||
je .end_draw
|
||||
@ -80,16 +79,16 @@ pushad
|
||||
stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;¯à®à¨á®¢ª ¯à ¢®£® ᪨
|
||||
.end_skin:
|
||||
|
||||
xor edx,edx ;à¨á㥬 £à ä¨ç¥áª¨¥ í«¥¬¥âë
|
||||
mov dl,C_BUT
|
||||
;à¨á㥬 £à ä¨ç¥áª¨¥ í«¥¬¥âë
|
||||
mov edx,C_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
|
||||
mov dl,C_CHB
|
||||
mov edx,C_CHB
|
||||
stdcall draw_arr_objects, edx,draw_obj_check
|
||||
mov dl,C_DTT
|
||||
mov edx,C_DTT
|
||||
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
|
||||
|
||||
.end_draw:
|
||||
@ -142,7 +141,13 @@ endl
|
||||
mov ecx,eax
|
||||
stdcall get_obj_text_col,ebx,5
|
||||
stdcall conv_str_to_int,edx
|
||||
stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
|
||||
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
|
||||
@@:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
@ -29,14 +29,14 @@ pop edi esi ecx
|
||||
align 4
|
||||
but_obj_paste:
|
||||
push eax ebx ecx edi
|
||||
mov eax,[tree2.data_info] ;¤ ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ¨ï
|
||||
mov bl,byte[eax]
|
||||
call find_obj_in_opt
|
||||
xor ecx,ecx
|
||||
mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨¤¥ªá £« ¢®© ¨ª®ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ
|
||||
shl ecx,16
|
||||
stdcall [tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
stdcall [tl_draw], tree2
|
||||
mov eax,[tree2.data_info] ;¤ ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ¨ï
|
||||
mov ebx,dword[eax]
|
||||
call find_obj_in_opt
|
||||
xor ecx,ecx
|
||||
mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨¤¥ªá £« ¢®© ¨ª®ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ
|
||||
shl ecx,16
|
||||
stdcall [tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
stdcall [tl_draw], tree2
|
||||
pop edi ecx ebx eax
|
||||
ret
|
||||
|
||||
@ -114,23 +114,21 @@ get_obj_win_param:
|
||||
align 4
|
||||
proc get_obj_text_col, obj:dword, ind:dword
|
||||
mov edx,dword[obj]
|
||||
inc edx ;goto text
|
||||
push ebx
|
||||
mov ebx,dword[ind]
|
||||
cmp bx,0
|
||||
add edx,4 ;goto text
|
||||
push ebx ecx
|
||||
mov ecx,dword[ind]
|
||||
cmp cx,0
|
||||
je .end_fun
|
||||
|
||||
shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ®¬¥à ¨áª®¬®© ª®«®ª¨
|
||||
mov bl,byte[edx-1] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ
|
||||
mov ebx,dword[edx-4] ;¢ ebx ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ
|
||||
|
||||
push ecx edi
|
||||
push edi
|
||||
call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ
|
||||
|
||||
add edi,obj_opt.Col-obj_opt
|
||||
dec bh
|
||||
and ebx,0xff00
|
||||
shr ebx,7 ;ᤢ¨£ ¥¬ 7, â.ª. 㦮 § 票¥ bh 㬮¦¥®¥ 2
|
||||
add edi,ebx ;+ ¡ë¢è¥¥ bh*2
|
||||
dec ecx
|
||||
shl ecx,1 ;㬮¦ ¥¬ 2
|
||||
add edi,ecx ;+ ind*2
|
||||
xor ecx,ecx
|
||||
mov cx,word[edi] ;ecx - ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï
|
||||
add edx,ecx
|
||||
@ -144,9 +142,9 @@ push ebx
|
||||
mov edx,0 ;not text
|
||||
@@:
|
||||
|
||||
pop edi ecx
|
||||
pop edi
|
||||
.end_fun:
|
||||
pop ebx
|
||||
pop ecx ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
@ -158,20 +156,17 @@ endp
|
||||
align 4
|
||||
proc get_obj_text_len_col, obj:dword, ind:dword
|
||||
xor eax,eax
|
||||
push ebx
|
||||
mov ebx,dword[ind]
|
||||
shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ®¬¥à ¨áª®¬®© ª®«®ª¨
|
||||
push ebx ecx edi
|
||||
mov ecx,dword[ind]
|
||||
mov eax,dword[obj]
|
||||
mov bl,byte[eax] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ
|
||||
mov ebx,dword[eax] ;¢ ebx ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ
|
||||
xor eax,eax
|
||||
|
||||
push edi
|
||||
call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ
|
||||
|
||||
add edi,obj_opt.Col-obj_opt
|
||||
and ebx,0xff00
|
||||
shr ebx,7 ;ᤢ¨£ ¥¬ 7, â.ª. 㦮 § 票¥ bh 㬮¦¥®¥ 2
|
||||
add edi,ebx ;+ ¡ë¢è¥¥ bh*2
|
||||
shl ecx,1 ;㬮¦ ¥¬ 2
|
||||
add edi,ecx ;+ ind*2
|
||||
|
||||
mov ax,word[edi] ;eax - ᤨ£ ¤«ï á«¥¤ã饣® ¯®«ï
|
||||
cmp ax,0
|
||||
@ -191,9 +186,8 @@ push ebx
|
||||
mov eax,0 ;not text
|
||||
@@:
|
||||
|
||||
pop edi
|
||||
.end_fun:
|
||||
pop ebx
|
||||
pop edi ecx ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
@ -201,7 +195,7 @@ align 4
|
||||
proc draw_obj_icon, o_type:dword,n_col:dword, coord_y:dword
|
||||
pushad
|
||||
xor ebx,ebx
|
||||
mov bl,byte[o_type]
|
||||
mov ebx,dword[o_type]
|
||||
call find_obj_in_opt
|
||||
|
||||
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
|
||||
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
|
||||
proc draw_icon, ind:dword,coord_x:dword,coord_y:dword
|
||||
pushad
|
||||
@ -301,16 +247,16 @@ proc draw_icon, ind:dword,coord_x:dword,coord_y:dword
|
||||
endp
|
||||
|
||||
;input
|
||||
; bl = cod object
|
||||
; ebx = cod object
|
||||
;output:
|
||||
; edi = pointer to option struct
|
||||
align 4
|
||||
find_obj_in_opt:
|
||||
push ecx
|
||||
xor ecx,ecx ;find 'bl' in options
|
||||
xor ecx,ecx ;find 'ebx' in options
|
||||
mov edi,obj_opt
|
||||
@@:
|
||||
cmp bl,[edi] ;find
|
||||
cmp ebx,dword[edi] ;find
|
||||
je @f
|
||||
inc ecx
|
||||
cmp ecx,MAX_OBJ_TYPES
|
||||
@ -343,7 +289,7 @@ push ebx esi
|
||||
cmp eax,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[eax],bl ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
|
||||
cmp dword[eax],ebx ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
|
||||
je .find_yes
|
||||
|
||||
stdcall dword[tl_node_poi_get_next_info], esi,tree2
|
||||
@ -370,7 +316,7 @@ push ebx esi
|
||||
cmp dword[obj_find_last],0
|
||||
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
|
||||
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
|
||||
@ -384,7 +330,7 @@ push ebx esi
|
||||
cmp eax,0
|
||||
je .find_no
|
||||
|
||||
cmp byte[eax],bl ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
|
||||
cmp dword[eax],ebx ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
|
||||
je .find_yes
|
||||
|
||||
stdcall dword[tl_node_poi_get_next_info], esi, tree2
|
||||
|
@ -15,6 +15,8 @@ prop_start:
|
||||
pushad
|
||||
mcall 40,0x27 ;¬ ᪠®¦¨¤ ¥¬ëå ᮡë⨩
|
||||
|
||||
call init_obj_count_txt_props ;¯®«ãç ¥¬ ç¨á«® ¨á¯®«ì§ã¥¬ëå ¯®«¥©
|
||||
|
||||
; áâனª ⥪á⮢ëå ¯®«¥©
|
||||
xor ebx,ebx
|
||||
mov edi,edit2
|
||||
@ -35,7 +37,7 @@ pushad
|
||||
mov dword[tree3.data_img_sys],eax
|
||||
|
||||
mov edx,[foc_obj]
|
||||
cmp byte[edx],C_VAR
|
||||
cmp dword[edx],C_VAR
|
||||
jne .sel_end
|
||||
|
||||
stdcall [tl_node_poi_get_info], 0,tree2
|
||||
@ -49,10 +51,10 @@ pushad
|
||||
mov ebx,[foc_obj]
|
||||
cmp ebx,esi
|
||||
je .add_end ;¨§¡¥£ ¥¬ 横«¨ç¥áª®© áá뫪¨
|
||||
mov bl,[esi]
|
||||
cmp bl,C_TDF
|
||||
mov ebx,dword[esi]
|
||||
cmp ebx,C_TDF
|
||||
je .add_beg
|
||||
cmp bl,C_STR
|
||||
cmp ebx,C_STR
|
||||
je .add_beg
|
||||
jmp .add_end
|
||||
.add_beg:
|
||||
@ -60,7 +62,7 @@ pushad
|
||||
mov edi,u_object
|
||||
mov dword[edi],eax
|
||||
add edi,4
|
||||
inc esi ;¯¥à¥å®¤¨¬ ¨¬ï ®¡ê¥ªâ
|
||||
add esi,u_object.txt-u_object ;¯¥à¥å®¤¨¬ ¨¬ï ®¡ê¥ªâ
|
||||
mov ecx,MAX_LEN_OBJ_TXT
|
||||
cld
|
||||
rep movsb
|
||||
@ -107,7 +109,7 @@ pushad
|
||||
|
||||
;ãáâ ®¢ª ®¢ëå ¯®¤¯¨á¥©
|
||||
mov esi,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ®¡ê¥ªâ
|
||||
mov bl,byte[esi]
|
||||
mov ebx,dword[esi]
|
||||
call find_obj_in_opt
|
||||
mov edi,dword[edi+obj_opt.bit_prop-obj_opt]
|
||||
cmp edi,0
|
||||
@ -161,7 +163,7 @@ pushad
|
||||
mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ®¡ê¥ªâ
|
||||
cmp edx,0
|
||||
je @f
|
||||
mov bl,[edx]
|
||||
mov ebx,dword[edx]
|
||||
call find_obj_in_opt
|
||||
add edi,obj_opt.info-obj_opt ;edi - ¯®¤¯¨áì ( §¢ ¨¥ ®¡ê¥ªâ )
|
||||
@@:
|
||||
@ -195,11 +197,12 @@ pushad
|
||||
stdcall draw_icon, 17,ebx,ecx ;17 - save
|
||||
|
||||
mov edi,edit2
|
||||
mov ecx,[obj_count_txt_props]
|
||||
cld
|
||||
.cycle:
|
||||
stdcall [edit_box_draw], edi ;à¨á㥬 ¯®«ï ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ
|
||||
stdcall [edit_box_draw], edi
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
loop .cycle
|
||||
|
||||
cmp [err_ini0],1
|
||||
je .exit_fun
|
||||
@ -219,7 +222,7 @@ pushad
|
||||
cmp ebx,MAX_OPT_FIELDS
|
||||
jl .draw_column
|
||||
|
||||
cmp byte[edx],C_VAR
|
||||
cmp dword[edx],C_VAR
|
||||
jne .no_tree
|
||||
mov dword[w_scr_t3.all_redraw],1
|
||||
stdcall [tl_draw], tree3
|
||||
@ -231,6 +234,7 @@ pushad
|
||||
mcall 12,2
|
||||
popad
|
||||
|
||||
;¥ ®âàë¢ âì íâã äãªæ¨î ®â ¯à¥¤ë¤ã饩
|
||||
align 4
|
||||
prop_still:
|
||||
pushad
|
||||
@ -251,44 +255,137 @@ prop_still:
|
||||
popad
|
||||
jmp prop_still
|
||||
|
||||
;¢ 横«¥ ¯à®¡¥£ ¥¬ ¯® ¢á¥¬ ¯®«ï¬ ᮠ᢮©á⢠¬¨,
|
||||
;çâ®-¡ë ¯®áç¨â âì ç¨á«® ¨á¯®«ì§ã¥¬ëå ¯®«¥©
|
||||
align 4
|
||||
prop_key:
|
||||
push eax edi
|
||||
mcall 2
|
||||
init_obj_count_txt_props:
|
||||
pushad
|
||||
mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ®¡ê¥ªâ
|
||||
xor ebx,ebx
|
||||
mov edi,edit2
|
||||
.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
|
||||
cmp edi,prop_wnd_edits_end
|
||||
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
|
||||
stdcall [tl_key], tree3
|
||||
@@:
|
||||
pop edi eax
|
||||
pop edi ecx eax
|
||||
ret
|
||||
|
||||
align 4
|
||||
prop_mouse:
|
||||
push edi
|
||||
push ecx edi
|
||||
mov edi,edit2
|
||||
mov ecx,[obj_count_txt_props]
|
||||
cld
|
||||
.cycle:
|
||||
stdcall [edit_box_mouse], edi
|
||||
add edi,ed_struc_size
|
||||
cmp edi,prop_wnd_edits_end
|
||||
jl .cycle
|
||||
loop .cycle
|
||||
|
||||
mov edi,[foc_obj]
|
||||
cmp byte[edi],C_VAR
|
||||
mov edi,dword[foc_obj]
|
||||
cmp dword[edi],C_VAR
|
||||
jne @f
|
||||
stdcall [tl_mouse], tree3
|
||||
@@:
|
||||
|
||||
checkboxes_mouse2 check_boxes,check_boxes_end
|
||||
|
||||
pop edi
|
||||
pop edi ecx
|
||||
ret
|
||||
|
||||
align 4
|
||||
|
@ -20,7 +20,7 @@ include 'obj_codes.inc'
|
||||
|
||||
@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'
|
||||
|
||||
@ -43,28 +43,23 @@ WND_CAPT_COLOR equ 0xb0d0ff
|
||||
BUF_SIZE equ 1000
|
||||
|
||||
;modif
|
||||
CPP_MOD_ACM equ 2 ;ᮡëâ¨ï ¬ëè¨
|
||||
BIT_MOD_ACM equ 1 ;ᮡëâ¨ï ¬ëè¨
|
||||
CPP_MOD_ACI equ 4 ; ¢ª«î票ï
|
||||
BIT_MOD_ACI equ 2 ; ¢ª«î票ï
|
||||
CPP_MOD_ACD equ 8 ;¤ ë¥ ®¡ê¥ªâ®¢
|
||||
BIT_MOD_ACD equ 3 ;¤ ë¥ ®¡ê¥ªâ®¢
|
||||
CPP_MOD_ABU equ 16 ;á¢ï§ë¢ ¨¥ ª®¯®ª
|
||||
BIT_MOD_ABU equ 4 ;á¢ï§ë¢ ¨¥ ª®¯®ª
|
||||
|
||||
CPP_MOD_WI_CA equ 16 ; áâ¨«ì ®ª ¯®¤¯¨áì
|
||||
CPP_MOD_WI_AO equ 32 ; áâ¨«ì ®ª ª®®à¤¨ âë ®â®á¨â¥«ì® ª«¨¥â᪮© ®¡« áâ¨
|
||||
CPP_MOD_WI_RD equ 64 ; áâ¨«ì ®ª ¯¥à¥à¨á®¢ª ®ª
|
||||
CPP_MOD_WI_GR equ 128 ; áâ¨«ì ®ª £à ¤¨¥â
|
||||
CPP_MOD_CHE equ 512 ; ch_flag_en - ¢ë¡à CheckBox
|
||||
CPP_MOD_TXT_ASCII_0 equ 1 ; ⥪áâ § ª 稢. 0
|
||||
CPP_MOD_TXT_TRAN equ 4 ; ⥪á⠯஧à çë©
|
||||
CPP_MOD_TXT_CHAR2 equ 2 ; ⥪áâ 2-¬ èà¨ä⮬
|
||||
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 ¥ à¨á®¢ âì £à ¨æã
|
||||
BIT_MOD_ACI equ 0 ;¯®¤ª«î票ï ä ©«®¢
|
||||
BIT_MOD_ACM equ 1 ;ᮡëâ¨ï ®â ¬ëè¨
|
||||
BIT_MOD_ACD equ 2 ;¤ ë¥ ®¡ê¥ªâ®¢
|
||||
BIT_MOD_ABU equ 3 ;á¢ï§ë¢ ¨¥ ª®¯®ª
|
||||
;CPP_MOD_WI_CA equ 16 ; áâ¨«ì ®ª ¯®¤¯¨áì
|
||||
;CPP_MOD_WI_AO equ 32 ; áâ¨«ì ®ª ª®®à¤¨ âë ®â®á¨â¥«ì® ª«¨¥â᪮© ®¡« áâ¨
|
||||
;CPP_MOD_WI_RD equ 64 ; áâ¨«ì ®ª ¯¥à¥à¨á®¢ª ®ª
|
||||
;CPP_MOD_WI_GR equ 128 ; áâ¨«ì ®ª £à ¤¨¥â
|
||||
;CPP_MOD_CHE equ 512 ; ch_flag_en - ¢ë¡à CheckBox
|
||||
BIT_MOD_TXT_ASCII_0 equ 0 ; ⥪áâ § ª 稢. 0
|
||||
BIT_MOD_TXT_NO_TRAN equ 1 ; ⥪á⠯஧à çë©
|
||||
BIT_MOD_TXT_CHAR2 equ 2 ; ⥪áâ 2-¬ èà¨ä⮬
|
||||
;CPP_MOD_EDIT_FOC equ 1 ; EditBox ¢ 䮪ãá¥
|
||||
;CPP_MOD_EDIT_FIO equ 2 ;
|
||||
;CPP_MOD_RE_GR equ 1 ; £à ¤¨¥âë© ¯àאַ㣮«ì¨ª
|
||||
BIT_MOD_BUT_NFON equ 0 ; á⨫ì Button ¥ à¨á®¢ âì ª®¯ªã
|
||||
BIT_MOD_BUT_NBORD equ 1 ; á⨫ì Button ¥ à¨á®¢ âì £à ¨æã
|
||||
|
||||
macro load_image_file path,buf,size ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨©
|
||||
{
|
||||
@ -106,21 +101,20 @@ struct FileInfoBlock
|
||||
ends
|
||||
|
||||
struct object
|
||||
c db ? ;0
|
||||
txt rb MAX_LEN_OBJ_TXT ;1
|
||||
lvl db 0 ;1+mt
|
||||
clo db 0 ;2+mt
|
||||
rb 8 ;3+mt ¥ ¨á¯®«ì§ã¥âáï, ®âáâ «®áì ®â Win ¢¥àᨨ
|
||||
typid dd ? ;3+8+mt
|
||||
modif dd ? ;7+8+mt
|
||||
id dd ? ;¨¤¥â¨ä¨ª â®à ®¡ê¥ªâ
|
||||
txt rb MAX_LEN_OBJ_TXT ;⥪áâ®¢ë¥ á¢®©áâ¢
|
||||
lvl db 0
|
||||
clo db 0
|
||||
typid dd ? ;®¬¥à ®¡ê¥ªâ ®¯à¥¤¥«ïî饣® ⨯ ¯¥à¥¬¥®©
|
||||
modif dd ? ;¡¨â®¢ë¥ ᢮©áâ¢
|
||||
ends
|
||||
|
||||
struct ObjOpt
|
||||
db ?
|
||||
dd ?
|
||||
bl_type db ?
|
||||
graph db ?
|
||||
info rb 30
|
||||
caption rb 200
|
||||
caption rb MAX_OPT_CAPTION
|
||||
Col rw MAX_OPT_FIELDS
|
||||
img rw MAX_OPT_FIELDS ;¨¤¥ªáë ª à⨮ª (¢ ä ©«¥ 'icon.bmp')
|
||||
bit_prop dd 0 ;¡¨â®¢ë¥ ᢮©áâ¢
|
||||
@ -151,6 +145,12 @@ icon_font_s1 dd 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_prop.inc' ;ä ©« á äãªæ¨ï¬¨ ®ª ᢮©á⢠®¡ê¥ªâ
|
||||
include 'ced_constr.inc' ;ä ©« á äãªæ¨ï¬¨ ®ª ª®áâàãªâ®à
|
||||
@ -268,8 +268,8 @@ start:
|
||||
|
||||
mov eax,obj_opt ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
|
||||
@@:
|
||||
mov bl,byte[eax]
|
||||
cmp bl,0
|
||||
mov ebx,dword[eax]
|
||||
cmp ebx,0
|
||||
je @f
|
||||
;xor ecx,ecx ;¢ ecx ¡ã¤¥â ¨¤¥ªá ¨ª®ª¨
|
||||
mov cx,word[eax+obj_opt.img-obj_opt]
|
||||
@ -617,8 +617,8 @@ but_open_proj:
|
||||
stdcall dword[tl_info_clear], tree2
|
||||
mov eax,ced_info ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
|
||||
@@:
|
||||
mov bl,byte[eax]
|
||||
cmp bl,0
|
||||
mov ebx,dword[eax]
|
||||
cmp ebx,0
|
||||
je @f
|
||||
|
||||
call find_obj_in_opt ;edi = pointer to ObjOpt struct
|
||||
@ -629,10 +629,10 @@ but_open_proj:
|
||||
xor cx,cx ;çâ®-¡ë ¥ £«î稫® á ®âà¨æ ⥫ìë¬ ¨¤¥ªá®¬
|
||||
.zero:
|
||||
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 - ¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ã§«ë ¨¬¥î騥 ¤®ç¥à¨¥
|
||||
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 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
|
||||
@ -666,34 +666,33 @@ but_save_proj:
|
||||
pop esi ;¯®«ãç ¥¬ ¤ ë¥ ã§«
|
||||
|
||||
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 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
|
||||
imul ebx,sizeof.TreeList
|
||||
add ebx,[tree2.data_nodes] ;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
|
||||
|
||||
;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ¥¨ï
|
||||
xor ecx,ecx
|
||||
mov cx,word[tree2.info_size]
|
||||
cld
|
||||
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
|
||||
pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
|
||||
jmp @b
|
||||
@@:
|
||||
mov byte[edi],0
|
||||
inc edi
|
||||
mov dword[edi],0 ;¬¥âª ª®æ ä ©«
|
||||
add edi,4
|
||||
mov ecx,edi
|
||||
sub ecx,ced_info ;ecx - à §¬¥à á®åà 塞®£® ä ©«
|
||||
|
||||
@ -807,30 +806,6 @@ on_file_object_select:
|
||||
;call draw_window
|
||||
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
|
||||
;¤®¡ ¢«ï¥â ®¢ë© ®¡ê¥ªâ ¢ ®ª® tree2
|
||||
align 4
|
||||
@ -844,8 +819,8 @@ push eax ebx ecx
|
||||
mov cx,word[eax+obj_opt.img-obj_opt] ;cx - ¨¤¥ªá £« ¢®© ¨ª®ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ
|
||||
shl ecx,16
|
||||
stdcall mem_clear, u_object,sizeof.object
|
||||
mov bl,byte[eax]
|
||||
mov byte[u_object.c],bl
|
||||
mov ebx,dword[eax]
|
||||
mov dword[u_object.id],ebx
|
||||
stdcall dword[tl_node_add], u_object, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
|
||||
@@:
|
||||
pop ecx ebx eax
|
||||
@ -956,11 +931,11 @@ mouse_dd dd ?
|
||||
el_focus dd tree1
|
||||
;¤¥à¥¢® ᮠᯨ᪮¬ ¢®§¬®¦ëå ⨯®¢ ®¡ê¥ªâ®¢
|
||||
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
|
||||
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ ⥫ì᪮¬ ä ©«¥
|
||||
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
|
||||
|
||||
msgbox_0:
|
||||
@ -1168,6 +1143,7 @@ obj_opt ObjOpt
|
||||
cur_x dd 0
|
||||
cur_y dd 0
|
||||
foc_obj dd 0 ;®¡ê¥ªâ ¢ 䮪ãá¥
|
||||
obj_count_txt_props dd 0 ;ª®«¨ç¥á⢮ ¨á¯®«ì§ã¥¬ëå ⥪á⮢ëå ᢮©áâ¢
|
||||
obj_m_win dd 0 ;áâàãªâãà £« ¢®£® ®ª
|
||||
|
||||
;
|
||||
|
Binary file not shown.
@ -2,15 +2,15 @@
|
||||
|
||||
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 graph
|
||||
@@: db info
|
||||
rb @b+30-$
|
||||
@@: db caption
|
||||
rb @b+MAX_LEN_OBJ_TXT-$
|
||||
rb @b+MAX_OPT_CAPTION-$
|
||||
dw Col
|
||||
dw img ;¨¤¥ªáë ª à⨮ª (¢ ä ©«¥ 'icon.bmp')
|
||||
dd bit_prop+0
|
||||
@ -33,7 +33,8 @@ ObjOpt C_BUT, 1,1,'
|
||||
<20, 40, 60, 80,100,120, 0, 0, 0, 0, 0>,\
|
||||
<29, 15, 16, 26, 27, 25, -1, -1, -1, -1,-1>,\
|
||||
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>,\
|
||||
<10, 26, 15, 16, 25, 25, 25, 25, 25, -1, 4>,\
|
||||
txt_bit_edit
|
||||
@ -47,7 +48,7 @@ ObjOpt C_CHB, 1,1,'
|
||||
ObjOpt C_TXT, 1,0,'asm ª®¤','',\
|
||||
< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
|
||||
<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>,\
|
||||
<12, -1, 15, 16, 26, 27, 25, 25, -1, -1, -1>,\
|
||||
txt_bit_wnd
|
||||
|
@ -2,22 +2,23 @@
|
||||
; ¢ םג®¬ ה ©«¥ ב®<EFBFBD>א כ ×®¤כ ®<EFBFBD>ך¥×ג®¢
|
||||
;
|
||||
|
||||
C_TDF equ 't' ;typedef
|
||||
C_ACO equ 'a' ; ¢â®¬ â¨ç¥áª¨¥ ª®¤ë (auto code)
|
||||
C_STR equ 's' ;struct
|
||||
C_INC equ '#' ;include
|
||||
C_TXT equ 'd' ;¡«®ª ª®¤ (¤ ëå)
|
||||
C_VAR equ '-' ;¯¥à¥¬¥ ï
|
||||
C_COM equ ';' ;ª®¬¬¥â ਩
|
||||
C_WND equ 'w' ;®ª®
|
||||
C_CHB equ 'c' ;CheckBox
|
||||
C_OPT equ 'o' ;OptionBox
|
||||
C_EDB equ 'e' ;EditBox
|
||||
C_BUT equ 'b' ;Button
|
||||
C_DTT equ 'x' ;à¨á®¢ âì ⥪áâ
|
||||
C_REC equ 'r' ;à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
C_KEY equ 'k' ;ª« ¢¨ âãà
|
||||
C_LIB equ 'l' ;¡¨¡«¨®â¥ª
|
||||
C_IFN equ 'f' ;¡¨¡«¨®â¥ç ï ¯®¤ª«îç ¥¬ ï äãªæ¨ï
|
||||
C_TDF equ 'Type' ;typedef
|
||||
C_ACO equ ('a' shl 24) ; ¢â®¬ â¨ç¥áª¨¥ ª®¤ë (auto code)
|
||||
C_STR equ ('s' shl 24) ;struct
|
||||
C_INC equ ('#' shl 24) ;include
|
||||
C_TXT equ ('d' shl 24) ;¡«®ª ª®¤ (¤ ëå)
|
||||
C_VAR equ ('-' shl 24) ;¯¥à¥¬¥ ï
|
||||
C_COM equ (';' shl 24) ;ª®¬¬¥â ਩
|
||||
C_WND equ ('w' shl 24) ;®ª®
|
||||
C_CHB equ ('c' shl 24) ;CheckBox
|
||||
C_OPT equ ('o' shl 24) ;OptionBox
|
||||
C_EDB equ ('e' shl 24) ;EditBox
|
||||
C_BUT equ ('b' shl 24) ;Button
|
||||
C_DTT equ ('x' shl 24) ;à¨á®¢ âì ⥪áâ
|
||||
C_REC equ 'Rect' ;à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
C_KEY equ ('k' shl 24) ;ª« ¢¨ âãà
|
||||
C_LIB equ 'Libr' ;¡¨¡«¨®â¥ª
|
||||
C_IFN equ ('f' shl 24) ;¡¨¡«¨®â¥ç ï ¯®¤ª«îç ¥¬ ï äãªæ¨ï
|
||||
|
||||
MAX_LEN_OBJ_TXT equ 200
|
||||
MAX_LEN_OBJ_TXT equ 200 ;¬ ªá¨¬ «ì ï ¤«¨ ⥪á⮢ëå ª ᢮©á⢠®¡ê¥ªâ
|
||||
MAX_OPT_CAPTION equ 250 ;¬ ªá¨¬ «ì ï ¤«¨ ¯®¤¯¨á¥© ª ᢮©á⢠¬ ®¡ê¥ªâ
|
@ -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 edx,dword[color]
|
||||
mov esi,dword[coord_x1]
|
||||
cmp ebx,esi
|
||||
jle @f
|
||||
xchg ebx,esi ;¥á«¨ x0 > x1 â® ¬¥ï¥¬ ¬¥áâ ¬¨ x0 ¨ x1
|
||||
|
||||
@@: ;for (x=x0 ; x<x1; x++) ;------------------------------------
|
||||
call draw_pixel
|
||||
inc ebx
|
||||
@@: ;横« ¯® ®á¨ x ®â x0 ¤® x1
|
||||
cmp ebx,esi
|
||||
jge @f
|
||||
call draw_pixel
|
||||
inc ebx
|
||||
jmp @b
|
||||
@@:
|
||||
.end24:
|
||||
@ -1099,6 +1102,8 @@ pushad
|
||||
mov edx,[w]
|
||||
add edx,eax
|
||||
mov ecx,[h]
|
||||
cmp ecx,1 ;áà ¢¥¨¥ á ¬¨¨¬ «ì® ¢®§¬®¦®© ¢ëá®â®©
|
||||
jl .coord_end ;¥á«¨ ¢ëá®â ¬¥ìè¥ 1-£® ¯¨ªá¥«ï
|
||||
mov esi,dword[color]
|
||||
cld
|
||||
@@:
|
||||
|
Loading…
Reference in New Issue
Block a user