Defines | |
#define | PA_16cCustomFont(c16_slot, c16_font) |
Add custom fonts to the 16cText system !! Font must be converted with PAGfx. | |
#define | PA_16cTextAlign(align) PA_TextAlign(align) |
#define | PA_16cTextLineSpacing(spacing) PA_TextLineSpacing(spacing) |
#define | PA_16cTextLetterSpacing(spacing) PA_TextLetterSpacing(spacing) |
#define | PA_16cSetTextRot(rotate) textinfo.rot = rotate |
Functions | |
void | PA_Init16cBgEx (u8 screen, u8 bg, u8 npalette) |
void | PA_Init16cBg (u8 screen, u8 bg) |
Initialise 16color background on which you can paste images... | |
void | PA_16cErase (u8 screen) |
Erase the 16color background. Must be used right after PA_WaitForVBL to avoid glitches. | |
void | PA_Dual16cErase (void) |
Erase the 16color background on both screens. Must be used right after PA_WaitForVBL to avoid glitches. | |
void | PA_InitComplete16c (u8 bg, void *Palette) |
Initialise a 16color background on each screen and give them a given palette. | |
s16 | PA_16cText (u8 screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char *text, u8 color, u8 size, s32 limit) |
This is a variable width and variable size function to draw text on the screen. | |
ALWAYSINLINE void | PA_16cPutPixel (u8 screen, s16 x, s16 y, u32 color) |
Plot a pixel on a 16c background. | |
ALWAYSINLINE void | PA_16cDeletePixel (u8 screen, s16 x, s16 y) |
ALWAYSINLINE void | PA_16c8X4 (u8 screen, s16 x, s16 y, u32 *image) |
Load an 8x4 pixels image at a given position. Fastest of all pasting functions. | |
ALWAYSINLINE void | PA_16c8X6 (u8 screen, s16 x, s16 y, u32 *image) |
Load an 8x6 pixels image at a given position. Second fastest of all pasting functions. | |
ALWAYSINLINE void | PA_16c8X8 (u8 screen, s16 x, s16 y, u32 *image) |
Load an 8x8 pixels image at a given position. | |
ALWAYSINLINE void | PA_16c16X8 (u8 screen, s16 x, s16 y, u32 *image) |
ALWAYSINLINE void | PA_16c16X12 (u8 screen, s16 x, s16 y, u32 *image) |
ALWAYSINLINE void | PA_16c16X16 (u8 screen, s16 x, s16 y, u32 *image) |
ALWAYSINLINE void | PA_16c8Xi (u8 screen, s16 x, s16 y, u32 *image, u8 i) |
Load an 8xi row from a 8x16 pixels image at a given position. If i>16 the image is repeated. | |
void | PA_16cLetter (u8 screen, s16 x, s16 y, char letter, u8 size, u8 color) |
void | PA_16cClearZone (u8 screen, s16 x1, s16 y1, s16 x2, s16 y2) |
Erase a 16c background zone. | |
u8 | PA_16cGetPixel (u8 screen, s16 x, s16 y) |
Returns the pixel value of a given point on a 16c background. | |
s16 | PA_16cTextRot (u8 screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char *text, u8 color, u8 size, s32 limit) |
Variables | |
u32 | buffer16c [8] |
#define PA_16cCustomFont | ( | c16_slot, | |||
c16_font | ) |
Value:
{\ bittext_maps[c16_slot] = (u16*)(void*)c16_font##_Map; \ c16_tiles[c16_slot] = (u32*)(void*)c16_font##_Tiles; \ pa_bittextdefaultsize[c16_slot] = (u8*)c16_font##_Sizes; \ pa_bittextpoliceheight[c16_slot] = c16_font##_Height;\ }
c16_slot | Font slot... 0-4 are used by the defaut PAlib fonts, 5-9 are free to use. You can freely overwrite the PAlib fonts if you want | |
c16_font | Font name;.. |
#define PA_16cSetTextRot | ( | rotate | ) | textinfo.rot = rotate |
#define PA_16cTextAlign | ( | align | ) | PA_TextAlign(align) |
#define PA_16cTextLetterSpacing | ( | spacing | ) | PA_TextLetterSpacing(spacing) |
#define PA_16cTextLineSpacing | ( | spacing | ) | PA_TextLineSpacing(spacing) |
ALWAYSINLINE void PA_16c16X12 | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image | |||
) |
ALWAYSINLINE void PA_16c16X16 | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image | |||
) |
ALWAYSINLINE void PA_16c16X8 | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image | |||
) |
ALWAYSINLINE void PA_16c8X4 | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image | |||
) |
Load an 8x4 pixels image at a given position. Fastest of all pasting functions.
screen | Screen... | |
x | X position in pixels of the top left corner. Note that it ranges from -8 to 255, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
y | y position in pixels of the top left corner. Note that it ranges from -8 to 191, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
image | 16 color image to load. Use (u32*)ImageName if you get an error... |
ALWAYSINLINE void PA_16c8X6 | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image | |||
) |
Load an 8x6 pixels image at a given position. Second fastest of all pasting functions.
screen | Screen... | |
x | X position in pixels of the top left corner. Note that it ranges from -8 to 255, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
y | y position in pixels of the top left corner. Note that it ranges from -8 to 191, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
image | 16 color image to load. Use (u32*)ImageName if you get an error... |
ALWAYSINLINE void PA_16c8X8 | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image | |||
) |
Load an 8x8 pixels image at a given position.
screen | Screen... | |
x | X position in pixels of the top left corner. Note that it ranges from -8 to 255, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
y | y position in pixels of the top left corner. Note that it ranges from -8 to 191, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
image | 16 color image to load. Use (u32*)ImageName if you get an error... |
ALWAYSINLINE void PA_16c8Xi | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 * | image, | |||
u8 | i | |||
) |
Load an 8xi row from a 8x16 pixels image at a given position. If i>16 the image is repeated.
screen | Screen... | |
x | X position in pixels of the top left corner. Note that it ranges from -8 to 255, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
y | y position in pixels of the top left corner. Note that it ranges from -8 to 191, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
image | 16 color image to load. Use (u32*)ImageName if you get an error... | |
i | Number of lines of the image drawn (if greater than 16 the image will be repeated). |
void PA_16cClearZone | ( | u8 | screen, | |
s16 | x1, | |||
s16 | y1, | |||
s16 | x2, | |||
s16 | y2 | |||
) |
Erase a 16c background zone.
screen | Screen... | |
x1 | Upper left corner... | |
y1 | Upper left corner... | |
x2 | Lower right corner... | |
y2 | Lower right corner... |
ALWAYSINLINE void PA_16cDeletePixel | ( | u8 | screen, | |
s16 | x, | |||
s16 | y | |||
) |
inline void PA_16cErase | ( | u8 | screen | ) | [inline] |
Erase the 16color background. Must be used right after PA_WaitForVBL to avoid glitches.
screen | Choose de screen (0 or 1) |
inline u8 PA_16cGetPixel | ( | u8 | screen, | |
s16 | x, | |||
s16 | y | |||
) | [inline] |
Returns the pixel value of a given point on a 16c background.
screen | Screen... | |
x | X value... | |
y | Y value... |
void PA_16cLetter | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
char | letter, | |||
u8 | size, | |||
u8 | color | |||
) | [inline] |
ALWAYSINLINE PA_16cPutPixel | ( | u8 | screen, | |
s16 | x, | |||
s16 | y, | |||
u32 | color | |||
) |
Plot a pixel on a 16c background.
screen | Screen... | |
x | X position in pixels of the top left corner. Note that it ranges from -8 to 263, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
y | y position in pixels of the top left corner. Note that it ranges from -8 to 199, in order to allow half-way offscreen images. NEVER DRAW BEYOND THESE LIMITS, or else you'll get major background glitches | |
color | Pixel value (0-15, uses the loaded palette) |
s16 PA_16cText | ( | u8 | screen, | |
s16 | basex, | |||
s16 | basey, | |||
s16 | maxx, | |||
s16 | maxy, | |||
char * | text, | |||
u8 | color, | |||
u8 | size, | |||
s32 | limit | |||
) |
This is a variable width and variable size function to draw text on the screen.
screen | Chose de screen (0 or 1) | |
basex | X coordinate of the top left corner | |
basey | Y coordinate of the top left corner | |
maxx | X coordinate of the down right corner | |
maxy | Y coordinate of the down right corner | |
text | Text, such as "Hello World" | |
color | Palette color to use (0-255) | |
size | Size of the text, from 0 (really small) to 4 (pretty big) | |
limit | You can give a maximum number of characters to output. This can be usefull to have a slowing drawing text (allow to draw 1 more character each frame...) |
s16 PA_16cTextRot | ( | u8 | screen, | |
s16 | basex, | |||
s16 | basey, | |||
s16 | maxx, | |||
s16 | maxy, | |||
char * | text, | |||
u8 | color, | |||
u8 | size, | |||
s32 | limit | |||
) |
inline void PA_Dual16cErase | ( | void | ) | [inline] |
Erase the 16color background on both screens. Must be used right after PA_WaitForVBL to avoid glitches.
inline void PA_Init16cBg | ( | u8 | screen, | |
u8 | bg | |||
) | [inline] |
Initialise 16color background on which you can paste images...
Initialise 16color background on which you can paste images... Using palette 0.
screen | Choose de screen (0 or 1) | |
bg | Background number (0-3) Background number (0-3) |
void PA_Init16cBgEx | ( | u8 | screen, | |
u8 | bg, | |||
u8 | npalette | |||
) |
inline void PA_InitComplete16c | ( | u8 | bg, | |
void * | Palette | |||
) | [inline] |
Initialise a 16color background on each screen and give them a given palette.
bg | Background number | |
Palette | 16 color palette... |
u32 buffer16c[8] |