summaryrefslogtreecommitdiff
path: root/include/JSystem/J2DGraph/J2DPrint.h
blob: 144a21117d67b126d511c565da051626096ff660 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef J2DPRINT_H
#define J2DPRINT_H

#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/JUtility/TColor.h"

class JUTFont;

class J2DPrint {
public:
    struct TSize {
        /* 0x0 */ f32 field_0x0;
        /* 0x4 */ f32 field_0x4;
    };

    J2DPrint(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor, JUtility::TColor, JUtility::TColor);
    virtual ~J2DPrint() {};
    void private_initiate(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor, JUtility::TColor, JUtility::TColor, bool);
    static char* setBuffer(u32);
    void setFontSize();
    void locate(f32, f32);
    void printReturn(const char*, f32, f32, J2DTextBoxHBinding, J2DTextBoxVBinding, f32, f32, u8);
    f32 parse(const u8*, int, int, u16*, J2DPrint::TSize&, u8, bool);
    void doCtrlCode(int);
    u16 doEscapeCode(const u8**, u8);
    void initchar();
    s32 getNumberS32(const u8**, s32, s32, int);
    f32 getNumberF32(const u8**, f32, f32, int);

    void setFontSize(f32 sizeX, f32 sizeY) {
        mFontSizeX = sizeX > 0.0f ? sizeX : 0.0f;
        mFontSizeY = sizeY > 0.0f ? sizeY : 0.0f;
    }

    static char* mStrBuff;
    static bool mHeapFlag;
    static u32 mStrBuffSize;
    static u8 mBufferNotEnough;

    /* 0x04 */ JUTFont* mFont;
    /* 0x08 */ JUtility::TColor field_0x8;
    /* 0x0C */ JUtility::TColor field_0xc;
    /* 0x10 */ f32 field_0x10;
    /* 0x14 */ f32 field_0x14;
    /* 0x18 */ f32 field_0x18;
    /* 0x1C */ f32 field_0x1c;
    /* 0x20 */ s16 field_0x20;
    /* 0x22 */ bool field_0x22;
    /* 0x24 */ f32 field_0x24;
    /* 0x28 */ f32 field_0x28;
    /* 0x2C */ f32 field_0x2c;
    /* 0x30 */ f32 mCursorV;
    /* 0x34 */ f32 field_0x34;
    /* 0x38 */ JUtility::TColor field_0x38;
    /* 0x3C */ JUtility::TColor field_0x3c;
    /* 0x40 */ JUtility::TColor mCharColor;
    /* 0x44 */ JUtility::TColor mGradColor;
    /* 0x48 */ f32 field_0x48;
    /* 0x4C */ f32 field_0x4c;
    /* 0x50 */ f32 mFontSizeX;
    /* 0x54 */ f32 mFontSizeY;
    /* 0x58 */ s16 field_0x58;
    /* 0x5A */ bool field_0x5a;
};

#endif /* J2DPRINT_H */