Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J2DTextBox.h
Go to the documentation of this file.
1#ifndef J2DTEXTBOX_H
2#define J2DTEXTBOX_H
3
6
7class J2DMaterial;
8class JUTFont;
9
11 /* 0x0 */ VBIND_CENTER,
12 /* 0x1 */ VBIND_BOTTOM,
13 /* 0x2 */ VBIND_TOP
14};
15
17 /* 0x0 */ HBIND_CENTER,
18 /* 0x1 */ HBIND_RIGHT,
19 /* 0x2 */ HBIND_LEFT
20};
21
27 /* 0x00 */ u32 mTag;
28 /* 0x04 */ s32 mSize;
29};
30
36 /* 0x00 */ u16 field_0x0;
37 /* 0x02 */ u16 field_0x2;
38 /* 0x04 */ u16 mMaterialNum;
39 /* 0x06 */ s16 mCharSpace;
40 /* 0x08 */ s16 mLineSpace;
41 /* 0x0A */ u16 mFontSizeX;
42 /* 0x0C */ u16 mFontSizeY;
43 /* 0x0E */ u8 mHBind;
44 /* 0x0F */ u8 mVBind;
45 /* 0x10 */ u32 mCharColor;
46 /* 0x14 */ u32 mGradColor;
47 /* 0x18 */ u8 mConnected;
48 /* 0x19 */ char field_0x19[3];
49 /* 0x1C */ u16 field_0x1c;
50 /* 0x1E */ u16 field_0x1e;
51}; // Size: 0x20
52
57class J2DTextBox : public J2DPane {
58public:
59 struct TFontSize {
60 /* 0x0 */ f32 mSizeX;
61 /* 0x4 */ f32 mSizeY;
62 };
63
64 /* 803001E0 */ virtual ~J2DTextBox();
65 /* 80300C68 */ virtual u16 getTypeID() const;
66 /* 80300AF8 */ virtual void resize(f32, f32);
67 /* 80300870 */ virtual bool setConnectParent(bool);
68 /* 80300950 */ virtual void drawSelf(f32, f32, Mtx*);
69 /* 803008E8 */ virtual void drawSelf(f32, f32);
70 /* 80300C70 */ virtual bool isUsed(ResTIMG const*);
71 /* 80300BFC */ virtual bool isUsed(ResFONT const*);
72 /* 80300C90 */ virtual void rewriteAlpha();
73 /* 803002E8 */ virtual void draw(f32, f32);
74 /* 80300490 */ virtual void draw(f32, f32, f32, J2DTextBoxHBinding);
75 /* 80300278 */ virtual void setFont(JUTFont*);
76 /* 8021C7F4 */ virtual JUTFont* getFont() const { return mFont; }
77 /* 80254408 */ virtual bool setBlack(JUtility::TColor);
78 /* 80186C84 */ virtual bool setWhite(JUtility::TColor white) { mWhiteColor = white; return true; }
82 return true;
83 }
84 /* 801DFA34 */ virtual JUtility::TColor getBlack() const {
85 return mBlackColor;
86 }
87 /* 801DFA28 */ virtual JUtility::TColor getWhite() const {
88 return mWhiteColor;
89 }
90 /* 8025602C */ virtual J2DMaterial* getMaterial() const { return NULL; }
91
92 /* 802FFBC4 */ J2DTextBox(u64, JGeometry::TBox2<f32> const&, ResFONT const*, char const*, s16,
96 /* 802FF660 */ J2DTextBox();
97 /* 802FFC58 */ void initiate(ResFONT const*, char const*, s16, J2DTextBoxHBinding,
100 /* 80300658 */ char* getStringPtr() const;
101 /* 8030074C */ s32 setString(s16, char const*, ...);
102 /* 80300660 */ s32 setString(char const*, ...);
103
105 f32 x;
106 if (sizeX > 0.0f) {
107 x = sizeX;
108 } else {
109 x = 0.0f;
110 }
111 mFontSizeX = x;
112
113 f32 y;
114 if (sizeY > 0.0f) {
115 y = sizeY;
116 } else {
117 y = 0.0f;
118 }
119 mFontSizeY = y;
120 }
121
122 void setFontSize(TFontSize size) { setFontSize(size.mSizeX, size.mSizeY); }
123 void getFontSize(TFontSize& size) const {
124 size.mSizeX = mFontSizeX;
125 size.mSizeY = mFontSizeY;
126 }
127
132
136
140
142 f32 getCharSpace() const { return mCharSpacing; }
144 f32 getLineSpace() const { return mLineSpacing; }
145
147 return (J2DTextBoxVBinding)(mFlags & 3);
148 }
149
151 return (J2DTextBoxHBinding)((mFlags >> 2) & 3);
152 }
153
157
158// private:
159 /* 0x0100 */ JUTFont* mFont;
162 /* 0x010C */ f32 field_0x10c;
163 /* 0x0110 */ f32 field_0x110;
164 /* 0x0114 */ f32 mCharSpacing;
165 /* 0x0118 */ f32 mLineSpacing;
166 /* 0x011C */ f32 mFontSizeX;
167 /* 0x0120 */ f32 mFontSizeY;
168 /* 0x0124 */ char* mStringPtr;
171 /* 0x0130 */ u8 mFlags;
172 /* 0x0131 */ bool mTextFontOwned;
173 /* 0x0132 */ u16 mStringLength;
174 /* 0x0134 */ u8 field_0x134[4];
175}; // Size: 0x138
176
177#endif /* J2DTEXTBOX_H */
J2DTextBoxVBinding
Definition J2DTextBox.h:10
@ VBIND_CENTER
Definition J2DTextBox.h:11
@ VBIND_BOTTOM
Definition J2DTextBox.h:12
@ VBIND_TOP
Definition J2DTextBox.h:13
J2DTextBoxHBinding
Definition J2DTextBox.h:16
@ HBIND_CENTER
Definition J2DTextBox.h:17
@ HBIND_RIGHT
Definition J2DTextBox.h:18
@ HBIND_LEFT
Definition J2DTextBox.h:19
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J2DMaterial.h:11
Definition J2DPane.h:51
void initiate()
Definition J2DPane.cpp:22
Definition J2DTextBox.h:57
char * getStringPtr() const
Definition J2DTextBox.cpp:342
void setGradColor(JUtility::TColor i_GradientColor)
Definition J2DTextBox.h:137
JUtility::TColor mGradientColor
Definition J2DTextBox.h:161
void setFontSize(f32 sizeX, f32 sizeY)
Definition J2DTextBox.h:104
void getFontSize(TFontSize &size) const
Definition J2DTextBox.h:123
u16 getStringAllocByte() const
Definition J2DTextBox.h:156
virtual void setFont(JUTFont *)
Definition J2DTextBox.cpp:275
virtual u16 getTypeID() const
Definition J2DTextBox.cpp:479
virtual bool isUsed(ResTIMG const *)
Definition J2DTextBox.cpp:484
virtual void rewriteAlpha()
Definition J2DTextBox.cpp:489
J2DTextBox()
Definition J2DTextBox.cpp:13
JUtility::TColor mWhiteColor
Definition J2DTextBox.h:169
virtual JUtility::TColor getBlack() const
Definition J2DTextBox.h:84
char * mStringPtr
Definition J2DTextBox.h:168
virtual ~J2DTextBox()
Definition J2DTextBox.cpp:266
f32 mFontSizeY
Definition J2DTextBox.h:167
f32 getLineSpace() const
Definition J2DTextBox.h:144
u8 field_0x134[4]
Definition J2DTextBox.h:174
JUtility::TColor mCharColor
Definition J2DTextBox.h:160
void setCharColor(JUtility::TColor i_charColor)
Definition J2DTextBox.h:133
virtual bool setBlackWhite(JUtility::TColor black, JUtility::TColor white)
Definition J2DTextBox.h:79
virtual void drawSelf(f32, f32, Mtx *)
Definition J2DTextBox.cpp:430
J2DTextBoxHBinding getHBinding() const
Definition J2DTextBox.h:150
void setFontSize(TFontSize size)
Definition J2DTextBox.h:122
virtual void draw(f32, f32)
Definition J2DTextBox.cpp:286
virtual JUTFont * getFont() const
Definition J2DTextBox.h:76
JUtility::TColor getGradColor()
Definition J2DTextBox.h:155
f32 mFontSizeX
Definition J2DTextBox.h:166
void private_readStream(J2DPane *, JSURandomInputStream *, JKRArchive *)
Definition J2DTextBox.cpp:201
void setLineSpace(f32 space)
Definition J2DTextBox.h:143
void setFontColor(JUtility::TColor i_charColor, JUtility::TColor i_GradientColor)
Definition J2DTextBox.h:128
JUtility::TColor mBlackColor
Definition J2DTextBox.h:170
f32 mLineSpacing
Definition J2DTextBox.h:165
s32 setString(s16, char const *,...)
Definition J2DTextBox.cpp:373
u16 mStringLength
Definition J2DTextBox.h:173
virtual bool setBlack(JUtility::TColor)
Definition d_pane_class.cpp:232
virtual bool setWhite(JUtility::TColor white)
Definition J2DTextBox.h:78
virtual void resize(f32, f32)
Definition J2DTextBox.cpp:454
f32 field_0x10c
Definition J2DTextBox.h:162
bool mTextFontOwned
Definition J2DTextBox.h:172
f32 field_0x110
Definition J2DTextBox.h:163
f32 getCharSpace() const
Definition J2DTextBox.h:142
virtual JUtility::TColor getWhite() const
Definition J2DTextBox.h:87
JUtility::TColor getCharColor()
Definition J2DTextBox.h:154
void setCharSpace(f32 space)
Definition J2DTextBox.h:141
J2DTextBoxVBinding getVBinding() const
Definition J2DTextBox.h:146
u8 mFlags
Definition J2DTextBox.h:171
virtual J2DMaterial * getMaterial() const
Definition J2DTextBox.h:90
virtual bool setConnectParent(bool)
Definition J2DTextBox.cpp:407
JUTFont * mFont
Definition J2DTextBox.h:159
f32 mCharSpacing
Definition J2DTextBox.h:164
Definition JKRArchive.h:57
Definition JSURandomInputStream.h:10
Definition JUTFont.h:69
double x double x
Definition e_atan2.c:58
double x double y
Definition e_atan2.c:58
f32 Mtx[3][4]
Definition mtx.h:15
Definition J2DTextBox.h:26
u32 mTag
Definition J2DTextBox.h:27
s32 mSize
Definition J2DTextBox.h:28
Definition J2DTextBox.h:35
u16 field_0x1c
Definition J2DTextBox.h:49
u16 mMaterialNum
Definition J2DTextBox.h:38
u16 mFontSizeY
Definition J2DTextBox.h:42
u32 mGradColor
Definition J2DTextBox.h:46
u32 mCharColor
Definition J2DTextBox.h:45
u16 mFontSizeX
Definition J2DTextBox.h:41
s16 mLineSpace
Definition J2DTextBox.h:40
u16 field_0x0
Definition J2DTextBox.h:36
s16 mCharSpace
Definition J2DTextBox.h:39
u16 field_0x1e
Definition J2DTextBox.h:50
u8 mVBind
Definition J2DTextBox.h:44
u16 field_0x2
Definition J2DTextBox.h:37
u8 mHBind
Definition J2DTextBox.h:43
u8 mConnected
Definition J2DTextBox.h:47
char field_0x19[3]
Definition J2DTextBox.h:48
Definition J2DTextBox.h:59
f32 mSizeY
Definition J2DTextBox.h:61
f32 mSizeX
Definition J2DTextBox.h:60
Definition JGeometry.h:496
Definition TColor.h:12
void set(u8 cR, u8 cG, u8 cB, u8 cA)
Definition TColor.h:23
Definition JUTFont.h:11
Image data header.
Definition d_menu_dmap_map.cpp:109
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
unsigned long long u64
Definition types.h:11
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8