SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
OSFont.h
Go to the documentation of this file.
1
#ifndef _DOLPHIN_OSFONT_H_
2
#define _DOLPHIN_OSFONT_H_
3
4
#include <
dolphin/types.h
>
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
#define OS_FONT_ENCODE_ANSI 0u
11
#define OS_FONT_ENCODE_SJIS 1u
12
#define OS_FONT_SIZE_ANSI (288 + 131072)
// 9 sheets
13
#define OS_FONT_SIZE_SJIS (3840 + 1179648)
// 1 sheet
14
#define OS_FONT_ROM_SIZE_ANSI 0x03000
15
#define OS_FONT_ROM_SIZE_SJIS 0x4D000
16
17
typedef
struct
OSFontHeader
18
{
19
/*0x00*/
u16
fontType
;
20
u16
firstChar
;
21
u16
lastChar
;
22
u16
invalChar
;
23
/*0x08*/
u16
ascent
;
24
u16
descent
;
25
u16
width
;
26
u16
leading
;
27
/*0x10*/
u16
cellWidth
;
28
u16
cellHeight
;
29
/*0x14*/
u32
sheetSize
;
30
/*0x18*/
u16
sheetFormat
;
31
u16
sheetColumn
;
32
u16
sheetRow
;
33
u16
sheetWidth
;
34
/*0x20*/
u16
sheetHeight
;
35
u16
widthTable
;
36
u32
sheetImage
;
37
u32
sheetFullSize
;
38
u8
c0
;
39
u8
c1
;
40
u8
c2
;
41
u8
c3
;
42
}
OSFontHeader
;
43
44
u16
OSGetFontEncode
(
void
);
45
BOOL
OSInitFont
(
OSFontHeader
*fontData);
46
u32
OSLoadFont
(
OSFontHeader
*fontData,
void
*temp);
47
char
*
OSGetFontTexture
(
char
*
string
,
void
**image,
s32
*x,
s32
*y,
s32
*width);
48
char
*
OSGetFontWidth
(
char
*
string
,
s32
*width);
49
char
*
OSGetFontTexel
(
char
*
string
,
void
*image,
s32
pos,
s32
stride,
s32
*width);
50
51
#ifdef __cplusplus
52
}
53
#endif
54
55
#endif
OSGetFontTexel
char * OSGetFontTexel(char *string, void *image, s32 pos, s32 stride, s32 *width)
OSLoadFont
u32 OSLoadFont(OSFontHeader *fontData, void *temp)
OSGetFontTexture
char * OSGetFontTexture(char *string, void **image, s32 *x, s32 *y, s32 *width)
OSGetFontWidth
char * OSGetFontWidth(char *string, s32 *width)
OSGetFontEncode
u16 OSGetFontEncode(void)
OSInitFont
BOOL OSInitFont(OSFontHeader *fontData)
types.h
BOOL
int BOOL
Definition
types.h:20
u32
unsigned long u32
Definition
types.h:9
u16
unsigned short int u16
Definition
types.h:7
s32
signed long s32
Definition
types.h:8
u8
unsigned char u8
Definition
types.h:5
OSFontHeader
Definition
OSFont.h:18
OSFontHeader::leading
u16 leading
Definition
OSFont.h:26
OSFontHeader::c1
u8 c1
Definition
OSFont.h:39
OSFontHeader::sheetFormat
u16 sheetFormat
Definition
OSFont.h:30
OSFontHeader::sheetSize
u32 sheetSize
Definition
OSFont.h:29
OSFontHeader::fontType
u16 fontType
Definition
OSFont.h:19
OSFontHeader::c2
u8 c2
Definition
OSFont.h:40
OSFontHeader::sheetFullSize
u32 sheetFullSize
Definition
OSFont.h:37
OSFontHeader::firstChar
u16 firstChar
Definition
OSFont.h:20
OSFontHeader::sheetImage
u32 sheetImage
Definition
OSFont.h:36
OSFontHeader::sheetRow
u16 sheetRow
Definition
OSFont.h:32
OSFontHeader::sheetHeight
u16 sheetHeight
Definition
OSFont.h:34
OSFontHeader::width
u16 width
Definition
OSFont.h:25
OSFontHeader::lastChar
u16 lastChar
Definition
OSFont.h:21
OSFontHeader::invalChar
u16 invalChar
Definition
OSFont.h:22
OSFontHeader::cellHeight
u16 cellHeight
Definition
OSFont.h:28
OSFontHeader::c3
u8 c3
Definition
OSFont.h:41
OSFontHeader::sheetColumn
u16 sheetColumn
Definition
OSFont.h:31
OSFontHeader::ascent
u16 ascent
Definition
OSFont.h:23
OSFontHeader::descent
u16 descent
Definition
OSFont.h:24
OSFontHeader::sheetWidth
u16 sheetWidth
Definition
OSFont.h:33
OSFontHeader::cellWidth
u16 cellWidth
Definition
OSFont.h:27
OSFontHeader::widthTable
u16 widthTable
Definition
OSFont.h:35
OSFontHeader::c0
u8 c0
Definition
OSFont.h:38
extern
dolphin
include
dolphin
os
OSFont.h
Generated by
1.17.0