fix strange button drawing for bright buttons

git-svn-id: svn://kolibrios.org@38 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Andrey Halyavin (halyavin) 2006-01-19 09:59:26 +00:00
parent e84aefdb16
commit 14825618c3

View File

@ -1,29 +1,61 @@
max_buttons=4095 max_buttons=4095
dececx: dececx:
push eax
push edx push edx
push ecx push ecx
mov edx,1 mov edx,2
dececl: .loop:
movzx eax,byte [esp+edx] cmp byte [esp+edx],0x20
cmp eax,0x20 jae @f
jge @f
mov [esp+edx],byte 0x20 mov [esp+edx],byte 0x20
@@: @@:
sub [esp+edx],byte 0x20 sub [esp+edx],byte 0x20
add edx,1 dec edx
cmp edx,4 jns .loop
jbe dececl
pop ecx pop ecx
pop edx pop edx
pop eax
ret 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: drawbuttonframes:
@ -50,7 +82,7 @@ drawbuttonframes:
mov esi,ebx mov esi,ebx
mov edi,0 mov edi,0
mov ecx,[esp+0] mov ecx,[esp+0]
add ecx,0x202020 call incecx
call [draw_line] call [draw_line]
movzx edx,word [esp+8] movzx edx,word [esp+8]
@ -74,7 +106,7 @@ drawbuttonframes:
pop edx pop edx
mov edi,0 mov edi,0
mov ecx,[esp+0] mov ecx,[esp+0]
add ecx,0x202020 call incecx
call [draw_line] call [draw_line]
mov esi,edx mov esi,edx
@ -164,7 +196,7 @@ sys_button:
mov ecx,[4+32+esp+0] mov ecx,[4+32+esp+0]
cmp [buttontype],dword 0 cmp [buttontype],dword 0
je @f je @f
add ecx,0x141414 call incecx2
@@: @@:
movzx edi,word [esp] movzx edi,word [esp]