26 return (s[0] << 8) | s[1];
33 if ((
u16)(code - 0x824F) < 0x146) {
35 for (i = 4; map[i].
code != 0xFFFF; i++) {
36 if (code == map[i].code) {
42 for (i = 0; map[i].
code != 0xFFFF; i++) {
43 if (code == map[i].code) {
44 return map[i].
index | 0x100;
53 return (s[0] << 8) | s[1];
56 return (s[0] << 8) | s[1];
74s32 FONT_CODE_LENGTHS[11] = { 1, 2, 3, 2, 5, 3, 3, 2, 3, 2, 0 };
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
Font FONT
decode is declared without a prototype, as callers would truncate the u8 mode, so decodeChar is cast ...
s32 FONT_CODE_LENGTHS[11]
The length of each control code, with its arguments.
void loadFont(void)
Loads the font's images into VRAM and starts loading the menu sprites.
s16 decodeChar(u8 *s, u8 mode, TextStyle *font)
The next character as kind << 8 | value (see Font); mode set for Shift-JIS text.
TextStyle FONT_STYLES[4]
Style 0 is unused; the others have lines of 14, 11 and 9 pixels.
void(* request)(s32 file)
void *(* getEntry)(u32 fileAndIndex)
The font (FONT): three text styles, the length of each control code, and decode(),...
Maps a Shift-JIS character to a glyph.
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
void(* setImagePos)()
(x, y)
void(* loadArchive)()
(archive): each image 64 halfwords to the right
GlyphMap FONT_GLYPH_MAP[]
The font's Shift-JIS codes of its glyphs and icons, up to 0xFFFF.
Glyph FONT_GLYPHS_1[230]
The font's three sheets (FONT_STYLES), each with its glyphs and its icons.
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.