PA_Text.h File Reference

Text system in tile mode. More...

Go to the source code of this file.

Defines

#define PA_InitCustomTextEx(screen, bg_select, tiles, map, pal)
#define PA_InitCustomText(screen, bg_select, text)   PA_InitCustomTextEx(screen, bg_select, text##_Tiles, text##_Map, text##_Pal)
 Init the text using one of your own fonts !
#define PA_ShowFont(screen)   PA_LoadBgMap(screen, PAbgtext[screen], (void*)PA_textmap[screen], BG_256X256)
 Show the current font used. This is just for debug, no real use ingame

Typedefs

typedef void(* letterfp )(u8 size, bool screen, u16 x, u16 y, char lettertemp, u8 color)

Functions

void PA_InitText (bool screen, u8 bg_select)
 Output text on the gba screen. Works only in modes 0-2
void PA_SetTileLetter (bool screen, u16 x, u16 y, char letter)
 Output a letter on the DS screen.
void PA_SetTextTileCol (bool screen, u8 color)
void PA_OutputText (bool screen, u16 x, u16 y, char *text,...)
 Output text on the DS screen. Works only in modes 0-2
u16 PA_OutputSimpleText (bool screen, u16 x, u16 y, const char *text)
 Output simple text on the DS screen. Works only in modes 0-2. Much faster than PA_OutputText, but much more limited... Returns the number of letters
u32 PA_BoxText (bool screen, u16 basex, u16 basey, u16 maxx, u16 maxy, const char *text, u32 limit)
 Output text on the DS screen. This text is limited to a chosen box, and you can chose the number of letters to output (can be used to show 'typed' text, just put 10000 if you want to show all the text...). Returns the number of letters outputed
u32 PA_BoxTextNoWrap (bool screen, u16 basex, u16 basey, u16 maxx, u16 maxy, const char *text, u32 limit)
 Output text on the DS screen. This text is limited to a chosen box, and you can chose the number of letters to output (can be used to show 'typed' text, just put 10000 if you want to show all the text...). Returns the number of letters outputed. This function does not support word wrapping
void PA_SetTextCol (bool screen, u16 r, u16 g, u16 b)
s16 PA_SmartText (bool screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char *text, u8 color, u8 size, u8 transp, s32 limit)
 This is a variable width and variable size function to draw text on the screen. It draws on an 8 bit background (see PA_Init8bitBg for more info), and has options such as size, transaprency, and box limits, as well as the color. Only problem : it does not take commands such as d, etc... The function returns the number of characters it outputed
s16 PA_CenterSmartText (bool screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char *text, u8 color, u8 size, u8 transp)
 Basicaly the same as the SmartText function, but this time centered...
bool PA_CompareText (char *text1, char *text2)
 Compare a string to a second. Example : PA_CompareText(Playname, "Mollusk");
void PA_CopyText (char *text1, char *text2)
 Copy one string into another
void PA_OutputTextSpecial0 (bool screen, int x1, int y, char *text)
void PA_OutputTextSpecial1 (bool screen, int x1, int y, char *text)
void PA_OutputTextSpecial2 (bool screen, int x1, int y, char *text)
void PA_OutputTextSpecial3 (bool screen, int x1, int y, char *text)
void PA_OutputTextSpecial4 (bool screen, int x1, int y, char *text)
void PA_OutputTextSpecial5 (bool screen, int x1, int y, char *text)

Variables

u16 textcol [2]
u8 PAbgtext [2]
u16 * PA_textmap [2]
u8 * PA_texttiles [2]
u16 * PA_textpal [2]
s8 PA_font [2]
letterfp letters [5]
u8 PAtext_pal [2]


Detailed Description

Text system in tile mode.

Not much to say, just a good debug option...


Define Documentation

#define PA_InitCustomTextEx screen,
bg_select,
tiles,
map,
pal   ) 
 

Value:

{\
   PAbgtext[screen] = bg_select;\
   PA_LoadSimpleBg(screen, bg_select, tiles, Blank, BG_256X256, 0, 1);\
   PA_LoadBgPal(screen, bg_select, (void*)pal);\
   PA_textmap[screen] = (u16*)map;PA_textpal[screen] = (u16*)pal;}


Generated on Wed Dec 21 17:41:56 2005 for PAlib by  doxygen 1.3.9.1