Go to the source code of this file.
Data Structures | |
struct | GsPoly3 |
Monochrome 3 point polygon. More... | |
struct | GsPoly4 |
Monochrome 4 point polygon. More... | |
struct | GsTPoly3 |
Textured 3 point polygon. More... | |
struct | GsTPoly4 |
Textured 4 point polygon. More... | |
struct | GsGPoly3 |
Graduated 3 point polygon. More... | |
struct | GsGPoly4 |
Graduated 4 point polygon. More... | |
struct | GsGTPoly3 |
Graduated textured 3 point polygon. More... | |
struct | GsGTPoly4 |
Graduated textured 4 point polygon. More... | |
struct | GsLine |
Monochrome line. More... | |
struct | GsDot |
Dot (pixel) More... | |
struct | GsGLine |
Graduated line. More... | |
struct | GsSprite |
Sprite. More... | |
struct | GsRectangle |
Rectangle. More... | |
struct | GsPolyLine |
struct | GsGPolyLine |
struct | GsDrawEnv |
Drawing environment. More... | |
struct | GsDispEnv |
Display environment. More... | |
struct | GsImage |
Image. More... | |
Macros | |
#define | NORMAL_LUMINANCE 128 |
This is the luminance factor with which images are drawn as they are stored. | |
#define | NORMAL_LUMINOSITY NORMAL_LUMINANCE |
#define | COLORMODE(x) x&3 |
Macro to specify texture color mode, takes a value from psx_gpu_texmodes. | |
#define | TRANS_MODE(x) ((x&3)<<2) |
Macro to specify translucency/semitransparency mode, where x can be a value from 0 to 3. | |
#define | ENABLE_TRANS (1<<4) |
Enable semi-transparency processing for the primitive. | |
#define | H_FLIP (1<<5) |
Enable horizontal flipping for the primitive. | |
#define | V_FLIP (1<<6) |
Enable vertical flipping for the primitive. | |
#define | MASK_SET 1 |
#define | MASK_IGNORE 2 |
#define | SCALE_ONE 4096 |
One scaling unit. | |
#define | ROTATE_ONE 4096 |
One rotation unit. | |
#define | PRFONT_WRAP 1 |
#define | PRFONT_CENTER 2 |
#define | PRFONT_RIGHT 4 |
#define | PRFONT_SCALE 8 |
#define | PRFONT_UNIXLF 16 |
#define | PRFONT_COLOR 32 |
#define | prfont_get_fx(i) ((short)(i & 0xffff)) |
#define | prfont_get_fy(i) ((short)((i >> 16) & 0xffff)) |
#define | gs_get_tpage_num(x, y) ((x/64)+((y/256)*16)) |
Macro to get a texture page number from a coordinate in VRAM. | |
#define | gs_get_tpage_u(x) (x&0x3f) |
Macro to get an horizontal texture offset from a X coordinate in VRAM. | |
#define | gs_get_tpage_v(y) (y&0xff) |
Macro to get a vertical texture offset from a Y coordinate in VRAM. | |
#define | gs_rgb_to_psx(r, g, b) ((r>>3)|((g>>3)<<5)|((b>>3)<<10)) |
This macro converts a RGB 888 color to PlayStation color format. | |
#define | gs_rgba_to_psx(r, g, b, a) ((r>>3)|((g>>3)<<5)|((b>>3)<<10)|(a==0?0:1)) |
This macro converts a RGB 888 color (a color whose color components have an intensity between 0 and 255) to PlayStation color format, considering an alpha bit. | |
Enumerations | |
enum | psx_gpu_texmodes { COLORMODE_4BPP, COLORMODE_8BPP, COLORMODE_16BPP, COLORMODE_24BPP } |
Map. More... | |
enum | psx_gpu_vmodes { VMODE_NTSC, VMODE_PAL } |
Television video modes. More... | |
Functions | |
void | GsInit (void) |
Initializes the GPU. | |
void | GsInitEx (unsigned int flags) |
Initializes the GPU. | |
void | GsReset (void) |
Resets the GPU. | |
void | GsEnableDisplay (int enable) |
Enables the display (i.e. | |
int | GsSetVideoMode (int width, int height, int video_mode) |
Sets a video mode and enables the display. | |
int | GsSetVideoModeEx (int width, int height, int video_mode, int rgb24, int inter, int reverse) |
Works like GsSetVideoMode() but offers more control. | |
void | GsSetList (unsigned int *listptr) |
Assigns the internal pointer to the primitive list to the desired one, and resets the linked list position counter. | |
void | GsSetListEx (unsigned int *listptr, unsigned int listpos) |
Assigns the internal pointer to the primitive list to the desired one, an sets the linked list position counter to the specified value. | |
void | GsDrawList (void) |
Draws the primitive list. | |
void | GsDrawListPIO (void) |
Draws the primitive list using port I/O access. | |
void | GsSetAutoWait (void) |
Makes non-blocking gpu functions like GsDrawList() wait for completion. | |
void | GsSortPoly3 (GsPoly3 *poly3) |
Adds a monochrome 3 point polygon to the packet list. | |
void | GsSortPoly4 (GsPoly4 *poly4) |
Adds a monochrome 4 point polygon to the packet list. | |
void | GsSortTPoly3 (GsTPoly3 *tpoly3) |
Adds a textured 3 point polygon to the packet list. | |
void | GsSortTPoly4 (GsTPoly4 *tpoly4) |
Adds a textured 4 point polygon to the packet list. | |
void | GsSortGPoly3 (GsGPoly3 *poly3) |
Adds a gradated 3 point polygon to the packet list. | |
void | GsSortGPoly4 (GsGPoly4 *poly4) |
Adds a gradated 4 point polygon to the packet list. | |
void | GsSortGTPoly3 (GsGTPoly3 *tpoly3) |
Adds a gradated textured 3 point polygon to the packet list. | |
void | GsSortGTPoly4 (GsGTPoly4 *tpoly4) |
Adds a gradated 4 point polygon to the packet list. | |
void | GsSortLine (GsLine *line) |
Adds a monochrome line to the packet list. | |
void | GsSortGLine (GsGLine *line) |
Adds a gradated line to the packet list. | |
void | GsSortDot (GsDot *dot) |
Adds a dot (pixel) to the packet list. | |
void | GsSortSprite (GsSprite *sprite) |
Adds a sprite to the packet list. | |
void | GsSortSimpleSprite (GsSprite *sprite) |
Always adds a REAL sprite to the packet list. | |
void | GsSortRectangle (GsRectangle *rectangle) |
Adds a rectangle to the packet list. | |
void | MoveImage (int src_x, int src_y, int dst_x, int dst_y, int w, int h) |
Moves image data from a part of the framebuffer to another. | |
void | LoadImage (void *img, int x, int y, int w, int h) |
Loads image data into framebuffer memory. | |
void | DrawFBRect (int x, int y, int w, int h, int r, int g, int b) |
Draws a rectangle in the framebuffer, without considering drawing and display environments (i.e. | |
void | GsSetDrawEnv (GsDrawEnv *drawenv) |
Set drawing environment. | |
void | GsSetDispEnv (GsDispEnv *dispenv) |
Set display environment. | |
void | GsSetMasking (unsigned char flag) |
Sets masking settings. | |
unsigned int | GsListPos (void) |
Return pointer position in linked list. | |
void | gpu_ctrl (unsigned int command, unsigned int param) |
Three functions which send data to the control port and to the data port. | |
void | gpu_data (unsigned int data) |
void | gpu_data_ctrl (unsigned int command, unsigned int param) |
int | GsImageFromTim (GsImage *image, void *timdata) |
Puts information about a TIM image passed in a buffer in a GsImage structure. | |
void | GsUploadImage (GsImage *image) |
Uploads an image described by a GsImage structure to video memory. | |
int | GsSpriteFromImage (GsSprite *sprite, GsImage *image, int do_upload) |
Fills a GsSprite structure with information from an image described by a GsImage structure, then optionally uploads data to video memory. | |
int | GsIsDrawing (void) |
Checks if the GPU is drawing. | |
int | GsIsWorking (void) |
Checks if the GPU is working. | |
void | GsClearMem (void) |
Clear Video RAM. | |
void | GsLoadFont (int fb_x, int fb_y, int cx, int cy) |
Loads the built-in 8x8 font in Video RAM at the specified coordinates. | |
unsigned int | GsPrintFont (int x, int y, const char *fmt,...) |
Prints string using 8x8 font at screen coordinates x, y. | |
unsigned int | GsVPrintFont (int x, int y, const char *fmt, va_list ap) |
Prints string using 8x8 font at screen coordinates x, y Apart from using a variable argument list, this function is identical to GsPrintFont() | |
void | GsSetFont (int fb_x, int fb_y, int cx, int cy) |
Change font coordinates without reloading it. | |
void | GsSetFontAttrib (unsigned int flags) |
This is a function that sets an internal variable flags should be specified as an OR mask. | |
void | GsSetDrawEnvSimple (int x, int y, int w, int h) |
Sets drawing environment Enables drawing on the display area, disables dithering and disables all masking flags by default. | |
void | GsSetDispEnvSimple (int x, int y) |
Sets display environment. | |
unsigned int | PRFONT_SCALEX (int i) |
unsigned int | PRFONT_SCALEY (int i) |
unsigned int | PRFONT_RL (unsigned char f) |
unsigned int | PRFONT_GL (unsigned char f) |
unsigned int | PRFONT_BL (unsigned char f) |
void | GsSortCls (int r, int g, int b) |
Clear the entire drawing area with specified color. | |
void | GsRotateVector (int x_a, int y_a, int z_a, double *v, double *n) |
This function can rotate a vector about the X, Y and Z axes If you don't want to rotate a vector about an axis, pass 0 as angle to that axis. | |
void | GsSortPolyLine (GsPolyLine *line) |
Adds a monochrome polyline to the packet list. | |
void | GsSortGPolyLine (GsGPolyLine *line) |
Adds a gradated polyline to the packet list. | |
Variables | |
unsigned short | GsScreenW |
This global variable reports the current screen width, as set by GsSetVideoMode(). | |
unsigned short | GsScreenH |
This global variable reports the current screen height, as set by GsSetVideoMode(). | |
unsigned char | GsScreenM |
This global variable reports the current screen color mode (PAL or NTSC), as set by GsSetVideoMode(). | |
unsigned short | GsCurDrawEnvW |
This global variable reports the width of the current drawing environment. | |
unsigned short | GsCurDrawEnvH |
This global variable reports the height of the current drawing environment. | |
#define COLORMODE | ( | x | ) | x&3 |
Macro to specify texture color mode, takes a value from psx_gpu_texmodes.
#define ENABLE_TRANS (1<<4) |
Enable semi-transparency processing for the primitive.
#define gs_get_tpage_num | ( | x, | |
y | |||
) | ((x/64)+((y/256)*16)) |
Macro to get a texture page number from a coordinate in VRAM.
x | X coordinate (0-1023) |
y | Y coordinate (0-511) |
#define gs_get_tpage_u | ( | x | ) | (x&0x3f) |
Macro to get an horizontal texture offset from a X coordinate in VRAM.
x | X coordinate (0-1023) |
#define gs_get_tpage_v | ( | y | ) | (y&0xff) |
Macro to get a vertical texture offset from a Y coordinate in VRAM.
y | Y coordinate (0-511) |
#define gs_rgb_to_psx | ( | r, | |
g, | |||
b | |||
) | ((r>>3)|((g>>3)<<5)|((b>>3)<<10)) |
This macro converts a RGB 888 color to PlayStation color format.
r | Red component (0-255) |
g | Green component (0-255) |
b | Blue component (0-255) |
#define gs_rgba_to_psx | ( | r, | |
g, | |||
b, | |||
a | |||
) | ((r>>3)|((g>>3)<<5)|((b>>3)<<10)|(a==0?0:1)) |
This macro converts a RGB 888 color (a color whose color components have an intensity between 0 and 255) to PlayStation color format, considering an alpha bit.
If the alpha bit is non-zero, the STP bit in the color is set and will be considered for PlayStation translucency effects.
r | Red component (0-255) |
g | Green component (0-255) |
b | Blue component (0-255) |
a | Alpha bit (STP/semitransparency bit) |
#define H_FLIP (1<<5) |
Enable horizontal flipping for the primitive.
#define MASK_IGNORE 2 |
#define MASK_SET 1 |
#define NORMAL_LUMINANCE 128 |
This is the luminance factor with which images are drawn as they are stored.
(i.e. without applying lighting)
NORMAL_LUMINOSITY (sic) is kept for backward compatibility, but "luminosity" is an incorrect term here.
#define NORMAL_LUMINOSITY NORMAL_LUMINANCE |
#define PRFONT_CENTER 2 |
#define PRFONT_COLOR 32 |
#define prfont_get_fx | ( | i | ) | ((short)(i & 0xffff)) |
#define prfont_get_fy | ( | i | ) | ((short)((i >> 16) & 0xffff)) |
#define PRFONT_RIGHT 4 |
#define PRFONT_SCALE 8 |
#define PRFONT_UNIXLF 16 |
#define PRFONT_WRAP 1 |
#define ROTATE_ONE 4096 |
One rotation unit.
#define SCALE_ONE 4096 |
One scaling unit.
#define TRANS_MODE | ( | x | ) | ((x&3)<<2) |
Macro to specify translucency/semitransparency mode, where x can be a value from 0 to 3.
If a pixel in image data to be drawn has the STP bit set, semitransparency processing is enabled for that pixel.
When the color is black (RGB=0,0,0) STP is processed differently from when it is not black.
The table below shows the differences:
Color | STP bit | Processing off | Processing on |
---|---|---|---|
Black | 0 | Transparent | Transparent |
Black | 1 | Non-transparent | Non-Transparent |
Not black | 0 | Non-Transparent | Non-Transparent |
Not black | 1 | Non-Transparent | Transparent |
If the image pixel is semi-transparent (STP bit set) and not black, the formulas for the final pixel color are the following:
Mode | From framebuffer pixel | From image pixel |
---|---|---|
0 | +50% | +50% |
1 | +100% | +100% |
2 | +100% | -100% |
3 | +100% | +25% |
The final color component values do not underflow or overflow, they simply saturate at 0 or 255.
#define V_FLIP (1<<6) |
Enable vertical flipping for the primitive.
enum psx_gpu_texmodes |
enum psx_gpu_vmodes |
void DrawFBRect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
int | r, | ||
int | g, | ||
int | b | ||
) |
Draws a rectangle in the framebuffer, without considering drawing and display environments (i.e.
it does so in an absolute way)
x | Top-left X coordinate of area |
y | Top-left Y coordinate of area |
w | Area width |
h | Area height |
r | Red (0 - 255) |
g | Green (0 - 255) |
b | Blue (0 - 255) |
void gpu_ctrl | ( | unsigned int | command, |
unsigned int | param | ||
) |
Three functions which send data to the control port and to the data port.
void gpu_data | ( | unsigned int | data | ) |
void gpu_data_ctrl | ( | unsigned int | command, |
unsigned int | param | ||
) |
void GsClearMem | ( | void | ) |
Clear Video RAM.
void GsDrawList | ( | void | ) |
Draws the primitive list.
This also has the effect of resetting the current drawing list position.
void GsDrawListPIO | ( | void | ) |
Draws the primitive list using port I/O access.
GsDrawList() uses DMA to transfer the primitive data in the linked list to the GPU.
This function which is of main interest to low-level programmers, uses GPU port I/O access instead, and it is slower (as reads and writes must be done by the main CPU), but works in all situations, even when you can't get DMA working.
This function due to its nature is blocking, and always waits for completion.
void GsEnableDisplay | ( | int | enable | ) |
Enables the display (i.e.
generation of video output).
Unless you are doing low-level GPU programming, you don't need to call this function; the display is enabled automatically by GsSetVideoMode().
enable | If TRUE (>=1) the display will be enabled, if FALSE (== 0) it will be disabled |
int GsImageFromTim | ( | GsImage * | image, |
void * | timdata | ||
) |
Puts information about a TIM image passed in a buffer in a GsImage structure.
void GsInit | ( | void | ) |
Initializes the GPU.
Same as GsInitEx(0)
The display is left disabled. You can enable it with GsEnableDisplay() or more preferably with GsSetVideoMode()
void GsInitEx | ( | unsigned int | flags | ) |
Initializes the GPU.
The display is left disabled. You can enable it with GsEnableDisplay() or more preferably with GsSetVideoMode()
flags | Flag bitmask |
int GsIsDrawing | ( | void | ) |
Checks if the GPU is drawing.
int GsIsWorking | ( | void | ) |
unsigned int GsListPos | ( | void | ) |
Return pointer position in linked list.
void GsLoadFont | ( | int | fb_x, |
int | fb_y, | ||
int | cx, | ||
int | cy | ||
) |
Loads the built-in 8x8 font in Video RAM at the specified coordinates.
Specifying cx and cy as -1 will not load the black&white CLUT to video memory. Use GsSetFont() to specify clut x and clut y in that case.
The font occupies a space of 16x128 pixels in 16-bit mode, and 64x128 in 4-bit mode.
fb_x | X coordinate in framebuffer |
fb_y | Y coordinate in framebuffer |
cx | X coordinate of black/white CLUT in framebuffer |
cy | Y coordinate of black/white CLUT in framebuffer |
unsigned int GsPrintFont | ( | int | x, |
int | y, | ||
const char * | fmt, | ||
... | |||
) |
Prints string using 8x8 font at screen coordinates x, y.
x | X coordinate |
y | Y coordinate |
fmt | format (like *printf()) |
void GsReset | ( | void | ) |
Resets the GPU.
void GsRotateVector | ( | int | x_a, |
int | y_a, | ||
int | z_a, | ||
double * | v, | ||
double * | n | ||
) |
This function can rotate a vector about the X, Y and Z axes If you don't want to rotate a vector about an axis, pass 0 as angle to that axis.
It is correct to pass the same argument to v and n, as calculations are first done in an internal buffer and then stored in the output array
x_a | Number of degrees (0-359) to which the vector should be rotated about the X axis |
y_a | Number of degrees (0-359) to which the vector should be rotated about the Y axis |
z_a | Number of degrees (0-359) to which the vector should be rotated about the Z axis |
v | Pointer to an array of coordinates for the source vector |
n | Pointer to destination array for the coordinates of the rotated vector |
void GsSetAutoWait | ( | void | ) |
Makes non-blocking gpu functions like GsDrawList() wait for completion.
Removes the need to use GsIsDrawing()/GsIsWorking()
void GsSetDispEnv | ( | GsDispEnv * | dispenv | ) |
Set display environment.
dispenv | Pointer to display environment structure |
void GsSetDispEnvSimple | ( | int | x, |
int | y | ||
) |
Sets display environment.
x | Top-left X coordinate of framebuffer area to display |
y | Top-left Y coordinate of framebuffer area to display |
void GsSetDrawEnv | ( | GsDrawEnv * | drawenv | ) |
Set drawing environment.
drawenv | Pointer to drawing environment structure |
void GsSetDrawEnvSimple | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Sets drawing environment Enables drawing on the display area, disables dithering and disables all masking flags by default.
x | Top-left X coordinate of framebuffer area to use for drawing |
y | Top-left Y coordinate of framebuffer area to use for drawing |
w | Width of area |
h | Height of area |
void GsSetFont | ( | int | fb_x, |
int | fb_y, | ||
int | cx, | ||
int | cy | ||
) |
Change font coordinates without reloading it.
void GsSetFontAttrib | ( | unsigned int | flags | ) |
This is a function that sets an internal variable flags should be specified as an OR mask.
to set the wrap and scale attributes, with X scaling factor 2 and Y scaling factor 3, for example: GsSetFontAttrib(PRFONT_WRAP | PRFONT_SCALE | PRFONT_SCALEX(2) | PRFONT_SCALEY(3));
to remove all attributes (normal printing):
GsSetFontAttrib(0);
PRFONT_WRAP can't coexist with PRFONT_CENTER or PRFONT_RIGHT PRFONT_CENTER and PRFONT_RIGHT are justifying attributes and as such they are mutually exclusive - they cannot coexist with each other. Specifying both will give priority to PRFONT_CENTER.
Attribute list:
PRFONT_WRAP - Wrap to next row when the text would fall off the screen Ideal for debug PRFONT_SCALE - Enable font scaling PRFONT_SCALEX(i) - Specifies the factor "i" as the X scaling factor This has the same meaning as a sprite's scaling factor PRFONT_SCALEY(i) - Specify the factor "i" as the Y scaling factor This has the same meaning as a sprite's scaling factor PRFONT_RIGHT - Justifies text to the right PRFONT_CENTER - Justifies text at the center PRFONT_RL(f) - Luminance factor for the red component PRFONT_GL(f) - Luminance factor for the green component PRFONT_BL(f) - Luminance factor for the blue component
void GsSetList | ( | unsigned int * | listptr | ) |
Assigns the internal pointer to the primitive list to the desired one, and resets the linked list position counter.
The memory address specified by your pointer has to have enough space free to contain all the packets which you want to send.
listptr | Pointer to primitive list |
void GsSetListEx | ( | unsigned int * | listptr, |
unsigned int | listpos | ||
) |
Assigns the internal pointer to the primitive list to the desired one, an sets the linked list position counter to the specified value.
The memory address specified by your pointer has to have enough space free to contain all the packets which you want to send, and you must ensure that the specified position is not out of bounds.
listptr | Pointer to primitive list |
listpos | List position |
void GsSetMasking | ( | unsigned char | flag | ) |
Sets masking settings.
flag | Bitwise flags |
int GsSetVideoMode | ( | int | width, |
int | height, | ||
int | video_mode | ||
) |
Sets a video mode and enables the display.
It does so in a quicker way than GsSetVideoModeEx(), which wants more arguments but offers greater control
width | Width
|
height | Height
|
video_mode | Video mode
|
int GsSetVideoModeEx | ( | int | width, |
int | height, | ||
int | video_mode, | ||
int | rgb24, | ||
int | inter, | ||
int | reverse | ||
) |
Works like GsSetVideoMode() but offers more control.
Interlaced, 24-bit RGB, and "reverse" flags can be specified.
width | Width
|
height | Height
|
video_mode | Video mode
|
rgb24 | 24-bit RGB mode
|
inter | Interlacing
|
reverse | Reverse??
|
void GsSortCls | ( | int | r, |
int | g, | ||
int | b | ||
) |
Clear the entire drawing area with specified color.
r | Red (0 - 255) |
g | Green (0 - 255) |
b | Blue (0 - 255) |
void GsSortDot | ( | GsDot * | dot | ) |
Adds a dot (pixel) to the packet list.
dot | Pointer to structure for dot |
void GsSortGLine | ( | GsGLine * | line | ) |
Adds a gradated line to the packet list.
line | Pointer to structure for gradated line |
void GsSortGPoly3 | ( | GsGPoly3 * | poly3 | ) |
Adds a gradated 3 point polygon to the packet list.
poly3 | Pointer to structure for gradated 3 point polygon |
void GsSortGPoly4 | ( | GsGPoly4 * | poly4 | ) |
Adds a gradated 4 point polygon to the packet list.
poly4 | Pointer to structure for gradated 4 point polygon |
void GsSortGPolyLine | ( | GsGPolyLine * | line | ) |
Adds a gradated polyline to the packet list.
line | Pointer to structure for monochrome line |
void GsSortGTPoly3 | ( | GsGTPoly3 * | tpoly3 | ) |
Adds a gradated textured 3 point polygon to the packet list.
tpoly3 | Pointer to structure for textured 3 point polygon |
void GsSortGTPoly4 | ( | GsGTPoly4 * | tpoly4 | ) |
Adds a gradated 4 point polygon to the packet list.
tpoly4 | Pointer to structure for textured 4 point polygon |
void GsSortLine | ( | GsLine * | line | ) |
Adds a monochrome line to the packet list.
line | Pointer to structure for monochrome line |
void GsSortPoly3 | ( | GsPoly3 * | poly3 | ) |
Adds a monochrome 3 point polygon to the packet list.
poly3 | Pointer to structure for monochrome 3 point polygon |
void GsSortPoly4 | ( | GsPoly4 * | poly4 | ) |
Adds a monochrome 4 point polygon to the packet list.
poly4 | Pointer to structure for monochrome 4 point polygon |
void GsSortPolyLine | ( | GsPolyLine * | line | ) |
Adds a monochrome polyline to the packet list.
line | Pointer to structure for monochrome polyline |
void GsSortRectangle | ( | GsRectangle * | rectangle | ) |
Adds a rectangle to the packet list.
rectangle | Pointer to structure for rectangle |
void GsSortSimpleSprite | ( | GsSprite * | sprite | ) |
Always adds a REAL sprite to the packet list.
sprite | Pointer to structure for sprite |
void GsSortSprite | ( | GsSprite * | sprite | ) |
Adds a sprite to the packet list.
sprite | Pointer to structure for sprite |
void GsSortTPoly3 | ( | GsTPoly3 * | tpoly3 | ) |
Adds a textured 3 point polygon to the packet list.
tpoly3 | Pointer to structure for textured 3 point polygon |
void GsSortTPoly4 | ( | GsTPoly4 * | tpoly4 | ) |
Adds a textured 4 point polygon to the packet list.
tpoly4 | Pointer to structure for textured 4 point polygon |
void GsUploadImage | ( | GsImage * | image | ) |
Uploads an image described by a GsImage structure to video memory.
unsigned int GsVPrintFont | ( | int | x, |
int | y, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Prints string using 8x8 font at screen coordinates x, y Apart from using a variable argument list, this function is identical to GsPrintFont()
x | X coordinate |
y | Y coordinate |
fmt | format (like *printf()) |
ap | Variable argument list |
void LoadImage | ( | void * | img, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Loads image data into framebuffer memory.
img | Pointer to raw image data |
x | Top-left X coordinate of destination area |
y | Top-left Y coordinate of destination area |
w | Width of image data |
h | Height of image data |
void MoveImage | ( | int | src_x, |
int | src_y, | ||
int | dst_x, | ||
int | dst_y, | ||
int | w, | ||
int | h | ||
) |
Moves image data from a part of the framebuffer to another.
Actually it does a copy.
src_x | Top-left X coordinate of source area |
src_y | Top-left Y coordinate of source area |
dst_x | Top-left X coordinate of destination area |
dst_y | Top-left Y coordinate of destination area |
w | Width of area |
h | Height of area |
unsigned int PRFONT_BL | ( | unsigned char | f | ) |
unsigned int PRFONT_GL | ( | unsigned char | f | ) |
unsigned int PRFONT_RL | ( | unsigned char | f | ) |
unsigned int PRFONT_SCALEX | ( | int | i | ) |
unsigned int PRFONT_SCALEY | ( | int | i | ) |
unsigned short GsCurDrawEnvH |
This global variable reports the height of the current drawing environment.
unsigned short GsCurDrawEnvW |
This global variable reports the width of the current drawing environment.
unsigned short GsScreenH |
This global variable reports the current screen height, as set by GsSetVideoMode().
Do not modify.
unsigned char GsScreenM |
This global variable reports the current screen color mode (PAL or NTSC), as set by GsSetVideoMode().
You can use the values in the psx_gpu_vmodes enum to evaluate this. Do not modify.
unsigned short GsScreenW |
This global variable reports the current screen width, as set by GsSetVideoMode().
Do not modify.