SSBM Decomp
Loading...
Searching...
No Matches
OSFont.c File Reference
#include <dolphin.h>
#include "__os.h"
#include <dolphin/os.h>

Functions

static int GetFontCode (unsigned short code)
static void Decode (unsigned char *s, unsigned char *d)
static u32 GetFontSize (u8 *buf)
unsigned short OSGetFontEncode (void)
static void ReadROM (void *buf, int length, int offset)
static u32 ReadFont (void *img)
u32 OSLoadFont (OSFontHeader *fontData, void *temp)
char * OSGetFontTexel (char *string, void *image, long pos, long stride, long *width)
static void ExpandFontSheet (u8 *src, u8 *dst)
int OSInitFont (OSFontHeader *fontData)
char * OSGetFontTexture (char *string, void **image, long *x, long *y, long *width)
char * OSGetFontWidth (char *string, long *width)

Variables

static OSFontHeaderFontData
static u8SheetImage
static u8WidthTable
static int CharsInSheet
static u16 HankakuToCode []
static u16 Zenkaku2Code []

Function Documentation

◆ GetFontCode()

int GetFontCode ( unsigned short code)
static

◆ Decode()

void Decode ( unsigned char * s,
unsigned char * d )
static

◆ GetFontSize()

u32 GetFontSize ( u8 * buf)
static

◆ OSGetFontEncode()

unsigned short OSGetFontEncode ( void )

◆ ReadROM()

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

◆ ReadFont()

u32 ReadFont ( void * img)
static

◆ OSLoadFont()

u32 OSLoadFont ( OSFontHeader * fontData,
void * temp )

◆ OSGetFontTexel()

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

◆ ExpandFontSheet()

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

◆ OSInitFont()

int OSInitFont ( OSFontHeader * fontData)

◆ OSGetFontTexture()

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

◆ OSGetFontWidth()

char * OSGetFontWidth ( char * string,
long * width )

Variable Documentation

◆ FontData

OSFontHeader* FontData
static

◆ SheetImage

u8* SheetImage
static

◆ WidthTable

u8* WidthTable
static

◆ CharsInSheet

int CharsInSheet
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,
}

◆ Zenkaku2Code

u16 Zenkaku2Code[]
static