Working on the TGI library

git-svn-id: svn://svn.cc65.org/cc65/trunk@1323 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-06-22 21:40:24 +00:00
parent 897c1d8523
commit bf944755dd
16 changed files with 202 additions and 50 deletions

View File

@@ -49,6 +49,7 @@
#define TGI_ERR_CANNOT_LOAD 2 /* Error loading driver */
#define TGI_ERR_INV_DRIVER 3 /* Invalid driver */
#define TGI_ERR_INV_MODE 4 /* Mode not supported by driver */
#define TGI_ERR_INV_ARG 5 /* Invalid function argument */

View File

@@ -54,9 +54,10 @@ typedef struct {
unsigned char version; /* Interface version */
unsigned xres; /* X resolution */
unsigned yres; /* Y resolution */
unsigned char colors; /* Number of available colors */
unsigned char error; /* Error code */
unsigned char res[6]; /* Reserved for extensions */
unsigned char colorcount; /* Number of available colors */
unsigned char pagecount; /* Number of screens available */
unsigned char error; /* Error code */
unsigned char res[5]; /* Reserved for extensions */
/* Jump vectors. Note that these are not C callable */
void* install; /* INSTALL routine */
@@ -65,6 +66,8 @@ typedef struct {
void* done; /* DONE routine */
void* control; /* CONTROL routine */
void* clear; /* CLEAR routine */
void* setviewpage; /* SETVIEWPAGE routine */
void* setdrawpage; /* SETDRAWPAGE routine */
void* setcolor; /* SETCOLOR routine */
void* setpixel; /* SETPIXEL routine */
void* getpixel; /* GETPIXEL routine */
@@ -77,11 +80,17 @@ typedef struct {
/* TGI kernel variables */
extern tgi_drv_header* tgi_drv; /* Pointer to driver */
extern unsigned char tgi_error; /* Last error code */
extern tgi_drv_header* tgi_drv; /* Pointer to driver */
extern unsigned char tgi_error; /* Last error code */
extern unsigned char tgi_mode; /* Graphics mode or zero */
extern int tgi_curx; /* Current drawing cursor X */
extern int tgi_cury; /* Current drawing cursor Y */
extern unsigned char tgi_color; /* Current drawing color */
extern unsigned char tgi_bgcolor; /* Current background color */
extern unsigned tgi_xres; /* X resolution of the current mode */
extern unsigned tgi_yres; /* Y resolution of the current mode */
extern unsigned char tgi_colorcount; /* Number of available colors */
extern unsigned char tgi_pagecount; /* Number of available screens */