mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 01:31:55 +00:00
Working on the TGI library
git-svn-id: svn://svn.cc65.org/cc65/trunk@1325 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
fb4bb7b383
commit
207c4a9e56
@ -72,7 +72,6 @@ TGI_HDR_JUMPCOUNT = 14 ; Number of jump vectors
|
||||
.global _tgi_curx ; Current drawing cursor X
|
||||
.global _tgi_cury ; Current drawing cursor Y
|
||||
.global _tgi_color ; Current drawing color
|
||||
.global _tgi_bgcolor ; Current background color
|
||||
.global _tgi_xres ; X resolution of the current mode
|
||||
.global _tgi_yres ; Y resolution of the current mode
|
||||
.global _tgi_colorcount ; Number of available colors
|
||||
|
@ -131,34 +131,33 @@ void __fastcall__ tgi_setcolor (unsigned char color);
|
||||
unsigned char __fastcall__ tgi_getcolor (void);
|
||||
/* Return the current drawing color */
|
||||
|
||||
unsigned char __fastcall__ tgi_getbkcolor (void);
|
||||
/* Return the current background color */
|
||||
|
||||
void __fastcall__ tgi_setbkcolor (unsigned char color);
|
||||
/* Set the background color */
|
||||
|
||||
unsigned char __fastcall__ tgi_getpixel (int x, int y);
|
||||
/* Get the color value of a pixel */
|
||||
|
||||
void __fastcall__ tgi_setpixel (int x, int y);
|
||||
/* Plot a point in the current drawing color */
|
||||
|
||||
void __fastcall__ tgi_gotoxy (int x, int y);
|
||||
/* Set the graphics cursor to the given position. */
|
||||
|
||||
void __fastcall__ tgi_line (int x1, int y1, int x2, int y2);
|
||||
/* Draw a line in the current drawing color */
|
||||
/* Draw a line in the current drawing color. The graphics cursor will
|
||||
* be set to x2/y2 by this call.
|
||||
*/
|
||||
|
||||
void __fastcall__ tgi_lineto (int x2, int y2);
|
||||
/* Draw a line in the current drawing color from the graphics cursor to the
|
||||
* new end point.
|
||||
* new end point. The graphics cursor will be updated to x2/y2.
|
||||
*/
|
||||
|
||||
void __fastcall__ tgi_circle (int x, int y, unsigned char radius);
|
||||
/* Draw a circle in the current drawing color */
|
||||
/* Draw a circle in the current drawing color. */
|
||||
|
||||
void __fastcall__ tgi_outtext (int x, int y, const char* text);
|
||||
/* Print a text in graphics mode */
|
||||
|
||||
void __fastcall__ tgi_bar (int x1, int y1, int x2, int y2);
|
||||
/* Draw a bar (a filled rectangle) using the current color */
|
||||
/* Draw a bar (a filled rectangle) using the current color. */
|
||||
|
||||
|
||||
|
||||
|
@ -86,7 +86,6 @@ 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 */
|
||||
|
@ -29,6 +29,7 @@ S_OBJS = tgi-kernel.o \
|
||||
tgi_getset.o \
|
||||
tgi_getxres.o \
|
||||
tgi_getyres.o \
|
||||
tgi_gotoxy.o \
|
||||
tgi_init.o \
|
||||
tgi_line.o \
|
||||
tgi_linepop.o \
|
||||
|
@ -22,7 +22,6 @@ _tgi_mode: .res 1 ; Graphics mode or zero
|
||||
_tgi_curx: .res 2 ; Current drawing cursor X
|
||||
_tgi_cury: .res 2 ; Current drawing cursor Y
|
||||
_tgi_color: .res 1 ; Current drawing color
|
||||
_tgi_bgcolor: .res 1 ; Current background color
|
||||
_tgi_xres: .res 2 ; X resolution of the current mode
|
||||
_tgi_yres: .res 2 ; Y resolution of the current mode
|
||||
_tgi_colorcount:.res 1 ; Number of available colors
|
||||
|
22
libsrc/tgi/tgi_gotoxy.s
Normal file
22
libsrc/tgi/tgi_gotoxy.s
Normal file
@ -0,0 +1,22 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 22.06.2002
|
||||
;
|
||||
; void __fastcall__ tgi_gotoxy (int x, int y);
|
||||
; /* Set the current drawing pointer to the given position. */
|
||||
;
|
||||
|
||||
.include "tgi-kernel.inc"
|
||||
|
||||
.import popax
|
||||
.export _tgi_gotoxy
|
||||
|
||||
_tgi_gotoxy:
|
||||
sta _tgi_cury ; Y
|
||||
stx _tgi_cury+1
|
||||
jsr popax
|
||||
sta _tgi_curx ; X
|
||||
stx _tgi_curx+1
|
||||
rts
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user