summaryrefslogtreecommitdiff
path: root/include/d/d_font_manager.h
blob: a0e46b546673249d4f904f3b9d084386c00876a9 (plain)
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
#ifndef D_FONT_MANAGER_H
#define D_FONT_MANAGER_H

#include "d/d_dvd.h"
#include "nw4r/ut/ut_ResFont.h"

class dFontMng_c {
public:
    enum FontType_e {
        NORMAL_0,
        NORMAL_1,
        SPECIAL_0,
        SPECIAL_1,
        PICTURE,
    };

    dFontMng_c();
    ~dFontMng_c();

    static nw4r::ut::ResFont *getFont(u8 type);
    void setFontFile(int idx, void *fileData);
    static dFontMng_c *getFontManager(int idx);
    static u8 getFontMgrIdx(u8 type);
    static const char *getFontPath(u8 idx);
    static const char *getFontName(u8 type);

    static bool create();

private:
    static char special_01[];
    static char special_00[];
    static char normal_01[];
    static char normal_00[];

    nw4r::ut::ResFont mFont;
    dDvd::loader_c mLoader;
    // The purpose of these two is a bit unclear because they appear
    // to be set to the same thing?
    nw4r::ut::BinaryFileHeader *mpFontFile;
    void *mpFileData;
};

#endif