forked from KolibriOS/kolibrios
NSV-fonts: tickfields renumerated
git-svn-id: svn://kolibrios.org@2499 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
05bd5db1d7
commit
3017a820d3
@ -214,14 +214,17 @@ diff16 "parse_tick : ",0,$
|
|||||||
pushad
|
pushad
|
||||||
mov dx, word[edx]
|
mov dx, word[edx]
|
||||||
movzx ecx, dl
|
movzx ecx, dl
|
||||||
test dl, 0xE0 ; ticks #32..255
|
test dl, 0xE0
|
||||||
jz .lntick.short
|
jz .lntick.short ; ticks #0..31
|
||||||
cmp dl, 0xE0
|
cmp dl, 0xE0
|
||||||
jae .lntick.long
|
jae .lntick.long ; ticks #224..255
|
||||||
cmp dl, 0xC0
|
cmp dl, 0xD8
|
||||||
jae .cstick
|
jae .cstick ; ticks #216..223
|
||||||
.gptick:
|
.gptick:
|
||||||
push edx
|
push edx
|
||||||
|
cmp dl, 38
|
||||||
|
jb .sptick ; special ticks #32-37
|
||||||
|
; general ticks #38..215
|
||||||
mov cl, dh
|
mov cl, dh
|
||||||
shr cl, 3 ; number of origin
|
shr cl, 3 ; number of origin
|
||||||
mov edx, [ebp+8] ; orig. table
|
mov edx, [ebp+8] ; orig. table
|
||||||
@ -229,32 +232,33 @@ diff16 "parse_tick : ",0,$
|
|||||||
pop edx
|
pop edx
|
||||||
mov cl, dh
|
mov cl, dh
|
||||||
and cl, 7 ; three rotation bits
|
and cl, 7 ; three rotation bits
|
||||||
movzx edx, dl ; dl = gptick#
|
movzx edx, dl ; dl = gptick#
|
||||||
sub dl, 32
|
cmp dl, 80
|
||||||
cmp dl, (sdsh_data.v5-sdsh_data.v1)
|
|
||||||
jae .gptick.2
|
jae .gptick.2
|
||||||
|
sub dl, 38
|
||||||
|
|
||||||
.gptick.1:
|
.gptick.1:
|
||||||
; 1-byte tickgroups .v1-v4:
|
; 1-byte tickgroups .v1-v4:
|
||||||
lea esi, [sdsh_data.v1+edx]
|
lea esi, [sdsh_data.v1+edx]
|
||||||
inc dh
|
inc dh ; dh = 1 vertex
|
||||||
sub dl, 2 ; .v1 : 2 ticks only (#32, 33)
|
sub dl, 2 ; .v1 : 2 ticks only (#38, 39)
|
||||||
jae .gptick.1v2v4
|
jae .gptick.1v2v4
|
||||||
mov dl, dh
|
mov dl, dh
|
||||||
mov dh, ch
|
mov dh, ch
|
||||||
jmp .draw
|
jmp .draw
|
||||||
|
|
||||||
.gptick.1v2v4:
|
.gptick.1v2v4:
|
||||||
; 1-byte tickgroups .v2-v4 : 8 ticks each
|
; 1-byte tickgroups .v2-v4 : 8, 16 and 16 ticks
|
||||||
inc dh
|
inc dh ; dh = 2 vertice
|
||||||
shr dl, 3
|
add dl, 8
|
||||||
|
shr dl, 4
|
||||||
jmp .gptick.done
|
jmp .gptick.done
|
||||||
|
|
||||||
.gptick.2:
|
.gptick.2:
|
||||||
; 2-byte tickgroups .v5-v8: 8 ticks each
|
; 2-byte tickgroups .v5-v8: 8 ticks each
|
||||||
sub dl, (sdsh_data.v5-sdsh_data.v1)
|
cmp dl, 112
|
||||||
cmp dl, (sdsh_data.v9-sdsh_data.v5)
|
|
||||||
jae .gptick.3
|
jae .gptick.3
|
||||||
|
sub dl, 80
|
||||||
lea esi, [sdsh_data.v5 + edx*2]
|
lea esi, [sdsh_data.v5 + edx*2]
|
||||||
mov dh, 5
|
mov dh, 5
|
||||||
shr dl, 3
|
shr dl, 3
|
||||||
@ -262,9 +266,9 @@ diff16 "parse_tick : ",0,$
|
|||||||
|
|
||||||
.gptick.3:
|
.gptick.3:
|
||||||
; 3-byte tickgroups .v9-12: 4 ticks each
|
; 3-byte tickgroups .v9-12: 4 ticks each
|
||||||
sub dl, (sdsh_data.v9-sdsh_data.v5)
|
cmp dl, 128
|
||||||
cmp dl, (sdsh_data.v13-sdsh_data.v9)
|
|
||||||
jae .gptick.4
|
jae .gptick.4
|
||||||
|
sub dl, 112
|
||||||
lea esi, [sdsh_data.v9 + edx*2 + edx]
|
lea esi, [sdsh_data.v9 + edx*2 + edx]
|
||||||
mov dh, 9
|
mov dh, 9
|
||||||
shr dl, 2
|
shr dl, 2
|
||||||
@ -272,9 +276,9 @@ diff16 "parse_tick : ",0,$
|
|||||||
|
|
||||||
.gptick.4:
|
.gptick.4:
|
||||||
; 4-byte tickgroups .v13-16: 4 ticks each
|
; 4-byte tickgroups .v13-16: 4 ticks each
|
||||||
sub dl, (sdsh_data.v13-sdsh_data.v9)
|
cmp dl, 128 ; fix this when needed
|
||||||
cmp dl, 16
|
jae .exit ; not implemented yet!
|
||||||
jae .exit
|
sub dl, 128
|
||||||
lea esi, [sdsh_data.v13 + edx*4]
|
lea esi, [sdsh_data.v13 + edx*4]
|
||||||
mov dh, 13
|
mov dh, 13
|
||||||
shr dl, 2
|
shr dl, 2
|
||||||
@ -313,7 +317,7 @@ diff16 "parse_tick : ",0,$
|
|||||||
test dl, 1
|
test dl, 1
|
||||||
jnz .ritick.1
|
jnz .ritick.1
|
||||||
.ritick.0:
|
.ritick.0:
|
||||||
movzx ecx, dh ; y
|
movzx ecx, dh ; y
|
||||||
and cl, 0x0F
|
and cl, 0x0F
|
||||||
sub ebx, ecx
|
sub ebx, ecx
|
||||||
mov cl, dh
|
mov cl, dh
|
||||||
@ -343,7 +347,7 @@ diff16 "parse_tick : ",0,$
|
|||||||
.draw:
|
.draw:
|
||||||
; cl = rot; dl = numvert; dh = orig.xy
|
; cl = rot; dl = numvert; dh = orig.xy
|
||||||
push ecx
|
push ecx
|
||||||
movzx ecx, dh ; y
|
movzx ecx, dh ; y
|
||||||
and cl, 0x0F
|
and cl, 0x0F
|
||||||
sub ebx, ecx
|
sub ebx, ecx
|
||||||
mov cl, dh
|
mov cl, dh
|
||||||
@ -352,6 +356,7 @@ diff16 "parse_tick : ",0,$
|
|||||||
pop ecx
|
pop ecx
|
||||||
call draw_tick
|
call draw_tick
|
||||||
.gptick.5:
|
.gptick.5:
|
||||||
|
.sptick:
|
||||||
.exit:
|
.exit:
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -373,35 +378,35 @@ draw_tick:
|
|||||||
lea ebp, [.move000+ ecx*4]
|
lea ebp, [.move000+ ecx*4]
|
||||||
call ebp ; basic vector
|
call ebp ; basic vector
|
||||||
call ch_putpixel
|
call ch_putpixel
|
||||||
and edx, 15
|
and edx, 15
|
||||||
jz .done ; no vertex (2pix line)
|
jz .done ; no vertex (2pix line)
|
||||||
mov esi, dword [esi] ; 15 vertice will easily fit to 1dw
|
mov esi, dword [esi] ; 15 vertice will easily fit to 1dw
|
||||||
xchg esi, edx
|
xchg esi, edx
|
||||||
.move_and_draw:
|
.move_and_draw:
|
||||||
mov ch, dl
|
mov ch, dl
|
||||||
and ch, 3
|
and ch, 3
|
||||||
jz .moved
|
jz .moved
|
||||||
dec ch
|
dec ch
|
||||||
jz .1
|
jz .1
|
||||||
dec ch
|
dec ch
|
||||||
jz .2
|
jz .2
|
||||||
.3:
|
.3:
|
||||||
dec cl
|
dec cl
|
||||||
.1:
|
.1:
|
||||||
dec cl
|
dec cl
|
||||||
jmp .wipe_it
|
jmp .wipe_it
|
||||||
.2:
|
.2:
|
||||||
inc cl
|
inc cl
|
||||||
.wipe_it:
|
.wipe_it:
|
||||||
and ecx, 7
|
and ecx, 7
|
||||||
.moved:
|
.moved:
|
||||||
diff16 "moved : ",0,$
|
diff16 "moved : ",0,$
|
||||||
lea ebp, [.move000+ ecx*4]
|
lea ebp, [.move000+ ecx*4]
|
||||||
call ebp ; go new way
|
call ebp ; go new way
|
||||||
call ch_putpixel
|
call ch_putpixel
|
||||||
shr edx, 2
|
shr edx, 2
|
||||||
dec esi
|
dec esi
|
||||||
jnz .move_and_draw
|
jnz .move_and_draw
|
||||||
diff16 "done : ",0,$
|
diff16 "done : ",0,$
|
||||||
.done:
|
.done:
|
||||||
popad
|
popad
|
||||||
@ -496,7 +501,7 @@ ch_checkwin:
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
diff16 "ch_putpix : ",0,$
|
diff16 "ch_putpix : ",0,$
|
||||||
ch_putpixel:
|
; ch_putpixel:
|
||||||
; eax = x coordinate
|
; eax = x coordinate
|
||||||
; ebx = y coordinate
|
; ebx = y coordinate
|
||||||
; edi = 0x0RRGGBB
|
; edi = 0x0RRGGBB
|
||||||
@ -508,6 +513,24 @@ ch_putpixel:
|
|||||||
pop edx
|
pop edx
|
||||||
ret
|
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,$
|
diff10 "new font code size",sdsh_code,$
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user