mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
Define a standard driver and mode for tgi graphics and use it in the sample
program. The standard driver and mode is the first one in the tgi_mode_table. git-svn-id: svn://svn.cc65.org/cc65/trunk@4153 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
569b8d0e77
commit
7de61e351c
@ -6,8 +6,8 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2002-2004 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* (C) 2002-2009, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
@ -57,6 +57,12 @@
|
||||
#define TGI_TEXT_HORIZONTAL 0
|
||||
#define TGI_TEXT_VERTICAL 1
|
||||
|
||||
/* The name of the standard tgi driver for a platform */
|
||||
extern const char tgi_stddrv[];
|
||||
|
||||
/* The default tgi mode for a platform */
|
||||
extern const unsigned char tgi_stdmode;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -74,8 +80,7 @@ void __fastcall__ tgi_load (unsigned char mode);
|
||||
void __fastcall__ tgi_load_driver (const char* name);
|
||||
/* Load and install the given driver. This function is identical to tgi_load
|
||||
* with the only difference that the name of the driver is specified
|
||||
* explicitly. You should NOT use this function in most cases, use tgi_load()
|
||||
* instead.
|
||||
* explicitly.
|
||||
*/
|
||||
|
||||
void __fastcall__ tgi_unload (void);
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Mode table. Contains entries of mode and driver name, the driver name being
|
||||
; null terminated. A mode with code zero terminates the list.
|
||||
; null terminated. A mode with code zero terminates the list. The first entry
|
||||
; defines also the default mode and driver for the system.
|
||||
; BEWARE: The current implementation of tgi_map_mode does not work with tables
|
||||
; larger that 255 bytes!
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Mode table. Contains entries of mode and driver name, the driver name being
|
||||
; null terminated. A mode with code zero terminates the list.
|
||||
; null terminated. A mode with code zero terminates the list. The first entry
|
||||
; defines also the default mode and driver for the system.
|
||||
; BEWARE: The current implementation of tgi_map_mode does not work with tables
|
||||
; larger that 255 bytes!
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Mode table. Contains entries of mode and driver name, the driver name being
|
||||
; null terminated. A mode with code zero terminates the list.
|
||||
; null terminated. A mode with code zero terminates the list. The first entry
|
||||
; defines also the default mode and driver for the system.
|
||||
; BEWARE: The current implementation of tgi_map_mode does not work with tables
|
||||
; larger that 255 bytes!
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Mode table. Contains entries of mode and driver name, the driver name being
|
||||
; null terminated. A mode with code zero terminates the list.
|
||||
; null terminated. A mode with code zero terminates the list. The first entry
|
||||
; defines also the default mode and driver for the system.
|
||||
; BEWARE: The current implementation of tgi_map_mode does not work with tables
|
||||
; larger that 255 bytes!
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Mode table. Contains entries of mode and driver name, the driver name being
|
||||
; null terminated. A mode with code zero terminates the list.
|
||||
; null terminated. A mode with code zero terminates the list. The first entry
|
||||
; defines also the default mode and driver for the system.
|
||||
; BEWARE: The current implementation of tgi_map_mode does not work with tables
|
||||
; larger that 255 bytes!
|
||||
|
||||
|
@ -68,6 +68,8 @@ S_OBJS = tgi-kernel.o \
|
||||
tgi_setpalette.o \
|
||||
tgi_setpixel.o \
|
||||
tgi_setviewpage.o \
|
||||
tgi_stddrv.o \
|
||||
tgi_stdmode.o \
|
||||
tgi_textsize.o \
|
||||
tgi_textstyle.o \
|
||||
tgi_unload.o
|
||||
|
11
libsrc/tgi/tgi_stddrv.s
Normal file
11
libsrc/tgi/tgi_stddrv.s
Normal file
@ -0,0 +1,11 @@
|
||||
;
|
||||
; Name of the standard tgi driver
|
||||
;
|
||||
; Ullrich von Bassewitz, 2009-09-11
|
||||
;
|
||||
; const char tgi_stddrv[];
|
||||
;
|
||||
|
||||
.import _tgi_mode_table
|
||||
.export _tgi_stddrv = _tgi_mode_table + 1
|
||||
|
11
libsrc/tgi/tgi_stdmode.s
Normal file
11
libsrc/tgi/tgi_stdmode.s
Normal file
@ -0,0 +1,11 @@
|
||||
;
|
||||
; Standard tgi mode
|
||||
;
|
||||
; Ullrich von Bassewitz, 2009-09-11
|
||||
;
|
||||
; const unsigned char tgi_stdmode[];
|
||||
;
|
||||
|
||||
.import _tgi_mode_table
|
||||
.export _tgi_stdmode = _tgi_mode_table
|
||||
|
@ -7,11 +7,6 @@
|
||||
|
||||
|
||||
|
||||
#if defined(__APPLE2__) || defined(__APPLE2ENH__)
|
||||
# define TGI_MODE TGI_MODE_280_192_8
|
||||
#else
|
||||
# define TGI_MODE TGI_MODE_320_200_2
|
||||
#endif
|
||||
#define COLOR_BACK COLOR_BLACK
|
||||
#define COLOR_FORE COLOR_WHITE
|
||||
|
||||
@ -203,7 +198,7 @@ int main (void)
|
||||
DoWarning ();
|
||||
|
||||
/* Load and initialize the driver */
|
||||
tgi_load (TGI_MODE);
|
||||
tgi_load_driver (tgi_stddrv);
|
||||
CheckError ("tgi_load");
|
||||
tgi_init ();
|
||||
CheckError ("tgi_init");
|
||||
|
Loading…
Reference in New Issue
Block a user