PAlib
|
Macros | |
#define | PA_16cCustomFont(c16_slot, c16_font) |
[DEPRECATED] Add custom fonts to the 16cText system !! Font must be converted with PAGfx | |
Functions | |
static 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. | |
static void | PA_Dual16cErase (void) |
Erase the 16color background on both screens. Must be used right after PA_WaitForVBL to avoid glitches. | |
static 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, const char *text, u8 color, u8 size, s32 limit) |
This is a variable width and variable size function to draw text on the screen. | |
void | PA_Add16cFont (int slot, const PA_BgStruct *font) |
Add a custom font to the 16c font system. | |
ALWAYSINLINE void | PA_16cPutPixel (u8 screen, s16 x, s16 y, u32 color) |
Plot a pixel on a 16c background. | |
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_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_16cClearZone (u8 screen, s16 x1, s16 y1, s16 x2, s16 y2) |
Erase a 16c background zone. | |
static u8 | PA_16cGetPixel (u8 screen, s16 x, s16 y) |
Returns the pixel value of a given point on a 16c background. | |
Special 16color background on which you can paste images. Usefull to show shots in SHMUP !
#define PA_16cCustomFont | ( | c16_slot, | |
c16_font | |||
) |
[DEPRECATED] Add custom fonts to the 16cText system !! Font must be converted with PAGfx
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... |
|
inlinestatic |
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) |
static inline void PA_16cErase | ( | u8 | screen | ) |
Erase the 16color background. Must be used right after PA_WaitForVBL to avoid glitches.
screen | Choose de screen (0 or 1) |
|
inlinestatic |
Initialise a 16color background on each screen and give them a given palette.
bg | Background number |
Palette | 16 color palette... |
s16 PA_16cText | ( | u8 | screen, |
s16 | basex, | ||
s16 | basey, | ||
s16 | maxx, | ||
s16 | maxy, | ||
const 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...) |
void PA_Add16cFont | ( | int | slot, |
const PA_BgStruct * | font | ||
) |
Add a custom font to the 16c font system.
slot | Font slot. 0-4 are used by the default PAlib fonts, 5-9 are free to use. You can freely overwrite the PAlib fonts if you want. |
font | Pointer to the font. |
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) |
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... |
|
inlinestatic |
Returns the pixel value of a given point on a 16c background.
screen | Screen... |
x | X value... |
y | Y value... |