Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5921 → Rev 5867

/kernel/trunk/gui/font.inc
49,7 → 49,7
shl ebx, 2
add eax, ebx
js .ret
add edi, eax
add edi, eax ; linear address (32bit)
mov eax, ecx
mov ebx, ecx
test ecx, ecx
60,7 → 60,7
and cl, 7
inc ecx
push ebp ecx esi
mov esi, edx
mov esi, edx ; -> string
or eax, 0xFF000000
bt ebx, 27
jc .bufferReady
80,9 → 80,9
mov edx, eax
mov eax, [esp+24]
cmp eax, -1
jnz @f
jnz .background
mov [esp+28], edi
@@:
.background:
mov edi, edx
rep stosd
mov edi, edx
100,10 → 100,6
bt ebx, 28
jc .drawUTF8
 
; ebp = font color
; esi -> string
; edi -> buffer
 
; Stack map:
; char counter +0
fontMultiplier = 4
119,7 → 115,8
.drawUTF16:
dec dword [esp]
js .done
movzx ebx, word [esi]
xor ebx, ebx
mov bx, [esi]
test ebx, ebx
jz .done
inc esi
144,7 → 141,8
dec dword [esp]
js .done
@@:
movzx ebx, byte [esi]
xor ebx, ebx
mov bl, [esi]
inc esi
test bl, bl
jz .done
151,26 → 149,19
jns .valid
shl bx, 10
jnc @b
shr bh, 2
mov bl, [esi]
test bl, bl
jns @b
shl bl, 2
jc @b
shr bh, 2
shr bx, 2
inc esi
cmp bx, 1419
jc .valid
shl bh, 4
shl bx, 4
@@:
jns @f
.tail:
mov bl, [esi]
shl bl, 1
jnc @b
js @b
inc esi
shl bh, 1
js .tail
shl bx, 1
jmp @b
@@:
xor ebx, ebx
.valid:
189,7 → 180,8
.draw866:
dec dword [esp]
js .done
movzx ebx, byte [esi]
xor ebx, ebx
mov bl, [esi]
test ebx, ebx
jz .done
inc esi
207,7 → 199,8
.draw866toUni:
dec dword [esp]
js .done
movzx eax, byte [esi]
xor eax, eax
mov al, [esi]
test eax, eax
jz .done
call ansi2uni_char
267,10 → 260,6
 
; scaling/smoothing algorithm
drawChar:
; ebp = font color
; esi = font multiplier
; edi -> buffer
; ebx -> char data
mov dl, [ebx]
.raw:
bsf eax, edx