;* */
;* */
;* (C) 2002-2003 Ullrich von Bassewitz */
-;* Römerstrasse 52 */
+;* Römerstraße 52 */
;* D-70794 Filderstadt */
;* EMail: uz@cc65.org */
;* */
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
.global tgi_getdefpalette
.global tgi_setpixel
.global tgi_getpixel
- .global tgi_horline
.global tgi_line
.global tgi_bar
.global tgi_circle
.global _tgi_outtextxy
-
/* */
/* */
/* (C) 2002-2003 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* A structure that describes the header of a graphics driver loaded into
* memory.
- */
+ */
typedef struct {
/* Data that describes the capabilities of the driver */
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 */
.word GETDEFPALETTE
.word SETPIXEL
.word GETPIXEL
- .word HORLINE
.word LINE
.word BAR
.word CIRCLE
;
; 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
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