]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_lineto.s
remove superfluous ".code" line
[cc65] / libsrc / tgi / tgi_lineto.s
index 4799d793a4ce0fc3b86bbf84b6f57ea2ac1fe386..868f4cf4222cd2ab05ad98bd78f52ee4302f940b 100644 (file)
@@ -9,11 +9,18 @@
         .include        "tgi-kernel.inc"
 
         .import         popax
-        .export         _tgi_lineto
 
-_tgi_lineto:
-        jsr     tgi_curtoxy     ; Copy curx/cury into ptr1/ptr2
-        jsr     tgi_linepop     ; Pop x2/y2 into ptr3/ptr4 and curx/cury
-        jmp     tgi_line        ; Call the driver
+.proc   _tgi_lineto
 
+        pha
+        ldy     #3              ; Copy curx/cury to tgi_clip_x1/tgi_clip_y1
+@L1:    lda     _tgi_curx,y
+        sta     tgi_clip_x1,y
+        dey
+        bpl     @L1  
+        pla
+        jsr     tgi_linepop     ; Pop x2/y2
+        jmp     tgi_clippedline ; Call the line clipper
+
+.endproc