Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J2DPrint.h
Go to the documentation of this file.
1#ifndef J2DPRINT_H
2#define J2DPRINT_H
3
5#include <cstdarg>
6
7class JUTFont;
8class J2DPrint;
9
10extern "C" f32 J2DPrint_print_alpha_va(J2DPrint*, u8, const char*, va_list);
11
16class J2DPrint {
17public:
18 struct TSize {
19 /* 0x0 */ f32 field_0x0;
20 /* 0x4 */ f32 field_0x4;
21 };
22
24
25 void initiate();
26
28 static u8* setBuffer(size_t);
29 void setFontSize();
30 void locate(f32, f32);
31 f32 print(f32, f32, u8, char const*, ...);
33 f32, f32, u8);
34 f32 parse(u8 const*, int, int, u16*, J2DPrint::TSize&, u8, bool);
35 void doCtrlCode(int);
36 u16 doEscapeCode(u8 const**, u8);
37 void initchar();
38 s32 getNumberS32(u8 const**, s32, s32, int);
39 f32 getNumberF32(u8 const**, f32, f32, int);
40
41 virtual ~J2DPrint();
42
43 JUTFont* getFont() const { return mFont; }
44 f32 getCursorV() const { return mCursorV; }
45 void setCharColor(JUtility::TColor color) { mCharColor = color; }
46 void setGradColor(JUtility::TColor color) { mGradColor = color; }
47
48 f32 print_va(u8 alpha, const char* fmt, va_list args) {
49 return J2DPrint_print_alpha_va(this, alpha, fmt, args);
50 }
51
52 void setFontSize(f32 sizeX, f32 sizeY) {
53 f32 x;
54 if (sizeX > 0.0f) {
55 x = sizeX;
56 } else {
57 x = 0.0f;
58 }
59 mFontSizeX = x;
60
61 f32 y;
62 if (sizeY > 0.0f) {
63 y = sizeY;
64 } else {
65 y = 0.0f;
66 }
67 mFontSizeY = y;
68 }
69
70 static char* mStrBuff;
71 static size_t mStrBuffSize;
72
73private:
76
77 /* 0x04 */ JUTFont* mFont;
80 /* 0x10 */ f32 field_0x10;
81 /* 0x14 */ f32 field_0x14;
82 /* 0x18 */ f32 mScaleX;
83 /* 0x1C */ f32 mScaleY;
84 /* 0x20 */ s16 field_0x20;
85 /* 0x22 */ bool field_0x22;
86 /* 0x24 */ f32 field_0x24;
87 /* 0x28 */ f32 field_0x28;
88 /* 0x2C */ f32 mCursorH;
89 /* 0x30 */ f32 mCursorV;
90 /* 0x34 */ f32 field_0x34;
95 /* 0x48 */ f32 mCharSpacing;
96 /* 0x4C */ f32 mLineSpacing;
97 /* 0x50 */ f32 mFontSizeX;
98 /* 0x54 */ f32 mFontSizeY;
99 /* 0x58 */ s16 field_0x58;
100 /* 0x5A */ bool field_0x5a;
101}; // Size: 0x5C
102
103#endif /* J2DPRINT_H */
f32 J2DPrint_print_alpha_va(J2DPrint *, u8, const char *, va_list)
Definition J2DPrint.cpp:17
J2DTextBoxVBinding
Definition J2DTextBox.h:10
J2DTextBoxHBinding
Definition J2DTextBox.h:16
Definition J2DPrint.h:16
u16 doEscapeCode(u8 const **, u8)
Definition J2DPrint.cpp:406
f32 getCursorV() const
Definition J2DPrint.h:44
f32 field_0x10
Definition J2DPrint.h:80
JUtility::TColor mCharColor
Definition J2DPrint.h:93
static u8 * setBuffer(size_t)
Definition J2DPrint.cpp:87
void initiate()
Definition J2DPrint.cpp:44
f32 mFontSizeX
Definition J2DPrint.h:97
f32 parse(u8 const *, int, int, u16 *, J2DPrint::TSize &, u8, bool)
Definition J2DPrint.cpp:185
void doCtrlCode(int)
Definition J2DPrint.cpp:370
JUtility::TColor field_0xc
Definition J2DPrint.h:79
JUTFont * getFont() const
Definition J2DPrint.h:43
bool field_0x5a
Definition J2DPrint.h:100
f32 mFontSizeY
Definition J2DPrint.h:98
void initchar()
Definition J2DPrint.cpp:515
f32 field_0x28
Definition J2DPrint.h:87
void setGradColor(JUtility::TColor color)
Definition J2DPrint.h:46
f32 mScaleY
Definition J2DPrint.h:83
bool field_0x22
Definition J2DPrint.h:85
JUtility::TColor mGradColor
Definition J2DPrint.h:94
f32 print_va(u8 alpha, const char *fmt, va_list args)
Definition J2DPrint.h:48
JUTFont * mFont
Definition J2DPrint.h:77
f32 mLineSpacing
Definition J2DPrint.h:96
static char * mStrBuff
Definition J2DPrint.h:70
void setFontSize(f32 sizeX, f32 sizeY)
Definition J2DPrint.h:52
f32 field_0x24
Definition J2DPrint.h:86
s32 getNumberS32(u8 const **, s32, s32, int)
Definition J2DPrint.cpp:526
f32 field_0x14
Definition J2DPrint.h:81
f32 print(f32, f32, u8, char const *,...)
Definition J2DPrint.cpp:116
J2DPrint(JUTFont *, JUtility::TColor, JUtility::TColor)
Definition J2DPrint.cpp:33
void printReturn(char const *, f32, f32, J2DTextBoxHBinding, J2DTextBoxVBinding, f32, f32, u8)
Definition J2DPrint.cpp:127
JUtility::TColor mWhiteColor
Definition J2DPrint.h:92
s16 field_0x58
Definition J2DPrint.h:99
f32 mCursorV
Definition J2DPrint.h:89
f32 mScaleX
Definition J2DPrint.h:82
void setCharColor(JUtility::TColor color)
Definition J2DPrint.h:45
s16 field_0x20
Definition J2DPrint.h:84
void private_initiate(JUTFont *, f32, f32, JUtility::TColor, JUtility::TColor, JUtility::TColor, JUtility::TColor, bool)
Definition J2DPrint.cpp:50
void setFontSize()
Definition J2DPrint.cpp:101
f32 mCharSpacing
Definition J2DPrint.h:95
f32 getNumberF32(u8 const **, f32, f32, int)
Definition J2DPrint.cpp:565
virtual ~J2DPrint()
Definition J2DPrint.cpp:42
f32 mCursorH
Definition J2DPrint.h:88
JUtility::TColor mBlackColor
Definition J2DPrint.h:91
JUtility::TColor field_0x8
Definition J2DPrint.h:78
void locate(f32, f32)
Definition J2DPrint.cpp:108
f32 field_0x34
Definition J2DPrint.h:90
static size_t mStrBuffSize
Definition J2DPrint.h:71
Definition JUTFont.h:69
double x double x
Definition e_atan2.c:58
double x double y
Definition e_atan2.c:58
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
unsigned short int u16
Definition types.h:10
signed long s32
Definition types.h:11
unsigned char u8
Definition types.h:8
Definition J2DPrint.h:18
f32 field_0x0
Definition J2DPrint.h:19
f32 field_0x4
Definition J2DPrint.h:20
Definition TColor.h:12