Loading [MathJax]/extensions/tex2jax.js
Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
OSFont.c File Reference

Typedefs

typedef char *(* ParseStringCallback) (u16, char *, OSFontHeader **, int *)
 

Functions

static char * ParseStringS (u16 encode, const char *string, OSFontHeader **pfont, int *pfontCode)
 
static char * ParseStringW (u16 encode, const char *string, OSFontHeader **pfont, int *pfontCode)
 
static BOOL IsSjisLeadByte (u8 c)
 
static BOOL IsSjisTrailByte (u8 c)
 
static int GetFontCode (u16 encode, u16 code)
 
static void Decode (u8 *s, u8 *d)
 
static u32 GetFontSize (u8 *buf)
 
u16 OSGetFontEncode (void)
 
u16 OSSetFontEncode (u16 encode)
 
static void ReadROM (void *buf, int length, int offset)
 
static u32 ReadFont (void *img, u16 encode, void *fontData)
 
u32 OSLoadFont (OSFontHeader *fontData, void *tmp)
 
char * OSGetFontTexel (const char *string, void *image, s32 pos, s32 stride, s32 *width)
 
static void ExpandFontSheet (OSFontHeader *font, u8 *src, u8 *dst)
 
int OSInitFont (OSFontHeader *fontData)
 
char * OSGetFontTexture (const char *string, void **image, s32 *x, s32 *y, s32 *width)
 
char * OSGetFontWidth (const char *string, s32 *width)
 
int OSSetFontWidth (int fixed)
 

Variables

static OSFontHeaderFontDataAnsi
 
static OSFontHeaderFontDataSjis
 
static int FixedPitch
 
static ParseStringCallback ParseString
 
static u16 FontEncode = 0xFFFF
 
static u16 HankakuToCode []
 
static u16 Zenkaku2Code []
 

Typedef Documentation

◆ ParseStringCallback

typedef char *(* ParseStringCallback) (u16, char *, OSFontHeader **, int *)

Function Documentation

◆ Decode()

static void Decode ( u8 * s,
u8 * d )
static

◆ ExpandFontSheet()

static void ExpandFontSheet ( OSFontHeader * font,
u8 * src,
u8 * dst )
static

◆ GetFontCode()

static int GetFontCode ( u16 encode,
u16 code )
static

◆ GetFontSize()

static u32 GetFontSize ( u8 * buf)
static

◆ IsSjisLeadByte()

static BOOL IsSjisLeadByte ( u8 c)
static

◆ IsSjisTrailByte()

static BOOL IsSjisTrailByte ( u8 c)
static

◆ OSGetFontEncode()

u16 OSGetFontEncode ( void )

◆ OSGetFontTexel()

char * OSGetFontTexel ( const char * string,
void * image,
s32 pos,
s32 stride,
s32 * width )

◆ OSGetFontTexture()

char * OSGetFontTexture ( const char * string,
void ** image,
s32 * x,
s32 * y,
s32 * width )

◆ OSGetFontWidth()

char * OSGetFontWidth ( const char * string,
s32 * width )

◆ OSInitFont()

int OSInitFont ( OSFontHeader * fontData)

◆ OSLoadFont()

u32 OSLoadFont ( OSFontHeader * fontData,
void * tmp )

◆ OSSetFontEncode()

u16 OSSetFontEncode ( u16 encode)

◆ OSSetFontWidth()

int OSSetFontWidth ( int fixed)

◆ ParseStringS()

static char * ParseStringS ( u16 encode,
const char * string,
OSFontHeader ** pfont,
int * pfontCode )
static

◆ ParseStringW()

static char * ParseStringW ( u16 encode,
const char * string,
OSFontHeader ** pfont,
int * pfontCode )
static

◆ ReadFont()

static u32 ReadFont ( void * img,
u16 encode,
void * fontData )
static

◆ ReadROM()

static void ReadROM ( void * buf,
int length,
int offset )
static

Variable Documentation

◆ FixedPitch

int FixedPitch
static

◆ FontDataAnsi

OSFontHeader* FontDataAnsi
static

◆ FontDataSjis

OSFontHeader* FontDataSjis
static

◆ FontEncode

u16 FontEncode = 0xFFFF
static

◆ HankakuToCode

u16 HankakuToCode[]
static
Initial value:
= { 0x20C, 0x20D, 0x20E, 0x20F, 0x210, 0x211, 0x212, 0x213,
0x214, 0x215, 0x216, 0x217, 0x218, 0x219, 0x21A, 0x21B,
0x21C, 0x21D, 0x21E, 0x21F, 0x220, 0x221, 0x222, 0x223,
0x224, 0x225, 0x226, 0x227, 0x228, 0x229, 0x22A, 0x22B,
0x22C, 0x22D, 0x22E, 0x22F, 0x230, 0x231, 0x232, 0x233,
0x234, 0x235, 0x236, 0x237, 0x238, 0x239, 0x23A, 0x23B,
0x23C, 0x23D, 0x23E, 0x23F, 0x240, 0x241, 0x242, 0x243,
0x244, 0x245, 0x246, 0x247, 0x248, 0x249, 0x24A, 0x24B,
0x24C, 0x24D, 0x24E, 0x24F, 0x250, 0x251, 0x252, 0x253,
0x254, 0x255, 0x256, 0x257, 0x258, 0x259, 0x25A, 0x25B,
0x25C, 0x25D, 0x25E, 0x25F, 0x260, 0x261, 0x262, 0x263,
0x264, 0x265, 0x266, 0x267, 0x268, 0x269, 0x26A, 0x20C,
0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C,
0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C,
0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C,
0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C, 0x20C,
0x20C, 0x26B, 0x26C, 0x26D, 0x26E, 0x26F, 0x270, 0x271,
0x272, 0x273, 0x274, 0x275, 0x276, 0x277, 0x278, 0x279,
0x27A, 0x27B, 0x27C, 0x27D, 0x27E, 0x27F, 0x280, 0x281,
0x282, 0x283, 0x284, 0x285, 0x286, 0x287, 0x288, 0x289,
0x28A, 0x28B, 0x28C, 0x28D, 0x28E, 0x28F, 0x290, 0x291,
0x292, 0x293, 0x294, 0x295, 0x296, 0x297, 0x298, 0x299,
0x29A, 0x29B, 0x29C, 0x29D, 0x29E, 0x29F, 0x2A0, 0x2A1,
0x2A2, 0x2A3, 0x2A4, 0x2A5, 0x2A6, 0x2A7, 0x2A8, 0x2A9,
}

◆ ParseString

ParseStringCallback ParseString
static

◆ Zenkaku2Code

u16 Zenkaku2Code[]
static