10,41 → 10,39 |
|
align 4 |
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
; eax x & y |
; ebx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
; ebx x & y |
; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
; X = ABnnb: |
; nn = font |
; A = 0 <=> output edx characters; otherwise output ASCIIZ string |
; B = 1 <=> fill background with color esi |
; ecx start of text |
; A = 0 <=> output esi characters; otherwise output ASCIIZ string |
; B = 1 <=> fill background with color eax |
; edx start of text |
; edi 1 force |
|
pushad |
call [disable_mouse] |
|
mov ebp, ecx ; ebp=pointer to text |
mov ecx, ebx ; ecx=color |
movsx ebx, ax ; ebx=y |
sar eax, 16 ; eax=x |
cmp edx, 255 |
movsx eax, bx ; eax=y |
sar ebx, 16 ; ebx=x |
xchg eax, ebx ; eax=x, ebx=y |
cmp esi, 255 |
jb .loop |
mov edx, 255 |
mov esi, 255 |
.loop: |
test ecx, ecx |
js .test_asciiz |
dec edx |
dec esi |
js .end |
jmp @f |
.test_asciiz: |
cmp byte [ebp], 0 |
cmp byte [edx], 0 |
jz .end |
@@: |
push edx |
movzx edx, byte [ebp] |
inc ebp |
inc edx |
pushad |
movzx edx, byte [edx-1] |
test ecx, 0x10000000 |
jnz .font2 |
pushad |
mov esi, 9 |
lea ebp, [FONT_I+8*edx+edx] |
.symloop1: |
60,7 → 58,7 |
test ecx, 0x40000000 |
jz .pixloop1cont |
push ecx |
mov ecx, [esp+4+4] |
mov ecx, [esp+4+20h+1Ch] |
call [putpixel] |
pop ecx |
.pixloop1cont: |
74,10 → 72,8 |
jnz .symloop1 |
popad |
add eax, 6 |
pop edx |
jmp .loop |
.font2: |
pushad |
add edx, edx |
lea ebp, [FONT_II+4*edx+edx+1] |
push 9 |
94,7 → 90,7 |
test ecx, 0x40000000 |
jz .pixloop2cont |
push ecx |
mov ecx, [esp+12+4] |
mov ecx, [esp+12+20h+1Ch] |
call [putpixel] |
pop ecx |
.pixloop2cont: |
110,7 → 106,6 |
pop eax |
add dword [esp+28], esi |
popad |
pop edx |
jmp .loop |
.end: |
popad |