/programs/games/MSquare/trunk/MSquare.asm |
---|
0,0 → 1,725 |
; 10.06.2010 staper@inbox.ru |
; £¨ç¥áª¨© ª¢ ¤à â - íâ® ¡®à â ª¨å 楫ëå ç¨á¥«, çâ® ¨å á㬬ë |
;¢ áâப å, á⮫¡æ å (०¥ ¢ ¤¨ £® «ïå) à ¢ë. |
;ਬ¥à: |
; 16 3 2 13 |
; 5 10 11 8 |
; 9 6 7 12 |
; 4 15 14 1 |
use32 |
org 0x0 |
db 'MENUET01' |
dd 0x1, START, I_END, (D_END+100) and not 3, (D_END+100) and not 3, 0, 0 |
;¢¥â : |
Bckgrd_clr equ 0xffffff ;䮭 |
Brdr_line_clr equ 0xb0b0b0 ;«¨¨¨ ¯® £à ¨æ ¬ |
Inter_line_clr equ 0xb0b0b0 ;¢ãâ२¥ «¨¨¨ |
Square_clr equ 0xdddddd ;梥⠪ãàá®à |
Fix_nmb_clr equ 0x83459 ;áâ â¨ç®¥ § 票¥ |
Chg_nmb_clr equ 0;x008d8d ;¯¥à¥¬¥®¥ § 票¥ |
Text_clr equ 0x000000 ;⥪áâ |
Message_clr equ 0x0000ff ;á®®¡é¥¨ï |
max_dif equ 10 |
min_dif equ 2 |
len_kub equ 30 ;¤«¨ áâ®à®ë ª¢ ¤à ⨪ |
beg_x equ 40 ;ª®®à¤¨ â «¥¢®£® ¢¥à奣® 㣫 |
beg_y equ 50 ;ª®®à¤¨ â Y «¥¢®£® ¢¥à奣® 㣫 |
sym_x equ 20 |
sym_y equ 20 |
win_x equ 400 ;è¨à¨ ®ª |
win_y equ 400 ;¢ëá®â ®ª |
DEBUG equ 0 |
macro dbg_dec num |
{pushad |
newline |
debug_print_dec num |
popad |
} |
include 'macros.inc' |
;include 'debug.inc' |
include 'editbox_ex.mac' |
include 'lang.inc' |
START: |
;mcall 40,7 |
redraw_all: |
mcall 12,1 |
mcall 48,4 |
add eax,100*65536+win_x |
mov ecx,eax |
mcall 0,100*65536+win_y,,(0x34000000+Bckgrd_clr),,title |
movzx eax,[Difficult] |
mov ebx,len_kub |
xor edx,edx |
mul ebx |
add eax,beg_x*65536+beg_x |
xchg eax,ebx |
mcall 38,,beg_y*65536+beg_y,Brdr_line_clr |
mov edx,Inter_line_clr |
movzx esi,[Difficult] |
dec esi |
@@: add ecx,len_kub*65536+len_kub |
mcall |
dec esi |
jnz @b |
add ecx,len_kub*65536+len_kub |
mcall ,,,Brdr_line_clr |
movzx eax,[Difficult] |
mov ecx,len_kub |
xor edx,edx |
mul ecx |
add eax,(beg_y+1)*65536+beg_y-1 |
xchg eax,ecx |
mov ebx,beg_x*65536+beg_x |
mcall 38,,,Brdr_line_clr |
mov edx,Inter_line_clr |
movzx esi,[Difficult] |
dec esi |
@@: add ebx,len_kub*65536+len_kub |
mcall |
dec esi |
jnz @b |
add ebx,len_kub*65536+len_kub |
mcall ,,,Brdr_line_clr |
mcall 8,<3,78>,<3,13>,2,0xbbbbbb |
mcall 4,<7,5>,(0x80000000+Text_clr),txt.clear |
mcall ,<105,5>,,txt.dif |
call show_level |
push dword Map;esi; mov esi,Map |
mcall 12,2 |
draw_pole: |
if DEBUG |
call SysMsgBoardNum ;show esp |
endf |
movzx eax,[Y] |
dec al |
movzx ebx,[Difficult] |
mul bl |
mov bl,[X] |
add al,bl |
pop esi ; mov esi,Map |
push eax ;ªãàá®à稪 |
movzx eax,[Difficult] |
mov ebx,eax |
mul eax |
sub eax,ebx |
mov edi,eax |
pop eax |
push eax |
; mov edi,81-9 |
movzx ebp,[Difficult] |
mov ebx,beg_x*65536+beg_x+sym_x |
mov ecx,beg_y*65536+beg_y+sym_y |
call out_numbers |
pop eax |
call out_sum |
still: |
mcall 10 |
dec al |
jz redraw_all |
dec al |
jz key |
dec al |
jnz still |
;button: |
mcall 17 |
cmp ah,1 |
jne @f |
mcall -1 |
.clear: |
@@: mov ecx,max_dif*max_dif |
mov esi,Map |
@@: mov byte [esi+ecx-1],0 |
loop @b |
jmp redraw_all |
key: |
mcall 2 |
.43: cmp ah,43 ;+ |
jne .45 |
cmp [Difficult],max_dif |
je still |
inc [Difficult] |
jmp redraw_all |
jmp still |
.45: ;- |
cmp ah,45 |
jne .99 |
cmp [Difficult],min_dif |
je still |
dec [Difficult] |
jmp redraw_all |
jmp still |
.99: cmp ah,0x58 |
je @f |
cmp ah,0x78 |
jne .39 |
@@: jmp still.clear |
.39: cmp ah,0x39 |
ja .110 |
cmp ah,0x30 |
jb still |
sub ah,0x30 |
mov cl,ah |
movzx eax,[Y] |
dec al |
mov ebx,max_dif;[Difficult] |
mul bl |
mov bl,[X] |
dec bl |
add al,bl |
mov esi,Map |
bt [flags],9 |
jnc @f |
mov bl,[esi+eax] |
push eax |
mov ax,10 |
xor dl,dl |
mul bl |
add cl,al |
pop eax |
mov [esi+eax],cl |
btr [flags],9 |
jmp .onedraw |
@@: mov [esi+eax],cl |
bts [flags],9 |
jmp .onedraw |
.110: cmp ah,110 ;n |
jne .176 |
.new_game: |
jmp redraw_all |
.176: cmp ah,176 ;ªãàá®àë |
jne .177 |
call draw_one_symbol |
dec [X] |
cmp [X],1 |
jge @f |
push eax |
movzx eax,[Difficult] |
mov [X],al |
pop eax |
@@: btr [flags],9 |
jmp .onedraw |
.177: cmp ah,177 |
jne .178 |
call draw_one_symbol |
inc [Y] |
push eax |
movzx eax,[Difficult] |
cmp [Y],al |
jbe @f |
mov [Y],1 |
@@: pop eax |
btr [flags],9 |
jmp .onedraw |
.178: cmp ah,178 |
jne .179 |
call draw_one_symbol |
dec [Y] |
cmp [Y],1 |
jge @f |
push eax |
movzx eax,[Difficult] |
mov [Y],al |
pop eax |
@@: btr [flags],9 |
jmp .onedraw |
.179: cmp ah,179 |
jne still |
call draw_one_symbol |
inc [X] |
push eax |
movzx eax,[Difficult] |
cmp [X],al |
jbe @f |
mov [X],1 |
@@: btr [flags],9 |
pop eax |
.onedraw: |
bts [flags],4 |
call draw_one_symbol |
call out_one_sum |
jmp still ;.todraw |
show_level: |
movzx ecx,[Difficult] |
mcall 47,0x10000,,<205,5>,(0x50000000+Text_clr),Bckgrd_clr |
ret |
draw_one_symbol: |
movzx eax,[X] |
mov ebx,len_kub*65536+len_kub |
mul ebx |
xchg eax,ebx |
add ebx,(beg_x*65536+beg_y-len_kub*65536+len_kub) |
movzx eax,[Y] |
mov ecx,len_kub*65536+len_kub |
mul ecx |
xchg eax,ecx |
add ecx,(beg_y*65536+beg_y+sym_y-len_kub*65536+len_kub) |
movzx eax,[Y] |
dec al |
push ebx |
movzx ebx,[Difficult] |
mul bl |
mov bl,[X] |
add al,bl |
dec al |
pop ebx |
mov esi,Map |
add esi,eax |
push dword 0 ;¥ ªãàá®à |
bt [flags],4 |
jnc @f |
mov dword [esp],1 ;ªãàá®à |
btr [flags],4 |
@@: mov edi,0 |
mov ebp,1 |
call out_numbers |
pop eax |
ret |
out_numbers: |
push ebx ecx esi |
shr ebx,16 |
inc bx |
shl ebx,16 |
add ebx,len_kub-1 |
shr ecx,16 |
inc cx |
shl ecx,16 |
add ecx,len_kub-1 |
mov edx,Bckgrd_clr |
push ebp |
dec dword [esp+4*5] |
jnz @f |
mov edx,Square_clr |
@@: mcall 13 |
pop ebp |
pop esi |
push ebx edx |
mov eax,esi |
sub eax,Map-1 |
xor edx,edx |
movzx ebx,[Difficult] |
div ebx |
push edx |
xor edx,edx |
mov ebx,max_dif |
mul ebx |
pop edx |
test edx,edx |
jnz @f |
movzx edx,[Difficult] |
sub eax,max_dif |
@@: add eax,edx |
mov al,[eax+Map-1] |
pop edx ebx |
test al,al |
; cmp byte [esi],0 |
jnz .changeable_number |
jmp .null |
.end: |
inc esi |
dec ebp |
jnz out_numbers |
test edi,edi |
jz @f |
push ebx edx |
movzx eax,[Difficult] |
sub edi,eax |
mov ebp,eax |
mov ebx,len_kub*65536 |
xor edx,edx |
mul ebx |
push eax |
movzx eax,[Difficult] |
mov ebx,len_kub |
mul ebx |
pop ebx |
add eax,ebx |
pop edx |
pop ebx |
sub ebx,eax |
; add ebx,-9*24*65536-9*24 |
add ecx,len_kub*65536+len_kub |
jmp out_numbers |
@@: |
ret |
.null: |
pop ecx ebx |
add ebx,len_kub*65536+len_kub |
jmp .end |
.changeable_number: |
push esi |
shr ebx,16 |
shr ecx,16 |
mov dx,bx |
shl edx,16 |
mov dx,cx |
add edx,8*65536+4 |
push ebx edx |
mov eax,esi |
sub eax,Map-1 |
xor edx,edx |
movzx ebx,[Difficult] |
div ebx |
push edx |
xor edx,edx |
mov ebx,max_dif |
mul ebx |
pop edx |
test edx,edx |
jnz @f |
movzx edx,[Difficult] |
sub eax,max_dif |
@@: add eax,edx |
pop edx ebx |
movzx ebx,byte [eax+Map-1];[esi] |
push esi ebp edi edx |
sub edx,2*65536-3 |
push edx |
xchg eax,ebx |
mov ebx,10 |
xor edx,edx |
div ebx |
mov ebx,edx |
pop edx |
push ebx |
test eax,eax |
jz .only_first_num |
; bt [flags],9 |
; jc .only_first_num |
xchg eax,ebx |
shl bx,4 |
add ebx,FONT |
mov ecx,8*65536+16 |
mov edi,Pltr.ch |
cmp dword [esp+4*9],0 |
jne @f |
mov edi,Pltr.chk |
@@: mov esi,1 |
mov ebp,0 |
mcall 65 |
.only_first_num: |
pop ebx |
shl bl,4 |
add ebx,FONT |
mov ecx,8*65536+16 |
add edx,8*65536 |
mov edi,Pltr.ch |
cmp dword [esp+4*8],0 |
jne @f |
mov edi,Pltr.chk |
@@: mov esi,1 |
mov ebp,0 |
mcall 65 |
pop edx edi ebp esi |
pop esi ecx ebx |
add ebx,len_kub*65536+len_kub |
jmp .end |
out_sum: |
movzx eax,[Difficult] |
push eax |
mov esi,Map |
mov edi,out_sum_buf |
.1: xor ebx,ebx |
xor ecx,ecx |
xor edx,edx |
.2: mov dl,[ebx+esi] |
add ecx,edx |
inc ebx |
cmp ebx,[esp] |
jne .2 |
mov word [edi],cx |
add edi,2 |
add esi,max_dif |
dec eax |
jnz .1 |
push out_sum_buf |
movzx eax,[Difficult] |
mov ebx,len_kub*65536 |
xor edx,edx |
mul ebx |
add eax,40*65536 |
push eax |
mov edx,(beg_x-30)*65536+beg_y+10 |
mov ebx,0x30000 |
mov esi,0x50000000+Fix_nmb_clr |
mov edi,Bckgrd_clr |
.3: mov ecx,[esp+4] |
mov cx,[ecx] |
shl ecx,16 |
shr ecx,16 |
mcall 47 |
push edx |
add edx,[esp+4] |
mcall |
pop edx |
add edx,len_kub |
add dword [esp+4],2 |
dec dword [esp+8] |
jnz .3 |
pop eax |
pop eax |
pop eax |
movzx eax,[Difficult] |
push eax |
mov esi,Map |
mov edi,out_sum_buf |
xor ebx,ebx |
.4: xor ecx,ecx |
xor edx,edx |
mov ebx,[esp] |
.5: mov dl,[esi] |
add ecx,edx |
add esi,max_dif |
dec ebx |
jnz .5 |
mov word [edi],cx |
add edi,2 |
push eax |
mov eax,max_dif |
xor edx,edx |
mul dword [esp+4] |
dec eax |
sub esi,eax |
pop eax |
dec eax |
jnz .4 |
push out_sum_buf |
movzx eax,[Difficult] |
mov ebx,len_kub |
xor edx,edx |
mul ebx |
add eax,35 |
push eax |
mov edx,(beg_x+5)*65536+beg_y-20 |
mov ebx,0x30000 |
mov esi,0x50000000+Fix_nmb_clr |
mov edi,Bckgrd_clr |
.6: mov ecx,[esp+4] |
mov ecx,[ecx] |
shl ecx,16 |
shr ecx,16 |
mcall 47 |
push edx |
add edx,[esp+4] |
mcall |
pop edx |
add edx,len_kub*65536;[esp] |
add dword [esp+4],2 |
dec dword [esp+8] |
jnz .6 |
pop eax |
pop eax |
pop eax |
ret |
out_one_sum: |
movzx ecx,[Difficult] |
mov esi,Map |
xor edx,edx |
movzx eax,[Y] |
dec al |
mov ebx,max_dif |
mul bl |
add esi,eax |
@@: mov al,[esi] |
inc esi |
add edx,eax |
loop @b |
mov ecx,edx |
movzx eax,[Difficult] |
mov ebx,len_kub*65536 |
xor edx,edx |
mul ebx |
add eax,40*65536 |
push eax |
movzx eax,[Y] |
dec eax |
mov ebx,len_kub |
xor edx,edx |
mul ebx |
mov edx,(beg_x-30)*65536+beg_y+10 |
add edx,eax |
mov ebx,0x30000 |
mov esi,0x50000000+Fix_nmb_clr |
mov edi,Bckgrd_clr |
mcall 47 |
add edx,[esp] |
mcall |
pop eax |
movzx ecx,[Difficult] |
mov esi,Map |
xor edx,edx |
movzx eax,[X] |
dec al |
add esi,eax |
@@: mov al,[esi] |
add esi,max_dif |
add edx,eax |
loop @b |
mov ecx,edx |
movzx eax,[Difficult] |
mov ebx,len_kub |
xor edx,edx |
mul ebx |
add eax,35 |
push eax |
movzx eax,[X] |
dec eax |
mov ebx,len_kub*65536 |
xor edx,edx |
mul ebx |
mov edx,eax |
add edx,(beg_x+5)*65536+beg_y-20 |
mov ebx,0x30000 |
mov esi,0x50000000+Fix_nmb_clr |
mov edi,Bckgrd_clr |
mcall 47 |
add edx,[esp] |
mcall |
pop edx |
ret |
if DEBUG |
SysMsgBoardNum: ;warning: destroys eax,ebx,ecx,esi |
mov ebx,esp |
mov ecx,8 |
mov esi,(number_to_out+1) |
.1: |
mov eax,ebx |
and eax,0xF |
add al,'0' |
cmp al,(10+'0') |
jb @f |
add al,('A'-'0'-10) |
@@: |
mov [esi+ecx],al |
shr ebx,4 |
loop .1 |
dec esi |
mcall 71,1,number_to_out |
ret |
number_to_out db '0x00000000',13,10,0 |
endf |
if lang eq ru |
title db ' £¨ç¥áª¨© ª¢ ¤à â',0 |
txt: |
.dif db "«®¦®áâì (+/-):",0 |
.clear db 'ç¨áâ¨âì (x)',0 |
else |
title db 'Magical square',0 |
txt: |
.dif db "Difficult (+/-)",0 |
.clear db 'Clear (x)',0 |
endf |
align 4 |
; «¨âàë: |
Pltr: |
.ch dd Bckgrd_clr,Chg_nmb_clr |
.chk dd Square_clr,Chg_nmb_clr |
.fx dd Bckgrd_clr,Fix_nmb_clr |
.fxk dd Square_clr,Fix_nmb_clr |
FONT file "MSquare.fnt" |
X db 1 |
Y db 1 |
Difficult db 3 |
I_END: |
align 16 |
Map rb max_dif*max_dif |
out_sum_buf rw max_dif |
flags rw 1 |
D_END: |
;¡¨â 0: á¬. ¯¥à¥¤ draw_pole |
;2: ¢ draw_pole ¨ key |
;4: in draw_one_symbol |
;9: ¢¢¥¤ñ ¯¥à¢ ï æ¨äà ç¨á« |
/programs/games/MSquare/trunk/MSquare.fnt |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/games/MSquare/trunk/editbox_ex.mac |
---|
0,0 → 1,194 |
ch_struc_size=36 |
ed_struc_size=76 |
ch_flag_en=10b |
ch_left equ [edi] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å |
ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã |
ch_text_margin equ [edi+4] ;=4 à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨ |
ch_size equ [edi+8] ;12 à §¬¥à ª¢ ¤à â 祪 ¡®ªá |
ch_color equ [edi+12] ;梥⠢ãâਠcheckbox |
ch_border_color equ [edi+16] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ïâ¥«ì® |
ch_text_color equ [edi+20];[edi+4] ;梥â ⥪áâ |
ch_text_ptr equ [edi+24] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨ |
ch_text_length equ [edi+28] |
ch_flags equ [edi+32] ;ä« £¨ |
ed_width equ [edi] ;è¨à¨ ª®¬¯®¥â |
ed_left equ [edi+4] ;¯®«®¦¥¨¥ ¯® ®á¨ å |
ed_top equ [edi+8] ;¯®«®¦¥¨¥ ¯® ®á¨ ã |
ed_color equ [edi+12] ;梥â ä® ª®¬¯®¥â |
shift_color equ [edi+16] ;=0x6a9480 ¤«ï ¯à¨¬¥à ¢®§ì¥¬ ¦¥«¥ë© 梥⠡®ªá |
ed_focus_border_color equ [edi+20] ;梥â à ¬ª¨ ª®¬¯®¥â |
ed_blur_border_color equ [edi+24] ;梥⠥ ªâ¨¢®£® ª®¬¯®¥â |
ed_text_color equ [edi+28] ;梥â ⥪áâ |
ed_max equ [edi+32] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦® ¬ ªá¨¬ «ì® ¢¢¥á⨠|
ed_text equ [edi+36] ;㪠§ â¥«ì ¡ãä¥à |
ed_mouse_variable equ [edi+40] ; 㪠§ â¥«ì ¯¥à¥¬¥ãî ¤«ï ¡®ªá /£à㯯ë |
ed_flags equ [edi+44] ;ä« £¨ |
bp_flags equ [ebp+44] ;¢ ¥ª®â®àëå ¯à®æ¥¤ãà å edi ¨á¯®«ì§ã¥âáï, ¢§ ¬¥ 㪠§ ⥫ì åà ¨âìáï ¢ ebp |
ed_size equ [edi+48] ;ª®«-¢® ᨬ¢®«®¢ |
bp_size equ [ebp+48] ;ª®«-¢® ᨬ¢¯®«®¢, ¤«ï ¤à¥á 樨 ¨á¯«ì§ã¥âáï ebp¡ edi § ïâ |
ed_pos equ [edi+52] ;¯®§¨æ¨ï ªãàá®à |
ed_offset equ [edi+56] ;ᬥ饨¥ |
cl_curs_x equ [edi+60] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å |
cl_curs_y equ [edi+64] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã |
ed_shift_pos equ [edi+68] ;¯®«®¦¥¨¥ ªãàá®à |
ed_shift_pos_old equ [edi+72] ;áâ ஥ ¯®«®¦¥¨¥ ªãàá®à |
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 ;®¤¨ ᨬ¢®«ë |
ed_always_focus= 100000000000000b |
ed_focus= 10b ;䮪ãá ¯à¨«®¦¥¨ï |
ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift |
ed_shift_on_off=1111111111110111b |
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î |
ed_shift_off= 1111111111111011b |
ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥®£® shift â.¥. ¯à¨ ãáâ ®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥¨¥ |
ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠¯à¨ 㤠«¥¨¨ ¢ë¤¥«¥¨ï |
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 ; ¢ëá®â |
.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] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å |
ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã |
ch_text_margin equ [edi+4] ;=4 à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨ |
ch_size equ [edi+8] ;12 à §¬¥à ª¢ ¤à â 祪 ¡®ªá |
ch_color equ [edi+12] ;梥⠢ãâਠcheckbox |
ch_border_color equ [edi+16] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ïâ¥«ì® |
ch_text_color equ [edi+20];[edi+4] ;梥â ⥪áâ |
ch_text_ptr equ [edi+24] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨ |
ch_text_length equ [edi+28] |
ch_flags equ [edi+32] ;ä« £¨ |
;ch_left equ [edi] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® å |
;ch_top equ [edi+2] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã |
;ch_color equ [edi+4] ;梥⠢ãâਠcheckbox |
;ch_border_color equ [edi+8] ;梥â à ¬ª¨ checkbox |
;ch_text_color equ [edi+12] ;梥â ⥪áâ |
;ch_text_ptr equ [edi+16] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨ |
;ch_text_length equ [edi+20] ;¤«¨ ¤¯¨á¨ (2^64 â ª®© ¤«¨ë ¬®¦¥â ¡ëâì ⥪áâ) |
;ch_flags equ [edi+24] ;ä« £¨ |
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 |
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá |
ch_flag_en=10b |
.left: dw left ;+0 ;¯®«®¦¥¨¥ ¯® å |
.top: dw top ;¯®«®¦¥¨¥ ¯® ã |
.ch_text_margin: dd ch_text_margin ;à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨ |
.ch_size: dd ch_size ;à §¬¥à ª¢ ¤à â 祪 ¡®ªá , ¤«ï ¯à¨¬¥à 12 |
.color: dd color ;梥⠢ãâਠ祪¡®ªá |
.border_color: dd border_color ;梥â à ¬ª¨ |
.text_color: dd text_color ;梥⠤¯¨á¨ |
.text: dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ |
.ch_text_length: dd ch_text_length ;¤«¨ áâப¨ á ᨬ¢®« ¬¨ |
.flags: dd flags+0 ; ä« £¨ |
} |
struc option_box point_gr,left,top,op_text_margin,op_size,color,border_color,text_color,text,op_text_length,flags |
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá |
op_flag_en=10b |
.option_group: dd point_gr |
.left: dw left ;+0 ;¯®«®¦¥¨¥ ¯® å |
.top: dw top ;¯®«®¦¥¨¥ ¯® ã |
.ch_text_margin: dd op_text_margin ;à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨ |
.ch_size: dd op_size ;à §¬¥à ª¢ ¤à â 祪 ¡®ªá , ¤«ï ¯à¨¬¥à 12 |
.color: dd color ;梥⠢ãâਠ祪¡®ªá |
.border_color: dd border_color ;梥â à ¬ª¨ |
.text_color: dd text_color ;梥⠤¯¨á¨ |
.text: dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ |
.ch_text_length: dd op_text_length ;¤«¨ áâப¨ á ᨬ¢®« ¬¨ |
.flags: dd flags+0 ; ä« £¨ |
} |
/programs/games/MSquare/trunk |
---|
Property changes: |
Added: tsvn:logminsize |
+5 |
\ No newline at end of property |
/programs/games/MSquare/. |
---|
Property changes: |
Added: tsvn:logminsize |
+5 |
\ No newline at end of property |