PA_Text.h

Go to the documentation of this file.
00001 #ifndef _PA_Text
00002 #define _PA_Text
00003 
00004 
00005 
00012 //#include "../PA.h"
00013 #include "PA_Tile.h"
00014 
00015 #include "../../../lib/arm9/PA/Text/all_gfx.h" // Include the text !
00016 
00017 
00019 // Système pour le texte
00021 
00022 
00023 extern u16 textcol[2]; // Garde en mémoire la couleur du texte
00024 extern u8 PAbgtext[2];
00025 
00026 
00027 extern u16 *PA_textmap[2]; //Pointeur vers la map et les tiles...
00028 extern u8 *PA_texttiles[2];
00029 extern u16 *PA_textpal[2];
00030 
00031 extern s8 PA_font[2];  // 0 pour normal, 1 pour dégradé, -1 pour custom
00032 
00033 
00034 
00035 
00036 // Texte à taille variable
00037 
00038 #include "text0.h" // La police à taille variable...
00039 #include "text1.h" // La police à taille variable...
00040 #include "text2.h" // La police à taille variable...
00041 #include "text3.h" // La police à taille variable...
00042 #include "text4.h" // La police à taille variable...
00043 
00044 
00045 
00046 typedef void(*letterfp)(u8 size, bool screen, u16 x, u16 y, char lettertemp, u8 color);
00047 
00048 extern const u8 *textData[5];
00049 extern const u8 policeheight[5];
00050 extern        const u16 policewidth[5];
00051 extern const u8 policesize[5][256];
00052 
00053 
00054 extern letterfp letters[5];
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00082 void PA_InitText(bool screen, u8 bg_select);
00083 
00084 
00102 extern inline void PA_SetTileLetter(bool screen, u16 x, u16 y, char letter) {
00103        PA_SetMapTileAll(screen, PAbgtext[screen], x, y, PA_textmap[screen][(u16)letter]);
00104 }
00105 
00123 void PA_OutputText(bool screen, u16 x, u16 y, char* text, ...);
00124 
00142 u16 PA_OutputSimpleText(bool screen, u16 x, u16 y, const char *text);
00143 
00170 u32 PA_BoxText(bool screen, u16 basex, u16 basey, u16 maxx, u16 maxy, const char *text, u32 limit);
00171 
00198 u32 PA_BoxTextNoWrap(bool screen, u16 basex, u16 basey, u16 maxx, u16 maxy, const char *text, u32 limit);
00199 
00200 
00219 void PA_SetTextCol(bool screen, u8 r, u8 g, u8 b);
00220 
00221 
00222 
00236 void PA_SetTextFont(bool screen, u8 font);
00237 
00238 
00248 #define PA_ShowFont(screen) PA_LoadBgMap(screen, PAbgtext[screen], (void*)PA_textmap[screen], BG_256X256)
00249 
00250 
00251 
00268 void PA_SetTextCustomFont(bool screen, void* tiles, void* map);
00269 
00270 
00271 
00307 s16 PA_SmartText(bool screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char* text, u8 color, u8 size, u8 transp,  s32 limit);
00308 
00309 
00310 
00343 s16 PA_CenterSmartText(bool screen, s16 basex, s16 basey, s16 maxx, s16 maxy, char* text, u8 color, u8 size, u8 transp);
00344 
00345 
00346 
00358 extern inline bool PA_CompareText(char *text1, char *text2){
00359        bool ok = 1; // Devrait etre bon
00360        u8 i = 0; 
00361        while(ok && text2[i]){
00362               if (text1[i] != text2[i]) ok = 0;
00363               i++;
00364        }
00365        return ok;
00366 }
00367 
00368 
00380 extern inline void PA_CopyText(char *text1, char *text2){
00381 u8 i = 0;
00382 text1[i] = text2[i];
00383        do{
00384               i++;
00385               text1[i] = text2[i];
00386        }
00387        while (text2[i]);
00388 }
00389 
00390 
00391 
00392 void PA_OutputTextSpecial0(bool screen, int x1, int y,char *text);
00393 void PA_OutputTextSpecial1(bool screen, int x1, int y,char *text);
00394 void PA_OutputTextSpecial2(bool screen, int x1, int y,char *text);
00395 void PA_OutputTextSpecial3(bool screen, int x1, int y,char *text);
00396 void PA_OutputTextSpecial4(bool screen, int x1, int y,char *text);
00397 void PA_OutputTextSpecial5(bool screen, int x1, int y,char *text);
00398  // end of Text
00400 
00401 
00402 
00403 #endif
00404 
00405 

Generated on Tue Dec 13 11:52:55 2005 for PAlib by  doxygen 1.3.9.1