2006-11-02 15:18:23 +01:00
|
|
|
|
;--------------------------------------------------------------------
|
|
|
|
|
;--- <EFBFBD><EFBFBD>ᮢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ⥪<EFBFBD>⮬ <EFBFBD> <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD> --------------------------
|
|
|
|
|
;--------------------------------------------------------------------
|
|
|
|
|
macro use_txt_button
|
|
|
|
|
{
|
|
|
|
|
txt_button:
|
|
|
|
|
.draw:
|
|
|
|
|
pusha
|
|
|
|
|
;--- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><EFBFBD> ᠬ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov eax,8
|
|
|
|
|
mov ebx,[edi] ; [but.width]
|
|
|
|
|
mov ecx,[edi+4] ;[but.height]
|
|
|
|
|
mov edx,[edi+8];[but.id]
|
|
|
|
|
mov esi,[edi+12];[but.color]
|
|
|
|
|
mcall
|
2006-11-02 15:18:23 +01:00
|
|
|
|
;--- ⥪<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ---
|
2009-06-01 20:25:07 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD>⠥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov edx,[edi+20]
|
|
|
|
|
xor esi,esi
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.check_next_symbol:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp [edx+esi],byte 0
|
|
|
|
|
je .str_end
|
|
|
|
|
inc esi ; <EFBFBD> esi <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jmp .check_next_symbol
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.str_end:
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD>न<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
lea ebx,[esi*2+esi]
|
|
|
|
|
lea ebx,[ebx*2] ; <EFBFBD> ebx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᥫ<EFBFBD><EFBFBD>
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
;not ebx
|
|
|
|
|
neg ebx
|
|
|
|
|
add bx,[edi] ; [but.width]
|
|
|
|
|
sar bx,1
|
|
|
|
|
inc bx
|
|
|
|
|
add bx,[edi+2];[but.left] ; <EFBFBD> bx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|
|
|
|
shl ebx,16
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov bx,[edi+4];[but.height]
|
|
|
|
|
sub bx,8
|
|
|
|
|
sar bx,1
|
|
|
|
|
add bx,[edi+6];[but.top] ; <EFBFBD> bx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᢥ<EFBFBD><EFBFBD><EFBFBD>
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD>ப<EFBFBD> ⥪<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx,[edi+16] ;[but.text_color]
|
|
|
|
|
shr eax,1
|
|
|
|
|
mcall
|
2006-11-02 15:18:23 +01:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struc txt_button width,left,height,top,id,color,text_color,text_ptr,\
|
|
|
|
|
proc_addres
|
|
|
|
|
{
|
|
|
|
|
.width dw width ;+0
|
2009-06-01 20:25:07 +02:00
|
|
|
|
.left dw left ;+2
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.height dw height ;+4
|
2009-06-01 20:25:07 +02:00
|
|
|
|
.top dw top ;+6
|
|
|
|
|
.id dd id ;+8
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.color dd color ;+12
|
|
|
|
|
.text_color dd text_color ;+16
|
2009-06-01 20:25:07 +02:00
|
|
|
|
.text_ptr dd text_ptr ;+20
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.proc_addres dd proc_addres+0 ;+24
|
|
|
|
|
}
|
|
|
|
|
but_struc_size=24+4
|
|
|
|
|
macro draw_txt_buttons start,end
|
|
|
|
|
{
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov edi,start
|
|
|
|
|
mov ecx,((end-start)/but_struc_size)
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
call txt_button.draw
|
|
|
|
|
add edi,but_struc_size
|
|
|
|
|
loop @b
|
2006-11-02 15:18:23 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro txt_but_set_sys_color start,end,color_table
|
|
|
|
|
{
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov edi,start
|
|
|
|
|
mov esi,color_table
|
|
|
|
|
mov ecx,((end-start)/but_struc_size)
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
push dword [esi+24]
|
|
|
|
|
pop dword [edi+12]
|
|
|
|
|
push dword [esi+28]
|
|
|
|
|
pop dword [edi+16]
|
|
|
|
|
add edi,but_struc_size
|
|
|
|
|
loop @b
|
2006-11-02 15:18:23 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro txt_but_ev start,end
|
|
|
|
|
{
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov edi,start
|
|
|
|
|
mov ecx,((end-start)/but_struc_size)
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.txt_but_next:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp ah,[edi+8]
|
|
|
|
|
jne @f
|
|
|
|
|
cmp dword [edi+24],0
|
|
|
|
|
je @f
|
|
|
|
|
pusha
|
|
|
|
|
call dword [edi+24]
|
|
|
|
|
popa
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
add edi,but_struc_size
|
|
|
|
|
loop .txt_but_next
|
2006-11-02 15:18:23 +01:00
|
|
|
|
}
|