1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-14 00:32:08 +00:00

Add tgi_horline

git-svn-id: svn://svn.cc65.org/cc65/trunk@1336 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-07-07 11:12:41 +00:00
parent 613cb2ff77
commit e2f95ebca5
4 changed files with 13 additions and 12 deletions

View File

@ -42,8 +42,7 @@ TGI_HDR_XRES = 4 ; X resolution
TGI_HDR_YRES = 6 ; Y resolution TGI_HDR_YRES = 6 ; Y resolution
TGI_HDR_COLORCOUNT = 8 ; Number of available colors TGI_HDR_COLORCOUNT = 8 ; Number of available colors
TGI_HDR_PAGECOUNT = 9 ; Number of screens available TGI_HDR_PAGECOUNT = 9 ; Number of screens available
TGI_HDR_ERROR = 10 ; Error code TGI_HDR_RES = 10 ; Reserved for extensions
TGI_HDR_RES = 11 ; Reserved for extensions
TGI_HDR_JUMPTAB = 16 TGI_HDR_JUMPTAB = 16
TGI_HDR_INSTALL = TGI_HDR_JUMPTAB+0 ; INSTALL routine TGI_HDR_INSTALL = TGI_HDR_JUMPTAB+0 ; INSTALL routine
@ -61,11 +60,12 @@ TGI_HDR_GETPALETTE = TGI_HDR_JUMPTAB+22 ; GETPALETTE routine
TGI_HDR_GETDEFPALETTE = TGI_HDR_JUMPTAB+24 ; GETDEFPALETTE routine TGI_HDR_GETDEFPALETTE = TGI_HDR_JUMPTAB+24 ; GETDEFPALETTE routine
TGI_HDR_SETPIXEL = TGI_HDR_JUMPTAB+26 ; SETPIXEL routine TGI_HDR_SETPIXEL = TGI_HDR_JUMPTAB+26 ; SETPIXEL routine
TGI_HDR_GETPIXEL = TGI_HDR_JUMPTAB+28 ; GETPIXEL routine TGI_HDR_GETPIXEL = TGI_HDR_JUMPTAB+28 ; GETPIXEL routine
TGI_HDR_LINE = TGI_HDR_JUMPTAB+30 ; LINE routine TGI_HDR_HORLINE = TGI_HDR_JUMPTAB+30 ; HORLINE routine
TGI_HDR_BAR = TGI_HDR_JUMPTAB+32 ; BAR routine TGI_HDR_LINE = TGI_HDR_JUMPTAB+32 ; LINE routine
TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+34 ; CIRCLE routine TGI_HDR_BAR = TGI_HDR_JUMPTAB+34 ; BAR routine
TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+36 ; CIRCLE routine
TGI_HDR_JUMPCOUNT = 18 ; Number of jump vectors TGI_HDR_JUMPCOUNT = 19 ; Number of jump vectors
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Variables ; Variables
@ -99,6 +99,7 @@ TGI_HDR_JUMPCOUNT = 18 ; Number of jump vectors
.global tgi_getdefpalette .global tgi_getdefpalette
.global tgi_setpixel .global tgi_setpixel
.global tgi_getpixel .global tgi_getpixel
.global tgi_horline
.global tgi_line .global tgi_line
.global tgi_bar .global tgi_bar
.global tgi_circle .global tgi_circle
@ -113,3 +114,4 @@ TGI_HDR_JUMPCOUNT = 18 ; Number of jump vectors
.global tgi_linepop .global tgi_linepop
.global tgi_set_ptr .global tgi_set_ptr

View File

@ -56,8 +56,7 @@ typedef struct {
unsigned yres; /* Y resolution */ unsigned yres; /* Y resolution */
unsigned char colorcount; /* Number of available colors */ unsigned char colorcount; /* Number of available colors */
unsigned char pagecount; /* Number of screens available */ unsigned char pagecount; /* Number of screens available */
unsigned char error; /* Error code */ unsigned char res[6]; /* Reserved for extensions */
unsigned char res[5]; /* Reserved for extensions */
/* Jump vectors. Note that these are not C callable */ /* Jump vectors. Note that these are not C callable */
void* install; /* INSTALL routine */ void* install; /* INSTALL routine */
@ -75,6 +74,7 @@ typedef struct {
void* getdefpalette; /* GETDEFPALETTE routine */ void* getdefpalette; /* GETDEFPALETTE routine */
void* setpixel; /* SETPIXEL routine */ void* setpixel; /* SETPIXEL routine */
void* getpixel; /* GETPIXEL routine */ void* getpixel; /* GETPIXEL routine */
void* horline; /* HORLINE routine */
void* line; /* LINE routine */ void* line; /* LINE routine */
void* bar; /* BAR routine */ void* bar; /* BAR routine */
void* circle; /* CIRCLE routine */ void* circle; /* CIRCLE routine */

View File

@ -47,6 +47,7 @@ tgi_getpalette: jmp $0000
tgi_getdefpalette: jmp $0000 tgi_getdefpalette: jmp $0000
tgi_setpixel: jmp $0000 tgi_setpixel: jmp $0000
tgi_getpixel: jmp $0000 tgi_getpixel: jmp $0000
tgi_horline: jmp $0000
tgi_line: jmp $0000 tgi_line: jmp $0000
tgi_bar: jmp $0000 tgi_bar: jmp $0000
tgi_circle: jmp $0000 tgi_circle: jmp $0000

View File

@ -32,7 +32,7 @@ tgi_emu_bar:
lda ptr1+1 lda ptr1+1
sta X1+1 sta X1+1
@L1: jsr tgi_line @L1: jsr tgi_horline
lda Y1 lda Y1
cmp Y2 cmp Y2
@ -47,10 +47,8 @@ tgi_emu_bar:
@L3: lda Y1 @L3: lda Y1
sta ptr2 sta ptr2
sta ptr4
lda Y1+1 lda Y1+1
sta ptr2+1 sta ptr2+1
sta ptr4+1
lda X1 lda X1
sta ptr1 sta ptr1