|
Digimon World 3 decomp
The European version, SLES_039.36
|
Go to the source code of this file.
Macros | |
| #define | SWAP16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0xFF) << 8)) |
| Swaps the bytes of a Shift-JIS code: the text has them big-endian. | |
Functions | |
| void | bindTextTools (TextTools *obj) |
Makes obj the text tools the methods work on. | |
| char * | getString (s32 *table, s32 index) |
String index of a string table (a count, then byte offsets from its start), or NULL. | |
| s32 | measureText (TextBuffer *text, TextStyle *style, s16 spacing) |
| The width in pixels of the text's widest line in a style, with a fixed spacing per character unless spacing is 0. | |
| void | convertText (void *buf, void *text, s32 mode) |
Converts the string text to buf: mode 0 from font codes to Shift-JIS (a code below 4 is followed by an icon's), mode 1 back. | |
| void | initTextTools (TextTools *obj) |
| Clears a text tools object, gives it its methods and binds it. | |
Variables | |
| static TextTools * | TEXT_TOOLS |
| Small variables, addressed through $gp (see the Makefile) | |
| GlyphMap | FONT_GLYPH_MAP [] |
| The font's Shift-JIS codes of its glyphs and icons, up to 0xFFFF. | |
| GlyphMap | FONT_ICON_MAP [] |
| Glyph | FONT_UNUSED_GLYPH_0 = { 0xFF } |
| Two empty glyphs that nothing reads. | |
| Glyph | FONT_UNUSED_GLYPH_1 = { 0xFF } |
| Glyph | FONT_GLYPHS_1 [230] |
| The font's three sheets (FONT_STYLES), each with its glyphs and its icons. | |
| Glyph | FONT_ICONS_1 [114] |
| Glyph | FONT_GLYPHS_2 [230] |
| Glyph | FONT_ICONS_2 [114] |
| Glyph | FONT_GLYPHS_3 [230] |
| Glyph | FONT_ICONS_3 [114] |
| #define SWAP16 | ( | x | ) | ((((x) & 0xFF00) >> 8) | (((x) & 0xFF) << 8)) |
Swaps the bytes of a Shift-JIS code: the text has them big-endian.
Definition at line 127 of file text_tools.c.
| void bindTextTools | ( | TextTools * | obj | ) |
Makes obj the text tools the methods work on.
Definition at line 10 of file text_tools.c.
Referenced by initTextTools().
String index of a string table (a count, then byte offsets from its start), or NULL.
Definition at line 15 of file text_tools.c.
Referenced by initTextTools().
| s32 measureText | ( | TextBuffer * | text, |
| TextStyle * | style, | ||
| s16 | spacing | ||
| ) |
The width in pixels of the text's widest line in a style, with a fixed spacing per character unless spacing is 0.
An old-style definition, as its unprototyped declaration and TextTools.measure suit: callers pass an int, which it takes as a short (converted once, on entry).
Definition at line 30 of file text_tools.c.
Referenced by initTextTools(), and measureText().
| void convertText | ( | void * | buf, |
| void * | text, | ||
| s32 | mode | ||
| ) |
Converts the string text to buf: mode 0 from font codes to Shift-JIS (a code below 4 is followed by an icon's), mode 1 back.
Not terminated. The Shift-JIS side is a byte buffer written and read a halfword at a time.
Definition at line 134 of file text_tools.c.
Referenced by initTextTools().
| void initTextTools | ( | TextTools * | obj | ) |
Clears a text tools object, gives it its methods and binds it.
Definition at line 193 of file text_tools.c.
Referenced by CARDGAME_drawCenteredText(), createTalkBox(), getName(), initNewGameData(), setName(), showMessageText(), STGMCARD_loadFiles(), textWindowSetRightAlign(), and textWindowSetSubString().
|
static |
Small variables, addressed through $gp (see the Makefile)
Definition at line 7 of file text_tools.c.
Referenced by bindTextTools().
| GlyphMap FONT_GLYPH_MAP[] |
The font's Shift-JIS codes of its glyphs and icons, up to 0xFFFF.
Definition at line 202 of file text_tools.c.
Referenced by convertText().
| GlyphMap FONT_ICON_MAP[] |
Definition at line 244 of file text_tools.c.
Referenced by convertText().
| Glyph FONT_UNUSED_GLYPH_0 = { 0xFF } |
Two empty glyphs that nothing reads.
Definition at line 268 of file text_tools.c.
| Glyph FONT_UNUSED_GLYPH_1 = { 0xFF } |
Definition at line 269 of file text_tools.c.
| Glyph FONT_GLYPHS_1[230] |
The font's three sheets (FONT_STYLES), each with its glyphs and its icons.
the three font sizes' glyphs and icons (text_tools.c)
Definition at line 272 of file text_tools.c.
| Glyph FONT_ICONS_1[114] |
Definition at line 431 of file text_tools.c.
| Glyph FONT_GLYPHS_2[230] |
Definition at line 512 of file text_tools.c.
| Glyph FONT_ICONS_2[114] |
Definition at line 671 of file text_tools.c.
| Glyph FONT_GLYPHS_3[230] |
Definition at line 752 of file text_tools.c.
| Glyph FONT_ICONS_3[114] |
Definition at line 911 of file text_tools.c.