PAlib
|
Macros | |
#define | PA_LoadFake16bitBitmap(screen, bitmap) |
Load a 16 bit bitmap into a fake 16 bit background. | |
#define | PA_ClearFake16bitBg(screen) dmaFillWords(0, (void*)PA_DrawFake16[screen], 256*192*2) |
Clear a fake 16 bit background. | |
#define | PA_PutFake16bitPixel(screen, x, y, color) PA_DrawFake16[screen][(x) + 256 * (y)] = color |
Plots a pixel into a fake 16 bit background. | |
#define | PA_GetFake16bitPixel(screen, x, y) PA_DrawFake16[screen][(x) + 256 * (y)] |
Gets the color of a specified pixel of a fake 16 bit background. | |
#define | PA_DrawFake16bitRect(screen, x1, y1, x2, y2, color) |
Draws a rectangle on a fake 16 bit background. | |
#define | PA_Fake16bitLoadBmpEx(screen, bmp, x, y) PA_LoadBmpToBuffer(PA_DrawFake16[screen], x, y, bmp, 256) |
Load a BMP on a fake 16 bit background... Don't forget to Init the background ! | |
#define | PA_Fake16bitLoadBmp(screen, bmp) PA_Fake16bitLoadBmpEx(screen, bmp, 0, 0) |
Load a BMP on a fake 16 bit background... Don't forget to Init the background ! | |
#define | PA_Fake16bitLoadGif(screen, gif) PA_Fake16bitLoadGifXY(screen, gif, 0, 0) |
Load a Gif on a fake 16 bit background... Don't forget to Init the background ! | |
#define | PA_Fake16bitLoadJpeg(screen, jpeg) JPEG_DecompressImage((u8*)jpeg, PA_DrawFake16[screen], 256, 192) |
Load a jpeg on a fake 16 bit background... Don't forget to Init the background ! | |
Functions | |
void | PA_InitFake16bitBg (u8 screen, u8 prio) |
Initialize a fake 16 bit background. | |
void | PA_DrawFake16bitLine (u8 screen, u16 x1, u16 y1, u16 x2, u16 y2, u16 color) |
Draws a line on a fake 16 bit background. | |
Functions to handle fake 16 bit backgrounds that take up less memory than real ones!
#define PA_LoadFake16bitBitmap | ( | screen, | |
bitmap | |||
) |
Load a 16 bit bitmap into a fake 16 bit background.
screen | Choose the screen (0 or 1) |
bitmap | Bitmap name |
#define PA_ClearFake16bitBg | ( | screen | ) | dmaFillWords(0, (void*)PA_DrawFake16[screen], 256*192*2) |
Clear a fake 16 bit background.
screen | Choose the screen (0 or 1) |
#define PA_PutFake16bitPixel | ( | screen, | |
x, | |||
y, | |||
color | |||
) | PA_DrawFake16[screen][(x) + 256 * (y)] = color |
Plots a pixel into a fake 16 bit background.
screen | Choose the screen (0 or 1) |
x | X position of the point. Be carefull, if X is not between 0 and 255, it'll give unwanted results |
y | Y position of the point. Be carefull, if Y is not between 0 and 191, it'll give unwanted results |
color | 15 bits color. You can use the PA_RGB macro to set the RGB values... |
#define PA_GetFake16bitPixel | ( | screen, | |
x, | |||
y | |||
) | PA_DrawFake16[screen][(x) + 256 * (y)] |
Gets the color of a specified pixel of a fake 16 bit background.
screen | Choose the screen (0 or 1) |
x | X position of the point. Be carefull, if X is not between 0 and 255, it'll give unwanted results |
y | Y position of the point. Be carefull, if Y is not between 0 and 191, it'll give unwanted results |
#define PA_DrawFake16bitRect | ( | screen, | |
x1, | |||
y1, | |||
x2, | |||
y2, | |||
color | |||
) |
Draws a rectangle on a fake 16 bit background.
screen | Choose the screen (0 or 1) |
x1 | X position of the first point. Be carefull, if X is not between 0 and 255, it'll give unwanted results |
y1 | Y position of the first point. Be carefull, if Y is not between 0 and 191, it'll give unwanted results |
x2 | X position of the second point. Be carefull, if X is not between 0 and 255, it'll give unwanted results |
y2 | Y position of the second point. Be carefull, if Y is not between 0 and 191, it'll give unwanted results |
color | 15 bits color. You can use the PA_RGB macro to set the RGB values... |
#define PA_Fake16bitLoadBmpEx | ( | screen, | |
bmp, | |||
x, | |||
y | |||
) | PA_LoadBmpToBuffer(PA_DrawFake16[screen], x, y, bmp, 256) |
Load a BMP on a fake 16 bit background... Don't forget to Init the background !
screen | Chose de screen (0 or 1) |
x | X position of the top left corner |
y | Y position of the top left corner |
bmp | BMP image... |
#define PA_Fake16bitLoadBmp | ( | screen, | |
bmp | |||
) | PA_Fake16bitLoadBmpEx(screen, bmp, 0, 0) |
Load a BMP on a fake 16 bit background... Don't forget to Init the background !
screen | Choose the screen (0 or 1) |
bmp | BMP image... |
#define PA_Fake16bitLoadGif | ( | screen, | |
gif | |||
) | PA_Fake16bitLoadGifXY(screen, gif, 0, 0) |
Load a Gif on a fake 16 bit background... Don't forget to Init the background !
screen | Chose de screen (0 or 1) |
gif | Gif image... |
#define PA_Fake16bitLoadJpeg | ( | screen, | |
jpeg | |||
) | JPEG_DecompressImage((u8*)jpeg, PA_DrawFake16[screen], 256, 192) |
Load a jpeg on a fake 16 bit background... Don't forget to Init the background !
screen | Chose de screen (0 or 1) |
jpeg | jpeg image... |
|
extern |
Initialize a fake 16 bit background.
screen | Choose the screen (0 or 1) |
prio | Background priority (from 0 to 3, being 0 the highest) |
|
extern |
Draws a line on a fake 16 bit background.
screen | Choose the screen (0 or 1) |
x1 | X position of the first point. Be carefull, if X is not between 0 and 255, it'll give unwanted results |
y1 | Y position of the first point. Be carefull, if Y is not between 0 and 191, it'll give unwanted results |
x2 | X position of the second point. Be carefull, if X is not between 0 and 255, it'll give unwanted results |
y2 | Y position of the second point. Be carefull, if Y is not between 0 and 191, it'll give unwanted results |
color | 15 bits color. You can use the PA_RGB macro to set the RGB values... |