From 7cafe5bbdeb4b4a715a9c3b55479aad6d4727f7e Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 12 Nov 2003 15:54:41 +0000 Subject: [PATCH] Removed the HORLINE entry point git-svn-id: svn://svn.cc65.org/cc65/trunk@2646 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- asminc/tgi-kernel.inc | 17 +++++++---------- include/tgi/tgi-kernel.h | 5 ++--- libsrc/c64/c64-320-200-2.s | 11 +++++++++-- libsrc/tgi/tgi-kernel.s | 1 - 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/asminc/tgi-kernel.inc b/asminc/tgi-kernel.inc index 4a6712d5d..00f7e5c12 100644 --- a/asminc/tgi-kernel.inc +++ b/asminc/tgi-kernel.inc @@ -7,7 +7,7 @@ ;* */ ;* */ ;* (C) 2002-2003 Ullrich von Bassewitz */ -;* Römerstrasse 52 */ +;* Römerstraße 52 */ ;* D-70794 Filderstadt */ ;* EMail: uz@cc65.org */ ;* */ @@ -62,14 +62,13 @@ TGI_HDR_GETPALETTE = TGI_HDR_JUMPTAB+22 ; GETPALETTE routine TGI_HDR_GETDEFPALETTE = TGI_HDR_JUMPTAB+24 ; GETDEFPALETTE routine TGI_HDR_SETPIXEL = TGI_HDR_JUMPTAB+26 ; SETPIXEL routine TGI_HDR_GETPIXEL = TGI_HDR_JUMPTAB+28 ; GETPIXEL routine -TGI_HDR_HORLINE = TGI_HDR_JUMPTAB+30 ; HORLINE routine -TGI_HDR_LINE = TGI_HDR_JUMPTAB+32 ; LINE routine -TGI_HDR_BAR = TGI_HDR_JUMPTAB+34 ; BAR routine -TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+36 ; CIRCLE routine -TGI_HDR_TEXTSTYLE = TGI_HDR_JUMPTAB+39 ; TEXTSTYLE routine -TGI_HDR_OUTTEXT = TGI_HDR_JUMPTAB+42 ; OUTTEXT routine +TGI_HDR_LINE = TGI_HDR_JUMPTAB+30 ; LINE routine +TGI_HDR_BAR = TGI_HDR_JUMPTAB+32 ; BAR routine +TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+34 ; CIRCLE routine +TGI_HDR_TEXTSTYLE = TGI_HDR_JUMPTAB+36 ; TEXTSTYLE routine +TGI_HDR_OUTTEXT = TGI_HDR_JUMPTAB+38 ; OUTTEXT routine -TGI_HDR_JUMPCOUNT = 21 ; Number of jump vectors +TGI_HDR_JUMPCOUNT = 20 ; Number of jump vectors ;------------------------------------------------------------------------------ ; The TGI API version, stored at TGI_HDR_VERSION @@ -119,7 +118,6 @@ TGI_TEXT_VERTICAL = 1 .global tgi_getdefpalette .global tgi_setpixel .global tgi_getpixel - .global tgi_horline .global tgi_line .global tgi_bar .global tgi_circle @@ -178,4 +176,3 @@ TGI_TEXT_VERTICAL = 1 .global _tgi_outtextxy - diff --git a/include/tgi/tgi-kernel.h b/include/tgi/tgi-kernel.h index e8982d199..8a23e3311 100644 --- a/include/tgi/tgi-kernel.h +++ b/include/tgi/tgi-kernel.h @@ -7,7 +7,7 @@ /* */ /* */ /* (C) 2002-2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ +/* Römerstraße 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ @@ -46,7 +46,7 @@ /* A structure that describes the header of a graphics driver loaded into * memory. - */ + */ typedef struct { /* Data that describes the capabilities of the driver */ @@ -74,7 +74,6 @@ typedef struct { void* getdefpalette; /* GETDEFPALETTE routine */ void* setpixel; /* SETPIXEL routine */ void* getpixel; /* GETPIXEL routine */ - void* horline; /* HORLINE routine */ void* line; /* LINE routine */ void* bar; /* BAR routine */ void* circle; /* CIRCLE routine */ diff --git a/libsrc/c64/c64-320-200-2.s b/libsrc/c64/c64-320-200-2.s index b6301a894..5b4c367b2 100644 --- a/libsrc/c64/c64-320-200-2.s +++ b/libsrc/c64/c64-320-200-2.s @@ -53,7 +53,6 @@ .word GETDEFPALETTE .word SETPIXEL .word GETPIXEL - .word HORLINE .word LINE .word BAR .word CIRCLE @@ -819,6 +818,10 @@ FIXY: cpy #255 ;Y=255 or Y=8 ; ; Must set an error code: NO ; + +; Note: This function needs optimization. It's just a cheap translation of +; the original C wrapper and could be written much smaller (besides that, +; calling LINE is not a good idea either). BAR: lda Y2 sta Y2SAVE @@ -840,7 +843,11 @@ BAR: lda Y2 lda X1+1 sta X1SAVE+1 -@L1: jsr HORLINE +@L1: lda Y1 + sta Y2 + lda Y1+1 + sta Y2+1 + jsr LINE lda Y1SAVE cmp Y2SAVE diff --git a/libsrc/tgi/tgi-kernel.s b/libsrc/tgi/tgi-kernel.s index 86e551ab4..a78a45581 100644 --- a/libsrc/tgi/tgi-kernel.s +++ b/libsrc/tgi/tgi-kernel.s @@ -56,7 +56,6 @@ tgi_getpalette: jmp $0000 tgi_getdefpalette: jmp $0000 tgi_setpixel: jmp $0000 tgi_getpixel: jmp $0000 -tgi_horline: jmp $0000 tgi_line: jmp $0000 tgi_bar: jmp $0000 tgi_circle: jmp $0000