forked from KolibriOS/kolibrios
fix for draw not ASCIIZ
git-svn-id: svn://kolibrios.org@7103 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4786fa5e85
commit
5721df73ee
@ -19,12 +19,21 @@ dtext:
|
|||||||
; FF=3: UTF-8 8x16, FF=2: UTF-16LE 8x16
|
; FF=3: UTF-8 8x16, FF=2: UTF-16LE 8x16
|
||||||
; FF=1: cp866 8x16, FF=0: cp866 6x9
|
; FF=1: cp866 8x16, FF=0: cp866 6x9
|
||||||
; SSS = (font multiplier)-1
|
; SSS = (font multiplier)-1
|
||||||
; edi=1: force output
|
; edi=1: force output
|
||||||
|
; flag CF=1 means that we deal with asciiz but need to draw no more than esi symbols
|
||||||
|
clc
|
||||||
|
._:
|
||||||
|
push ecx edx
|
||||||
|
setc dl
|
||||||
and eax, 0xFFFFFF
|
and eax, 0xFFFFFF
|
||||||
|
and ecx, 1 shl 31
|
||||||
|
shl edx, 29
|
||||||
|
or eax, ecx
|
||||||
|
or eax, edx
|
||||||
|
pop edx ecx
|
||||||
bt ecx, 30
|
bt ecx, 30
|
||||||
jc @f
|
jc @f
|
||||||
xor eax, eax
|
or eax, 1 shl 30
|
||||||
dec eax
|
|
||||||
@@:
|
@@:
|
||||||
pushd 0 0 0 eax
|
pushd 0 0 0 eax
|
||||||
movsx eax, bx
|
movsx eax, bx
|
||||||
@ -79,10 +88,14 @@ dtext:
|
|||||||
sub edi, eax
|
sub edi, eax
|
||||||
mov edx, eax
|
mov edx, eax
|
||||||
mov eax, [esp+24]
|
mov eax, [esp+24]
|
||||||
cmp eax, -1
|
test eax, 1 shl 30
|
||||||
jnz @f
|
jz @f
|
||||||
|
or eax, -1
|
||||||
mov [esp+28], edi
|
mov [esp+28], edi
|
||||||
@@:
|
jmp .1
|
||||||
|
@@:
|
||||||
|
and eax, 0x00ffffff
|
||||||
|
.1:
|
||||||
mov edi, edx
|
mov edi, edx
|
||||||
rep stosd
|
rep stosd
|
||||||
mov edi, edx
|
mov edi, edx
|
||||||
@ -132,7 +145,7 @@ widthX = 8
|
|||||||
; edi +12
|
; edi +12
|
||||||
; X +16
|
; X +16
|
||||||
; Y +20
|
; Y +20
|
||||||
; background +24
|
; internal flags & background +24
|
||||||
deltaToScreen = 28
|
deltaToScreen = 28
|
||||||
; temp buffer height +32
|
; temp buffer height +32
|
||||||
; temp buffer pointer +36
|
; temp buffer pointer +36
|
||||||
@ -141,8 +154,14 @@ deltaToScreen = 28
|
|||||||
dec dword [esp]
|
dec dword [esp]
|
||||||
js .done
|
js .done
|
||||||
movzx ebx, word [esi]
|
movzx ebx, word [esi]
|
||||||
|
test dword [esp + 24], 1 shl 31
|
||||||
|
jnz @f
|
||||||
|
test dword [esp + 24], 1 shl 29
|
||||||
|
jz .u16Still
|
||||||
|
@@:
|
||||||
test ebx, ebx
|
test ebx, ebx
|
||||||
jz .done
|
jz .done
|
||||||
|
.u16Still:
|
||||||
inc esi
|
inc esi
|
||||||
inc esi
|
inc esi
|
||||||
cmp bx, 1419
|
cmp bx, 1419
|
||||||
@ -166,8 +185,14 @@ deltaToScreen = 28
|
|||||||
js .done
|
js .done
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
call utf8to16
|
call utf8to16
|
||||||
|
test dword [esp + 24], 1 shl 31
|
||||||
|
jnz @f
|
||||||
|
test dword [esp + 24], 1 shl 29
|
||||||
|
jz .u8Still
|
||||||
|
@@:
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .done
|
jz .done
|
||||||
|
.u8Still:
|
||||||
cmp eax, 1419
|
cmp eax, 1419
|
||||||
jc @f
|
jc @f
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -188,8 +213,14 @@ deltaToScreen = 28
|
|||||||
dec dword [esp]
|
dec dword [esp]
|
||||||
js .done
|
js .done
|
||||||
movzx ebx, byte [esi]
|
movzx ebx, byte [esi]
|
||||||
|
test dword [esp + 24], 1 shl 31
|
||||||
|
jnz @f
|
||||||
|
test dword [esp + 24], 1 shl 29
|
||||||
|
jz .866Still
|
||||||
|
@@:
|
||||||
test ebx, ebx
|
test ebx, ebx
|
||||||
jz .done
|
jz .done
|
||||||
|
.866Still:
|
||||||
inc esi
|
inc esi
|
||||||
pushd esi edi 9
|
pushd esi edi 9
|
||||||
lea ebx, [ebx*8+ebx+font1]
|
lea ebx, [ebx*8+ebx+font1]
|
||||||
@ -206,8 +237,14 @@ deltaToScreen = 28
|
|||||||
dec dword [esp]
|
dec dword [esp]
|
||||||
js .done
|
js .done
|
||||||
movzx eax, byte [esi]
|
movzx eax, byte [esi]
|
||||||
|
test dword [esp + 24], 1 shl 31
|
||||||
|
jnz @f
|
||||||
|
test dword [esp + 24], 1 shl 29
|
||||||
|
jz .8662uStill
|
||||||
|
@@:
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .done
|
jz .done
|
||||||
|
.8662uStill:
|
||||||
call ansi2uni_char
|
call ansi2uni_char
|
||||||
shl eax, 4
|
shl eax, 4
|
||||||
lea ebx, [eax+fontUni]
|
lea ebx, [eax+fontUni]
|
||||||
|
@ -2265,9 +2265,10 @@ align 4
|
|||||||
inc edx
|
inc edx
|
||||||
@@:
|
@@:
|
||||||
shl eax, 28
|
shl eax, 28
|
||||||
or ecx, eax
|
or ecx, eax
|
||||||
xor edi, edi
|
xor edi, edi
|
||||||
call dtext
|
stc
|
||||||
|
call dtext._
|
||||||
.exit:
|
.exit:
|
||||||
jmp __sys_draw_pointer
|
jmp __sys_draw_pointer
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user