/kernel/trunk/gui/button.inc |
---|
1,62 → 1,30 |
max_buttons=4095 |
dececx: |
push eax |
push edx |
push ecx |
mov edx,2 |
.loop: |
mov edx,1 |
dececl: |
cmp byte [esp+edx],0x20 |
jae @f |
movzx eax,byte [esp+edx] |
cmp eax,0x20 |
jge @f |
mov [esp+edx],byte 0x20 |
@@: |
sub [esp+edx],byte 0x20 |
dec edx |
jns .loop |
add edx,1 |
cmp edx,4 |
jbe dececl |
pop ecx |
pop edx |
pop eax |
ret |
incecx: |
push edx |
push ecx |
mov edx,2 |
.loop: |
cmp byte [esp+edx],0xdf |
jbe @f |
mov [esp+edx],byte 0xdf |
@@: |
add [esp+edx],byte 0x20 |
dec edx |
jns .loop |
pop ecx |
pop edx |
ret |
incecx2: |
push edx |
push ecx |
mov edx,2 |
.loop: |
cmp byte [esp+edx],0xeb |
jbe @f |
mov [esp+edx],byte 0xeb |
@@: |
add [esp+edx],byte 0x14 |
dec edx |
jns .loop |
pop ecx |
pop edx |
ret |
drawbuttonframes: |
push esi |
82,7 → 50,7 |
mov esi,ebx |
mov edi,0 |
mov ecx,[esp+0] |
call incecx |
add ecx,0x202020 |
call [draw_line] |
movzx edx,word [esp+8] |
106,7 → 74,7 |
pop edx |
mov edi,0 |
mov ecx,[esp+0] |
call incecx |
add ecx,0x202020 |
call [draw_line] |
mov esi,edx |
196,7 → 164,7 |
mov ecx,[4+32+esp+0] |
cmp [buttontype],dword 0 |
je @f |
call incecx2 |
add ecx,0x141414 |
@@: |
movzx edi,word [esp] |