1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-06-07 09:01:49 +00:00
oot/include/font.h
fig02 28cc9d68cf
Remove "z64" prefix from all headers (#2518)
* z64 - a

* z64 - b

* z64 - c

* z64 - d

* z64 - e

* z64 - f

* z64 - g

* z64 - h

* z64 - i

* z64 - l

* z64 - m

* z64 - o

* z64 - p

* z64 - q

* z64 - r

* z64 - s

* z64 - t

* z64 - v

* restore file

* fix merge

* fix merge

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-06-04 14:38:33 -04:00

41 lines
1.2 KiB
C

#ifndef FONT_H
#define FONT_H
#include "ultra64.h"
// TODO get these properties from the textures themselves
#define FONT_CHAR_TEX_WIDTH 16
#define FONT_CHAR_TEX_HEIGHT 16
#define FONT_CHAR_TEX_SIZE ((FONT_CHAR_TEX_WIDTH * FONT_CHAR_TEX_HEIGHT) / 2) // 16x16 I4 texture
typedef struct Font {
/* 0x0000 */ u32 msgOffset;
/* 0x0004 */ u32 msgLength;
union {
/* 0x0008 */ u8 charTexBuf[FONT_CHAR_TEX_SIZE * 120];
/* 0x0008 */ u64 force_structure_alignment_charTex;
};
union {
/* 0x3C08 */ u8 iconBuf[FONT_CHAR_TEX_SIZE];
/* 0x3C08 */ u64 force_structure_alignment_icon;
};
union {
/* 0x3C88 */ u8 fontBuf[FONT_CHAR_TEX_SIZE * 320];
/* 0x3C88 */ u64 force_structure_alignment_font;
};
union {
/* 0xDC88 */ u8 msgBuf[1280];
/* 0xDC88 */ u16 msgBufWide[640];
/* 0xDC88 */ u64 force_structure_alignment_msg;
};
} Font; // size = 0xE188
#if PLATFORM_IQUE
void Font_LoadCharCHN(Font* font, u16 character, u16 codePointIndex);
#endif
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex);
void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
void Font_LoadMessageBoxIcon(Font* font, u16 icon);
void Font_LoadOrderedFont(Font* font);
#endif