kolibrios/programs/develop/kol_f_edit/ced_constr.inc

322 lines
8.1 KiB
PHP
Raw Normal View History

;
; <EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> ᮡ࠭<EFBFBD> <EFBFBD>㭪樨 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;
macro move_to_skin coord_x,coord_y
{
add coord_x,SKIN_W1
add coord_y,SKIN_H
}
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
draw_constructor:
stdcall [buf2d_clear], buf_fon,0xffffff
pushad
cmp [err_ini1],1
jne @f
stdcall [buf2d_draw_text], buf_fon, buf_font,txtErrIni1,10,10,\
0xff0000 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>
stdcall [buf2d_draw_text], buf_fon, buf_font,fp_obj_opt,10,20,\
0xff0000 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>
jmp .end_draw
@@:
xor edx,edx
mov dl,C_WI
stdcall find_obj_in_file,edx ;eax - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp eax,0
je .end_draw
mov dword[obj_m_win],eax
;4-width
stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
stdcall conv_str_to_int,edx
mov ecx,eax ;ecx=width
;5-height
stdcall get_obj_text_col,[obj_m_win],5 ;edx = offset
stdcall conv_str_to_int,edx
;eax=height
stdcall [buf2d_rect_by_size], buf_fon, 0,0,ecx,eax, dword[sc.frame] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sub eax,2
sub ecx,2
stdcall [buf2d_filled_rect_by_size], buf_fon, 1,1,ecx,eax, dword[sc.grab] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sub eax,6
sub ecx,6
stdcall [buf2d_rect_by_size], buf_fon, 4,4,ecx,eax, dword[sc.frame] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sub eax,2
sub ecx,2
stdcall [buf2d_filled_rect_by_size], buf_fon, 5,5,ecx,eax, dword[sc.work] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;---;---;---
;jmp .end_skin
;---;---;---
stdcall get_obj_text_col,[obj_m_win],1
stdcall conv_str_to_int,edx ;eax = window style
cmp eax,3
jl .end_skin
stdcall [buf2d_bit_blt], buf_fon, 0,0, buf_skin1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>
mov edi,buf_skin1
mov eax,buf2d_w ;eax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
mov edi,buf_skin2
mov ebx,buf2d_w ;ebx - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
sub ecx,ebx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
@@:
stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin2 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
add eax,ebx
cmp eax,ecx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jl @b
;4-width
stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
stdcall conv_str_to_int,edx
mov edi,buf_skin3
sub eax,buf2d_w ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
.end_skin:
xor edx,edx ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov dl,C_BU
stdcall draw_arr_objects, edx,draw_obj_but
mov dl,C_ED
stdcall draw_arr_objects, edx,draw_obj_edit
mov dl,C_CB
stdcall draw_arr_objects, edx,draw_obj_check
mov dl,C_DT
stdcall draw_arr_objects, edx,draw_obj_text
mov dl,C_RE
stdcall draw_arr_objects, edx,draw_obj_rect_f13
.end_draw:
popad
ret
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc draw_arr_objects, obj_t:dword,p_fun_draw:dword
push eax ebx
stdcall find_obj_in_file,[obj_t] ;eax - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp eax,0
je .end_draw_o
mov ebx,[p_fun_draw]
stdcall ebx,eax
@@:
stdcall find_obj_in_file_next,[obj_t] ;eax - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp eax,0
je .end_draw_o
stdcall ebx,eax
jmp @b
.end_draw_o:
pop ebx eax
ret
endp
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc draw_obj_but, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
endl
pushad
mov ebx,dword[p_obj]
;1,2,3,4,5 - x,y,w,h,color
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov edi,eax
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
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
popad
ret
endp
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc draw_obj_edit, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
col_txt dd ? ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
endl
pushad
mov ebx,dword[p_obj]
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov ecx,eax
stdcall get_obj_text_col,ebx,6
stdcall conv_str_to_int,edx
stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
ecx,15, eax
inc dword[coor_x]
inc dword[coor_y]
sub ecx,2
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
ecx,13, eax
stdcall get_obj_text_col,ebx,8
stdcall conv_str_to_int,edx
mov [col_txt],eax
add [coor_x],2-1 ;ᬥ頥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>
add [coor_y],4-1 ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall get_obj_text_col,ebx,10
stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
dword[col_txt] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>
popad
ret
endp
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc draw_obj_check, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
ot_txt dd ? ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
size_wh dd ? ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
col_txt dd ? ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
endl
pushad
mov ebx,dword[p_obj]
;1,2,3, 4,5,6, 7,8 - x,y,txt, col_fon,col_frame,col_txt, w_txt,w_h
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,7
stdcall conv_str_to_int,edx
mov [ot_txt],eax
stdcall get_obj_text_col,ebx,8
stdcall conv_str_to_int,edx
dec eax ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov [size_wh],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],\
dword[size_wh],dword[size_wh], eax
inc dword[coor_x]
inc dword[coor_y]
sub dword[size_wh],2
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
dword[size_wh],dword[size_wh], eax
stdcall get_obj_text_col,ebx,6
stdcall conv_str_to_int,edx
mov [col_txt],eax
mov eax,[ot_txt]
add eax,[size_wh]
add eax,2-1 ;sub dword[size_wh],2 ;inc dword[coor_x]
add [coor_x],eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
add [coor_y],5-1 ;inc dword[coor_y]
stdcall get_obj_text_col,ebx,3
stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
dword[col_txt] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>
popad
ret
endp
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc draw_obj_text, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
col_txt dd ? ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
endl
pushad
mov ebx,dword[p_obj]
;0,1,2,3,... - txt,x,y,col_txt,...
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov [col_txt],eax
stdcall get_obj_text_col,ebx,0
stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
dword[col_txt] ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>
popad
ret
endp
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>אַ㣮<EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD>. 13)
align 4
proc draw_obj_rect_f13, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
color dd ? ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
endl
pushad
mov ebx,dword[p_obj]
;0,1,2,3,4 - color,x,y,w,h
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,0
stdcall conv_str_to_int,edx
mov [color],eax
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov ecx,eax
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
mov esi,eax
stdcall [buf2d_filled_rect_by_size], buf_fon,\
dword[coor_x],dword[coor_y],ecx,esi,dword[color]
popad
ret
endp