]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_gettextwidth.s
Added library reference address to lightpen driver header.
[cc65] / libsrc / tgi / tgi_gettextwidth.s
index 9b39fb6a659d5cbef413715ec96edd9f01563403..c7bbcffd1b59d6e2993a234436299cf705ee04f8 100644 (file)
@@ -29,18 +29,15 @@ Text    := ptr3
 ;
 
 .code
-.proc   _tgi_gettextwidth         
+.proc   _tgi_gettextwidth
 
         ldy     _tgi_font
         bne     @L1                     ; Jump if vector font
 
 ; 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
+        ldy     _tgi_charwidth+1
         sty     ptr1
         jmp     umul8x16r16