mirror of
https://github.com/cc65/cc65.git
synced 2024-07-07 04:29:01 +00:00
Fix width calculation for bitmap font output. Use new 8x16 multiplication
routines to save some cycles. git-svn-id: svn://svn.cc65.org/cc65/trunk@5080 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
655ffe5dcd
commit
ca9d802d1e
@ -8,7 +8,7 @@
|
|||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
|
|
||||||
.import _strlen, _toascii
|
.import _strlen, _toascii
|
||||||
.import umul16x16r32
|
.import umul8x16r16
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Aliases for zero page locations
|
; Aliases for zero page locations
|
||||||
@ -36,12 +36,13 @@ Text := ptr3
|
|||||||
|
|
||||||
; Return the width of the string for the bitmap font
|
; Return the width of the string for the bitmap font
|
||||||
|
|
||||||
jsr _strlen
|
ldy _tgi_charwidth
|
||||||
sta ptr1
|
sta ptr1
|
||||||
stx ptr1+1
|
jsr _strlen
|
||||||
lda _tgi_charwidth
|
jsr umul8x16r16
|
||||||
ldx #0
|
ldy _tgi_textscalew+2 ; Get rounded scale factor
|
||||||
jmp umul16x16r32
|
sta ptr1
|
||||||
|
jmp umul8x16r16
|
||||||
|
|
||||||
; Return the width of the string for the vector font. To save some code, we
|
; Return the width of the string for the vector font. To save some code, we
|
||||||
; will add up all the character widths and then multiply by the scale factor.
|
; will add up all the character widths and then multiply by the scale factor.
|
||||||
|
Loading…
Reference in New Issue
Block a user