NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ut_RomFont.h
1#ifndef NW4R_UT_ROM_FONT_H
2#define NW4R_UT_ROM_FONT_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/ut/ut_Font.h>
6
7#include <revolution/OS.h>
8
9namespace nw4r {
10namespace ut {
11
12class RomFont : public Font {
13public:
14 RomFont();
15 virtual ~RomFont(); // at 0x8
16
17 virtual int GetWidth() const; // at 0xC
18 virtual int GetHeight() const; // at 0x10
19
20 virtual int GetAscent() const; // at 0x14
21 virtual int GetDescent() const; // at 0x18
22 virtual int GetBaselinePos() const; // at 0x1C
23
24 virtual int GetCellHeight() const; // at 0x20
25 virtual int GetCellWidth() const; // at 0x24
26 virtual int GetMaxCharWidth() const; // at 0x28
27
28 virtual Type GetType() const; // at 0x2C
29 virtual GXTexFmt GetTextureFormat() const; // at 0x30
30 virtual int GetLineFeed() const; // at 0x34
31
32 virtual CharWidths GetDefaultCharWidths() const; // at 0x38
33 virtual void SetDefaultCharWidths(const CharWidths& rWidths); // at 0x3C
34
35 virtual bool SetAlternateChar(u16 ch); // at 0x40
36 virtual void SetLineFeed(int lf); // at 0x44
37
38 virtual int GetCharWidth(u16 ch) const; // at 0x48
39 virtual CharWidths GetCharWidths(u16 ch) const; // at 0x4C
40 virtual void GetGlyph(Glyph* pGlyph, u16 ch) const; // at 0x50
41 virtual FontEncoding GetEncoding() const; // at 0x54
42
43 ulong GetRequireBufferSize();
44 bool Load(void* pBuffer);
45
46private:
47 static const int CHAR_PTR_BUFFER_SIZE = 4;
48
49private:
50 void MakeCharPtr(char* pBuffer, u16 ch) const;
51 u16 HandleUndefinedChar(u16 ch) const;
52
53private:
54 OSFontHeader* mFontHeader; // at 0x10
55 CharWidths mDefaultWidths; // at 0x14
56 u16 mAlternateChar; // at 0x18
57
58 static u16 mFontEncode;
59};
60
61} // namespace ut
62} // namespace nw4r
63
64#endif
Debugging library which includes various utilities used by the rest of nw4r.
Definition ut_list.cpp:4