1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

MAde the second parameter of tgi_ioctl a void* instead of an unsigned to keep

the interface more uniform between the driver APIs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4518 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-12-11 14:33:53 +00:00
parent 14030c0852
commit 36cf23680c
4 changed files with 17 additions and 17 deletions

View File

@ -5357,7 +5357,7 @@ tgi_init(); //Set up the default palette and clear the screen.
<descrip>
<tag/Function/Platform dependent code extensions.
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
<tag/Declaration/<tt/unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);/
<tag/Declaration/<tt/unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);/
<tag/Description/Some platforms have extra display hardware that is not
supported by standard tgi functions. You can extend the driver to support
this extra hardware using tgi_ioctl functions.
@ -5369,12 +5369,12 @@ be used in presence of a prototype.
<tag/Availability/cc65
<tag/See also/Other tgi functions.
<tag/Example/<verb>
#define tgi_sprite(spr) tgi_ioctl(0, (unsigned)(spr))
#define tgi_flip() tgi_ioctl(1, 0)
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (unsigned)(bgcol))
#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate))
#define tgi_busy() tgi_ioctl(4, 0)
#define tgi_updatedisplay() tgi_ioctl(4, 1)
#define tgi_sprite(spr) tgi_ioctl(0, (void*)(spr))
#define tgi_flip() tgi_ioctl(1, (void*)0)
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate))
#define tgi_busy() tgi_ioctl(4, (void*)0)
#define tgi_updatedisplay() tgi_ioctl(4, (void*)1)
if (!tgi_busy()) {
tgi_sprite(&amp;background);
tgi_setcolor(TGI_COLOR_BLUE);
@ -5522,7 +5522,7 @@ be used in presence of a prototype.
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
<tag/Declaration/<tt/void __fastcall__ tgi_pie slice (int x, int y,
unsigned char rx, unsigned char ry, unsigned sa, unsigned ea);/
<tag/Description/The function draws an elliptic pie slice with center at x/y
<tag/Description/The function draws an elliptic pie slice with center at x/y
and radii rx/ry using the current drawing color. The pie slice covers the angle
between sa and ea (startangle and endangle), which must be in the range
0..360.

View File

@ -103,13 +103,13 @@ void __fastcall__ lynx_eeprom_erase (unsigned char cell);
/* TGI extras */
/*****************************************************************************/
#define tgi_sprite(spr) tgi_ioctl(0, (unsigned)(spr))
#define tgi_flip() tgi_ioctl(1, 0)
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (unsigned)(bgcol))
#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate))
#define tgi_busy() tgi_ioctl(4, 0)
#define tgi_updatedisplay() tgi_ioctl(4, 1)
#define tgi_setcollisiondetection(active) tgi_ioctl(5, (unsigned)(active))
#define tgi_sprite(spr) tgi_ioctl(0, spr)
#define tgi_flip() tgi_ioctl(1, (void*)0)
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate))
#define tgi_busy() tgi_ioctl(4, (void*)0)
#define tgi_updatedisplay() tgi_ioctl(4, (void*)1)
#define tgi_setcollisiondetection(active) tgi_ioctl(5, (void*)(active))
/* End of lynx.h */
#endif

View File

@ -270,7 +270,7 @@ void __fastcall__ tgi_outtextxy (int x, int y, const char* s);
* the end of the text.
*/
unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);
unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);
/* Call the driver specific control function. What this function does for
* a specific code depends on the driver. The driver will set an error
* for unknown codes or values.

View File

@ -1,7 +1,7 @@
;
; Ullrich von Bassewitz, 2004-10-14
;
; unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);
; unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);
; /* Call the driver specific control function. What this function does for
; * a specific code depends on the driver. The driver will set an error
; * for unknown codes or values.