NSV-fonts: tickfields renumerated

git-svn-id: svn://kolibrios.org@2499 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Artem Jerdev (art_zh) 2012-03-23 01:10:27 +00:00
parent 05bd5db1d7
commit 3017a820d3
2 changed files with 853 additions and 842 deletions

View File

@ -214,14 +214,17 @@ diff16 "parse_tick : ",0,$
pushad
mov dx, word[edx]
movzx ecx, dl
test dl, 0xE0 ; ticks #32..255
jz .lntick.short
test dl, 0xE0
jz .lntick.short ; ticks #0..31
cmp dl, 0xE0
jae .lntick.long
cmp dl, 0xC0
jae .cstick
jae .lntick.long ; ticks #224..255
cmp dl, 0xD8
jae .cstick ; ticks #216..223
.gptick:
push edx
cmp dl, 38
jb .sptick ; special ticks #32-37
; general ticks #38..215
mov cl, dh
shr cl, 3 ; number of origin
mov edx, [ebp+8] ; orig. table
@ -230,31 +233,32 @@ diff16 "parse_tick : ",0,$
mov cl, dh
and cl, 7 ; three rotation bits
movzx edx, dl ; dl = gptick#
sub dl, 32
cmp dl, (sdsh_data.v5-sdsh_data.v1)
cmp dl, 80
jae .gptick.2
sub dl, 38
.gptick.1:
; 1-byte tickgroups .v1-v4:
lea esi, [sdsh_data.v1+edx]
inc dh
sub dl, 2 ; .v1 : 2 ticks only (#32, 33)
inc dh ; dh = 1 vertex
sub dl, 2 ; .v1 : 2 ticks only (#38, 39)
jae .gptick.1v2v4
mov dl, dh
mov dh, ch
jmp .draw
.gptick.1v2v4:
; 1-byte tickgroups .v2-v4 : 8 ticks each
inc dh
shr dl, 3
; 1-byte tickgroups .v2-v4 : 8, 16 and 16 ticks
inc dh ; dh = 2 vertice
add dl, 8
shr dl, 4
jmp .gptick.done
.gptick.2:
; 2-byte tickgroups .v5-v8: 8 ticks each
sub dl, (sdsh_data.v5-sdsh_data.v1)
cmp dl, (sdsh_data.v9-sdsh_data.v5)
cmp dl, 112
jae .gptick.3
sub dl, 80
lea esi, [sdsh_data.v5 + edx*2]
mov dh, 5
shr dl, 3
@ -262,9 +266,9 @@ diff16 "parse_tick : ",0,$
.gptick.3:
; 3-byte tickgroups .v9-12: 4 ticks each
sub dl, (sdsh_data.v9-sdsh_data.v5)
cmp dl, (sdsh_data.v13-sdsh_data.v9)
cmp dl, 128
jae .gptick.4
sub dl, 112
lea esi, [sdsh_data.v9 + edx*2 + edx]
mov dh, 9
shr dl, 2
@ -272,9 +276,9 @@ diff16 "parse_tick : ",0,$
.gptick.4:
; 4-byte tickgroups .v13-16: 4 ticks each
sub dl, (sdsh_data.v13-sdsh_data.v9)
cmp dl, 16
jae .exit
cmp dl, 128 ; fix this when needed
jae .exit ; not implemented yet!
sub dl, 128
lea esi, [sdsh_data.v13 + edx*4]
mov dh, 13
shr dl, 2
@ -352,6 +356,7 @@ diff16 "parse_tick : ",0,$
pop ecx
call draw_tick
.gptick.5:
.sptick:
.exit:
popad
ret
@ -496,7 +501,7 @@ ch_checkwin:
align 4
diff16 "ch_putpix : ",0,$
ch_putpixel:
; ch_putpixel:
; eax = x coordinate
; ebx = y coordinate
; edi = 0x0RRGGBB
@ -508,6 +513,24 @@ ch_putpixel:
pop edx
ret
;)
ch_putpixel:
; test version!!! ===== to be removed!!
; eax = x coordinate
; ebx = y coordinate
; edi = 0x0RRGGBB
push edx
mov edx, ebx
shl edx, 1
imul edx, [BytesPerScanLine]
lea edx, [edx+eax*8]
add edx, LFB_BASE
mov [edx], edi
mov [edx+4], edi
sub edx, [BytesPerScanLine]
mov [edx], edi
mov [edx+4], edi
pop edx
ret
diff10 "new font code size",sdsh_code,$

File diff suppressed because it is too large Load Diff