-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfonts.h
47 lines (37 loc) · 1.03 KB
/
fonts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef FONTS_H
#define FONTS_H
#define INCBIN_PREFIX
#include "incbin.h"
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <gsKit.h>
#include <dmaKit.h>
#include <gsToolkit.h>
#include "ui.h"
extern unsigned int FWFontWidth;
extern unsigned int FWFontHeight;
INCBIN_EXTERN(FWFont);
extern unsigned int HWFontWidth;
extern unsigned int HWFontHeight;
INCBIN_EXTERN(HWFont);
extern unsigned int FontCLUTWidth;
extern unsigned int FontCLUTHeight;
INCBIN_EXTERN(FontCLUT);
GSTEXTURE gsHWFont;
GSTEXTURE gsBlitFont;
u8 * BlitFontData;
void InitFonts();
void GetFontCharXYW(int id, int * x, int * y, int * w);
int GetFontCharWidth(int id);
/**
* @brief GetStringWidth
* @param text
* @return Draw width of string
* Ignores Newline, so width is based on entire string as one line.
*/
int GetStringWidth(unsigned char * text);
void DrawString(int x, int y, unsigned char * text);
void DrawStringCentered(int x, int y, unsigned char * text);
int DrawCharacterWithBG(int x, int y, unsigned char id, u64 BGColor);
#endif // FONTS_H