include/nds/arm9/PA_16c.h File Reference

16color pseudo-bitmap mode. More...

#include "PA9.h"
#include "PA_Palette.h"
#include "PA_TextBits.h"

Defines

#define ALIGN_LEFT   0
#define ALIGN_RIGHT   1
#define ALIGN_CENTER   2
#define ALIGN_JUSTIFY   3
#define PA_16cLetterPos   PA_LetterPos
#define PA_LoadPal16c(palette, source)   DMA_Copy(source, (void*)palette, 16, DMA_16NOW);
#define PA_16cPos(x, y)   ((((x)>>3)*26*8) + (y) + 8)
#define PA_Plot8Pixels(a, b, c, d)   { PA_Draw1632[a][b] |= (d<<c); PA_Draw1632[a][b+(26*8)] |= (d>>(32-c)); }
#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

ALWAYSINLINE void PA_16c8X8 (u8 screen, s16 x, s16 y, u32 *image)
 Load an 8x8 pixels image at a given position.
void PA_16c8X8Color (u8 screen, s16 x, s16 y, u32 *image, u8 color)
void PA_16c8pixels (u8 screen, s16 x, s16 y, u32 colors)
void PA_16c16X16Letter (u8 screen, s16 x, s16 y, u8 letter, u8 size, u8 color)
void PA_16c8X8Letter (u8 screen, s16 x, s16 y, u8 letter, u8 size, u8 color)
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_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

u16 * PA_Draw16 [2]
u32 * PA_Draw1632 [2]
u32 Blank [130000 >>2]
u16 * bittext_maps [10]
u8 * bittext_tiles_blank [10]
u32 * c16_tiles [10]
u8 * pa_bittextdefaultsize [10]
u16 pa_bittextsizes [5]
u8 pa_bittextpoliceheight [10]
u8 * pa16cdefaultsize [10]
u8 c16policeheight [10]
u32 buffer16c [8]


Detailed Description

16color pseudo-bitmap mode.

Special 16color background on which you can paste images. Usefull to show shots in SHMUP !


Define Documentation

#define ALIGN_CENTER   2

#define ALIGN_JUSTIFY   3

#define ALIGN_LEFT   0

#define ALIGN_RIGHT   1

#define PA_16cLetterPos   PA_LetterPos

#define PA_16cPos ( x,
 )     ((((x)>>3)*26*8) + (y) + 8)

#define PA_LoadPal16c ( palette,
source   )     DMA_Copy(source, (void*)palette, 16, DMA_16NOW);

#define PA_Plot8Pixels ( a,
b,
c,
 )     { PA_Draw1632[a][b] |= (d<<c); PA_Draw1632[a][b+(26*8)] |= (d>>(32-c)); }


Function Documentation

void PA_16c16X16Letter ( u8  screen,
s16  x,
s16  y,
u8  letter,
u8  size,
u8  color 
) [inline]

void PA_16c8pixels ( u8  screen,
s16  x,
s16  y,
u32  colors 
) [inline]

void PA_16c8X8Color ( u8  screen,
s16  x,
s16  y,
u32 *  image,
u8  color 
)

void PA_16c8X8Letter ( u8  screen,
s16  x,
s16  y,
u8  letter,
u8  size,
u8  color 
) [inline]


Variable Documentation

u16 * bittext_maps

u32 Blank[130000 >>2]

u32 * c16_tiles

u16* PA_Draw16[2]

u32* PA_Draw1632[2]


Generated on Sat Jun 13 12:55:13 2009 for PAlib - Programmer's Arsenal by  doxygen 1.5.8