#include "PA_BgTiles.h"
#include "text0.h"
#include "text1.h"
#include "text2.h"
#include "text3.h"
#include "text4.h"
Data Structures | |
struct | textborders |
Defines | |
#define | PA_InitCustomTextEx(screen, bg_select, tiles, map, pal) |
#define | TEXT_WHITE 0 |
#define | TEXT_RED 1 |
#define | TEXT_GREEN 2 |
#define | TEXT_BLUE 3 |
#define | TEXT_MAGENTA 4 |
#define | TEXT_CYAN 5 |
#define | TEXT_YELLOW 6 |
#define | TEXT_LGRAY 7 |
#define | TEXT_DGRAY 8 |
#define | TEXT_BLACK 9 |
#define | PA_SetTileLetter(screen, x, y, letter) PA_SetMapTileAll(screen, PAbgtext[screen], x, y, (PA_textmap[screen][(u16)letter]&((1<<12)-1)) + (PAtext_pal[screen] << 12)) |
Output a letter on the DS screen. | |
#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. | |
#define | PA_8bitCustomFont(bit8_slot, bit8_font) |
Add custom fonts to the 8bit Font system !! Font must be converted with PAGfx. | |
#define | PA_SmartText PA_8bitText |
Typedefs | |
typedef void(* | letterfp )(u8 size, u8 screen, u16 x, u16 y, char lettertemp, u8 color) |
typedef void(* | letterfp16bit )(u8 size, u8 screen, u16 x, u16 y, char lettertemp, u16 color) |
Functions | |
const unsigned short PA_text_Map[768] | __attribute__ ((aligned(4))) |
void | PA_CreateTextPal (u8 screen, u8 pal_number, u16 r, u16 g, u16 b) |
void | PA_PrintYPlus (u8 screen) |
void | PA_InitText (u8 screen, u8 bg_select) |
Output text on the gba screen. Works only in modes 0-2. | |
void | PA_SetTextTileCol (u8 screen, u8 color) |
Change the text writing color (does not change the current text's color). | |
void | PA_OutputText (u8 screen, u16 x, u16 y, char *text,...) |
Output text on the DS screen. Works only in modes 0-2. | |
u16 | PA_OutputSimpleText (u8 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 (u8 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 (u8 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 (u8 screen, u16 r, u16 g, u16 b) |
Change the screen text's default color. | |
s16 | PA_8bitText (u8 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_16bitText (u8 screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char *text, u16 color, u8 size, u8 transp, s32 limit) |
s16 | PA_CenterSmartText (u8 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... | |
void | PA_CopyText (char *text1, char *text2) |
Copy one string into another. | |
void | PA_InitTextBorders (u8 screen, u8 x1, u8 y1, u8 x2, u8 y2) |
Initialise a text box with it's borders. This makes writing in a delimited area much easier... | |
void | PA_EraseTextBox (u8 screen) |
Erases the text in a textbox. Requires that that box be initialized with PA_InitTextBorders. | |
u32 | PA_SimpleBoxText (u8 screen, const char *text, u32 limit) |
Write text in an initiliazed textbox. Similar to PA_BoxText, but without needing the text limits. | |
void | PA_ClearTextBg (u8 screen) |
Erase all the text on a given screen. | |
void | PA_Print (u8 screen, char *text,...) |
Output text on the DS screen. Works like a printf function. | |
void | PA_PrintLetter (u8 screen, char letter) |
Like PA_Print, but for a letter. | |
void | PA_OutputTextSpecial0 (u8 screen, int x1, int y, char *text) |
void | PA_OutputTextSpecial1 (u8 screen, int x1, int y, char *text) |
void | PA_OutputTextSpecial2 (u8 screen, int x1, int y, char *text) |
void | PA_OutputTextSpecial3 (u8 screen, int x1, int y, char *text) |
void | PA_OutputTextSpecial4 (u8 screen, int x1, int y, char *text) |
void | PA_OutputTextSpecial5 (u8 screen, int x1, int y, char *text) |
Variables | |
const int | PA_text_Info [3] |
u8 * | bit8_tiles [10] |
u32 | pa_printx [2] |
u32 | pa_printy [2] |
s16 | pa_printscroll [2] |
u16 | textcol [2] |
u8 | PAbgtext [2] |
u16 * | PA_textmap [2] |
u8 * | PA_texttiles [2] |
u16 * | PA_textpal [2] |
s8 | PA_font [2] |
const u8 * | textData [10] |
u8 | policeheight [10] |
u16 | policewidth [10] |
u8 * | policesize [10] |
u8 * | text_tiles [10] |
u16 * | text_maps [10] |
u8 * | pa8bitdefaultsize [10] |
u8 | police8bitheight [10] |
letterfp | letters [5] |
u16 | PAtext_pal [2] |
textborders | PA_TextBox [2] |
Not much to say, just a good debug option...
#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;PAtext_pal[screen]=0;\ u32 PAtexttempvar = 0; for (PAtexttempvar = 0; PAtexttempvar < 32*24; PAtexttempvar++) PA_SetTileLetter(screen, PAtexttempvar, 0, 0); }
#define PA_SmartText PA_8bitText |
#define TEXT_BLACK 9 |
#define TEXT_BLUE 3 |
#define TEXT_CYAN 5 |
#define TEXT_DGRAY 8 |
#define TEXT_GREEN 2 |
#define TEXT_LGRAY 7 |
#define TEXT_MAGENTA 4 |
#define TEXT_RED 1 |
#define TEXT_WHITE 0 |
#define TEXT_YELLOW 6 |
typedef void(* letterfp)(u8 size, u8 screen, u16 x, u16 y, char lettertemp, u8 color) |
typedef void(* letterfp16bit)(u8 size, u8 screen, u16 x, u16 y, char lettertemp, u16 color) |
const unsigned short PA_text_Map [768] __attribute__ | ( | (aligned(4)) | ) |
void PA_CreateTextPal | ( | u8 | screen, | |
u8 | pal_number, | |||
u16 | r, | |||
u16 | g, | |||
u16 | b | |||
) |
void PA_PrintYPlus | ( | u8 | screen | ) |
u8* bit8_tiles[10] |
u8* pa8bitdefaultsize[10] |
s8 PA_font[2] |
s16 pa_printscroll[2] |
u32 pa_printx[2] |
u32 pa_printy[2] |
const int PA_text_Info[3] |
u16* PA_textmap[2] |
u16* PA_textpal[2] |
u8* PA_texttiles[2] |
u8 PAbgtext[2] |
u16 PAtext_pal[2] |
u8 police8bitheight[10] |
u8 policeheight[10] |
u8* policesize[10] |
u16 policewidth[10] |
u16* text_maps[10] |
u8* text_tiles[10] |
u16 textcol[2] |
const u8* textData[10] |