kolibrios-gitea/programs/games/MSquare/trunk/editbox_ex.mac

195 lines
7.6 KiB
Plaintext
Raw Normal View History

ch_struc_size=36
ed_struc_size=76
ch_flag_en=10b
ch_left equ [edi] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
ch_top equ [edi+2] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
ch_text_margin equ [edi+4] ;=4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ch_size equ [edi+8] ;12 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
ch_color equ [edi+12] ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> checkbox
ch_border_color equ [edi+16] ; or [edi+4] ;梥<><><E0A0AC> checkbox <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A0AC><EFBFBD><EFBFBD><EFBFBD>⥫쭮
ch_text_color equ [edi+20];[edi+4] ;梥<><><E2A5AA><EFBFBD>
ch_text_ptr equ [edi+24] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD>
ch_text_length equ [edi+28]
ch_flags equ [edi+32] ;䫠<><E4ABA0>
ed_width equ [edi] ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_left equ [edi+4] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20>
ed_top equ [edi+8] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20>
ed_color equ [edi+12] ;梥<><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
shift_color equ [edi+16] ;=0x6a9480 <20><><EFBFBD> <20><EFBFBD><E0A8AC><EFBFBD> <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD>
ed_focus_border_color equ [edi+20] ;梥<><><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_blur_border_color equ [edi+24] ;梥<> <20><> <20><><EFBFBD><E2A8A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_text_color equ [edi+28] ;梥<><><E2A5AA><EFBFBD>
ed_max equ [edi+32] ;<3B><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1A8AC><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_text equ [edi+36] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
ed_mouse_variable equ [edi+40] ; 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD>
ed_flags equ [edi+44] ;䫠<><E4ABA0>
bp_flags equ [ebp+44] ;<3B> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD><EFBFBD> edi <20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E3AAA0><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD> <20> ebp
ed_size equ [edi+48] ;<3B><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD>
bp_size equ [ebp+48] ;<3B><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><EFBFBD><E1AFAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ebp<62> edi <20><><EFBFBD><EFBFBD><EFBFBD>
ed_pos equ [edi+52] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_offset equ [edi+56] ;ᬥ饭<E1ACA5><E9A5AD>
cl_curs_x equ [edi+60] ;<3B><EFBFBD><E0A5A4><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
cl_curs_y equ [edi+64] ;<3B><EFBFBD><E0A5A4><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
ed_shift_pos equ [edi+68] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_shift_pos_old equ [edi+72] ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_struc_size=76
struc edit_box width,left,top,color,shift_color,focus_border_color,\
blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
{
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Bit mask from editbox
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ed_figure_only= 1000000000000000b ;<3B><><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD>
ed_always_focus= 100000000000000b
ed_focus= 10b ;䮪<><E4AEAA> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_shift_on= 1000b ;<3B><20><> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> -<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> shift,<2C><20><><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㤥ন<E3A4A5><E0A6A8><EFBFBD> shift
ed_shift_on_off=1111111111110111b
ed_shift= 100b ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A0A5><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><> shift <20>.<2E>. <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_shift_off= 1111111111111011b
ed_shift_bac= 10000b ;<3B><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> shift <20>.<2E>. <20><><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD>
ed_shift_bac_cl=1111111111101111b ;<3B><><EFBFBD><EFBFBD><20><><EFBFBD><><E3A4A0><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD>
ed_shift_cl= 1111111111100011b
ed_shift_mcl= 1111111111111011b
ed_left_fl= 100000b
ed_right_fl= 1111111111011111b
ed_offset_fl= 1000000b
ed_offset_cl= 1111111110111111b
ed_insert= 10000000b
ed_insert_cl= 1111111101111111b
ed_mouse_on = 100000000b
ed_mous_adn_b= 100011000b
ed_mouse_on_off=1111111011111111b
ed_height=14 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.width dd width
.left dd left
.top dd top
.color dd color
.shift_color dd shift_color
.focus_border_color dd focus_border_color
.blur_border_color dd blur_border_color
.text_color dd text_color
.max dd max
.text dd text
.mouse_variable dd mouse_variable
.flags dd flags+0
.size dd size+0
.pos dd pos+0
.offset dd 0
.cl_curs_x dd 0
.cl_curs_y dd 0
.shift dd 0
.shift_old dd 0
}
macro edit_boxes_set_sys_color start,end,color_table
{
mov edi,start
mov ecx,((end-start)/ed_struc_size)
mov esi,color_table
@@:
mov eax,dword [esi+36]
mov ebx,dword [esi+20]
push dword eax
pop dword ed_focus_border_color
shr bh,1
shr bl,1
shr ah,1
shr al,1
add ah,bh
add al,bl
ror eax,16
ror ebx,16
shr bl,1
shr al,1
add al,bl
ror eax,16
mov dword ed_blur_border_color,eax
mov dword shift_color,eax
add edi,ed_struc_size
loop @b
}
macro get_sys_colors col_buf
{
;mov eax,48
push 48
pop eax
;mov ebx,3
push 3
pop ebx
;mov ecx,col_buf
push col_buf
pop ecx
;mov edx,40
push 40
pop edx
mcall
}
macro check_boxes_set_sys_color start,end,color_table
{
ch_left equ [edi] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
ch_top equ [edi+2] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
ch_text_margin equ [edi+4] ;=4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ch_size equ [edi+8] ;12 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
ch_color equ [edi+12] ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> checkbox
ch_border_color equ [edi+16] ; or [edi+4] ;梥<><><E0A0AC> checkbox <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A0AC><EFBFBD><EFBFBD><EFBFBD>⥫쭮
ch_text_color equ [edi+20];[edi+4] ;梥<><><E2A5AA><EFBFBD>
ch_text_ptr equ [edi+24] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD>
ch_text_length equ [edi+28]
ch_flags equ [edi+32] ;䫠<><E4ABA0>
;ch_left equ [edi] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
;ch_top equ [edi+2] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
;ch_color equ [edi+4] ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> checkbox
;ch_border_color equ [edi+8] ;梥<><><E0A0AC> checkbox
;ch_text_color equ [edi+12] ;梥<><><E2A5AA><EFBFBD>
;ch_text_ptr equ [edi+16] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD>
;ch_text_length equ [edi+20] ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (2^64 ⠪<><E2A0AA> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><><E2A5AA>)
;ch_flags equ [edi+24] ;䫠<><E4ABA0>
mov edi,start
mov ecx,((end-start)/ch_struc_size)
mov esi,color_table
@@:
push dword [esi+32]
pop dword ch_text_color
push dword [esi+36]
pop dword ch_border_color
add edi,ch_struc_size
loop @b
}
struc check_box left,top,ch_text_margin,ch_size,color,border_color,text_color,text,ch_text_length,flags
{ ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC><20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
ch_flag_en=10b
.left: dw left ;+0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
.top: dw top ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
.ch_text_margin: dd ch_text_margin ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.ch_size: dd ch_size ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD><E0A8AC><EFBFBD> 12
.color: dd color ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E7A5AA><EFBFBD><EFBFBD><EFBFBD>
.border_color: dd border_color ;梥<><><E0A0AC>
.text_color: dd text_color ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.text: dd text ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD> <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><><E2A5AA>
.ch_text_length: dd ch_text_length ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.flags: dd flags+0 ; 䫠<><E4ABA0>
}
struc option_box point_gr,left,top,op_text_margin,op_size,color,border_color,text_color,text,op_text_length,flags
{ ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AC><20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
op_flag_en=10b
.option_group: dd point_gr
.left: dw left ;+0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
.top: dw top ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
.ch_text_margin: dd op_text_margin ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.ch_size: dd op_size ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD><E0A8AC><EFBFBD> 12
.color: dd color ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E7A5AA><EFBFBD><EFBFBD><EFBFBD>
.border_color: dd border_color ;梥<><><E0A0AC>
.text_color: dd text_color ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.text: dd text ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD> <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><><E2A5AA>
.ch_text_length: dd op_text_length ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.flags: dd flags+0 ; 䫠<><E4ABA0>
}