routines to save some cycles.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5080
b7a2c559-68d2-44c3-8de9-
860c34a00d81
.include "zeropage.inc"
.import _strlen, _toascii
- .import umul16x16r32
+ .import umul8x16r16
;-----------------------------------------------------------------------------
; Aliases for zero page locations
; Return the width of the string for the bitmap font
+ ldy _tgi_charwidth
+ sta ptr1
jsr _strlen
+ jsr umul8x16r16
+ ldy _tgi_textscalew+2 ; Get rounded scale factor
sta ptr1
- stx ptr1+1
- lda _tgi_charwidth
- ldx #0
- jmp umul16x16r32
+ jmp umul8x16r16
; 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.
tay
lda (WTab),y ; Get width of this char
clc
- adc Width
+ adc Width
sta Width
bcc @L3
inc Width+1