Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J2DPane.h
Go to the documentation of this file.
1#ifndef J2DPANE_H
2#define J2DPANE_H
3
4#include "JSystem/JGeometry.h"
6#include "dolphin/gx/GXEnum.h"
7#include "dolphin/mtx.h"
8
9class J2DAnmBase;
10class J2DAnmColor;
11class J2DAnmTransform;
12class J2DAnmTevRegKey;
15class J2DAnmVtxColor;
16class J2DGrafContext;
17class J2DScreen;
19class JKRArchive;
21struct ResFONT;
22struct ResTIMG;
23
25 /* 0x78 */ ROTATE_X = 'x',
26 /* 0x79 */ ROTATE_Y = 'y',
27 /* 0x7A */ ROTATE_Z = 'z'
28};
29
37
43 /* 0x0 */ u32 mKind;
44 /* 0x4 */ u32 mSize;
45};
46
51class J2DPane {
52public:
53 J2DPane();
57 void initiate();
58 void initialize(J2DPane*, bool, u64, const JGeometry::TBox2<f32>&);
59 void initialize(u64 tag, const JGeometry::TBox2<f32>& dim);
64 void draw(f32 a1, f32 a2, const J2DGrafContext* ctx, bool a4, bool a5);
65 void place(const JGeometry::TBox2<f32>& dim);
68 void rotate(f32 angle);
70 void setBasePosition(J2DBasePosition position);
71 void setInfluencedAlpha(bool arg1, bool arg2);
72 Vec getGlbVtx(u8 arg1) const;
77 void* getPointer(JSURandomInputStream* stream, u32 size, JKRArchive* archive);
78 void animationTransform();
80
81 virtual ~J2DPane();
82
83 /* vt 0x0C */ virtual u16 getTypeID() const { return 16; }
84 /* vt 0x10 */ virtual void move(f32 x, f32 y);
85 /* vt 0x14 */ virtual void add(f32 x, f32 y);
86 /* vt 0x18 */ virtual void resize(f32 x, f32 y);
87 /* vt 0x1C */ virtual void setCullBack(bool cull);
88 /* vt 0x20 */ virtual void setCullBack(_GXCullMode cmode);
89 /* vt 0x24 */ virtual void setAlpha(u8);
90 /* vt 0x28 */ virtual bool setConnectParent(bool connected);
91 /* vt 0x2C */ virtual void calcMtx() {
92 if (mPaneTree.getParent() != NULL) {
94 }
95 }
96 /* vt 0x30 */ virtual void update();
97 /* vt 0x34 */ virtual void drawSelf(f32 arg1, f32 arg2);
98 /* vt 0x38 */ virtual void drawSelf(f32 arg1, f32 arg2, Mtx* mtx);
99 /* vt 0x3C */ virtual J2DPane* search(u64 tag);
100 /* vt 0x40 */ virtual J2DPane* searchUserInfo(u64 tag);
101 /* vt 0x44 */ virtual void makeMatrix(f32 a, f32 b) {
102 makeMatrix(a, b, -mBounds.i.x, -mBounds.i.y);
103 }
104 /* vt 0x48 */ virtual void makeMatrix(f32 a, f32 b, f32 c, f32 d);
105 /* vt 0x4C */ virtual bool isUsed(const ResTIMG* timg);
106 /* vt 0x50 */ virtual bool isUsed(const ResFONT* font);
107 /* vt 0x54 */ virtual void clearAnmTransform();
108 /* vt 0x58 */ virtual void rewriteAlpha();
109 /* vt 0x5C */ virtual void setAnimation(J2DAnmBase* anm);
110 /* vt 0x60 */ virtual void setAnimation(J2DAnmTransform* anm);
111 /* vt 0x64 */ virtual void setAnimation(J2DAnmColor* anm) {}
112 /* vt 0x68 */ virtual void setAnimation(J2DAnmTexPattern* anm) {}
113 /* vt 0x6C */ virtual void setAnimation(J2DAnmTextureSRTKey* anm) {}
114 /* vt 0x70 */ virtual void setAnimation(J2DAnmTevRegKey* anm) {}
115 /* vt 0x74 */ virtual void setAnimation(J2DAnmVisibilityFull* anm) {}
116 /* vt 0x78 */ virtual void setAnimation(J2DAnmVtxColor* anm) {}
117 /* vt 0x7C */ virtual const J2DAnmTransform* animationTransform(const J2DAnmTransform* transform);
118 /* vt 0x80 */ virtual void setVisibileAnimation(J2DAnmVisibilityFull* visibility);
119 /* vt 0x84 */ virtual void setAnimationVF(J2DAnmVisibilityFull* visibility);
120 /* vt 0x88 */ virtual void setVtxColorAnimation(J2DAnmVtxColor* vtx_color);
121 /* vt 0x8C */ virtual void setAnimationVC(J2DAnmVtxColor* vtx_color);
122 /* vt 0x90 */ virtual const J2DAnmTransform* animationPane(const J2DAnmTransform* transform);
123
124 f32 getHeight() const { return mBounds.getHeight(); }
125 f32 getWidth() const { return mBounds.getWidth(); }
129 u8 getAlpha() const { return mAlpha; }
130
131 f32 getScaleX() const { return mScaleX; }
132
133 f32 getScaleY() const { return mScaleY; }
134
135 f32 getTranslateX() const { return mTranslateX; }
136
137 f32 getTranslateY() const { return mTranslateY; }
138
139 f32 getRotateZ() const { return mRotateZ; }
140
141 f32 getRotOffsetX() const { return mRotateOffsetX; }
142
143 f32 getRotOffsetY() const { return mRotateOffsetY; }
144
146
148
150
156
158 mScaleX = scaleH;
159 mScaleY = scaleV;
160 calcMtx();
161 }
162
163 int getKind() const { return mKind; }
164
165 bool isVisible() const { return mVisible; }
166
167 void show() { mVisible = true; }
168 void hide() { mVisible = false; }
169
170 bool isConnectParent() const { return mConnected; }
171
172 void setUserInfo(u64 info) { mUserInfoTag = info; }
173 const Mtx* getMtx() const { return &mPositionMtx; }
174
175 static s16 J2DCast_F32_to_S16(f32 value, u8 arg2);
176
178
179public:
180 /* 0x04 */ u16 field_0x4;
181 /* 0x08 */ int mKind;
182 /* 0x10 */ u64 mInfoTag;
183 /* 0x18 */ u64 mUserInfoTag;
187 /* 0x50 */ Mtx mPositionMtx;
188 /* 0x80 */ Mtx mGlobalMtx;
189 /* 0xB0 */ bool mVisible;
190 /* 0xB1 */ u8 mCullMode;
191 /* 0xB2 */ u8 mAlpha;
192 /* 0xB3 */ u8 mColorAlpha;
193 /* 0xB4 */ bool mIsInfluencedAlpha;
194 /* 0xB5 */ bool mConnected;
195 /* 0xB6 */ char mRotAxis;
196 /* 0xB7 */ u8 mBasePosition;
197 /* 0xB8 */ f32 mRotateX;
198 /* 0xBC */ f32 mRotateY;
199 /* 0xC0 */ f32 mRotateZ;
200 /* 0xC4 */ f32 mRotateOffsetX;
201 /* 0xC8 */ f32 mRotateOffsetY;
202 /* 0xCC */ f32 mScaleX;
203 /* 0xD0 */ f32 mScaleY;
204 /* 0xD4 */ f32 mTranslateX;
205 /* 0xD8 */ f32 mTranslateY;
207 /* 0xF8 */ const J2DAnmTransform* mTransform;
208 /* 0xFC */ u32 _fc;
209};
210
211#endif /* J2DPANE_H */
_GXCullMode
Definition GXEnum.h:16
J2DRotateAxis
Definition J2DPane.h:24
@ ROTATE_X
Definition J2DPane.h:25
@ ROTATE_Z
Definition J2DPane.h:27
@ ROTATE_Y
Definition J2DPane.h:26
J2DBasePosition
Definition J2DPane.h:30
@ J2DBasePosition_1
Definition J2DPane.h:32
@ J2DBasePosition_3
Definition J2DPane.h:34
@ J2DBasePosition_0
Definition J2DPane.h:31
@ J2DBasePosition_2
Definition J2DPane.h:33
@ J2DBasePosition_4
Definition J2DPane.h:35
static Mtx mtx[10]
Definition c_lib.cpp:347
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J2DAnimation.h:27
Definition J2DAnimation.h:381
Definition J2DAnimation.h:311
Definition J2DAnimation.h:269
Definition J2DAnimation.h:203
Definition J2DAnimation.h:146
Definition J2DAnimation.h:124
Definition J2DAnimation.h:53
Definition J2DGrafContext.h:12
Definition J2DPane.h:51
f32 getHeight() const
Definition J2DPane.h:124
int mKind
Definition J2DPane.h:181
f32 mRotateX
Definition J2DPane.h:197
const JSUTree< J2DPane > * getPaneTree()
Definition J2DPane.h:128
J2DPane * getFirstChildPane()
Definition J2DPane.cpp:642
u32 _fc
Definition J2DPane.h:208
virtual void setAnimationVC(J2DAnmVtxColor *vtx_color)
Definition J2DPane.cpp:941
virtual void setVisibileAnimation(J2DAnmVisibilityFull *visibility)
Definition J2DPane.cpp:870
void animationTransform()
Definition J2DPane.cpp:836
void setBasePosition(J2DBasePosition position)
Definition J2DPane.cpp:547
void setUserInfo(u64 info)
Definition J2DPane.h:172
JGeometry::TBox2< f32 > mBounds
Definition J2DPane.h:184
virtual void setAnimation(J2DAnmVisibilityFull *anm)
Definition J2DPane.h:115
void place(const JGeometry::TBox2< f32 > &dim)
Definition J2DPane.cpp:331
void * getPointer(JSURandomInputStream *stream, u32 size, JKRArchive *archive)
Definition J2DPane.cpp:766
JGeometry::TBox2< f32 > & getBounds()
Definition J2DPane.cpp:421
u8 mCullMode
Definition J2DPane.h:190
Vec getGlbVtx(u8 arg1) const
Definition J2DPane.cpp:613
J2DPane()
Definition J2DPane.cpp:9
JGeometry::TBox2< f32 > & getGlbBounds()
Definition J2DPane.h:147
f32 getRotateZ() const
Definition J2DPane.h:139
virtual void setCullBack(bool cull)
Definition J2DPane.cpp:946
f32 mRotateZ
Definition J2DPane.h:199
bool insertChild(J2DPane *before, J2DPane *child)
Definition J2DPane.cpp:241
void changeUseTrans(J2DPane *other)
Definition J2DPane.cpp:171
virtual void setAlpha(u8)
Definition f_op_msg_mng.cpp:264
void draw(f32 a1, f32 a2, const J2DGrafContext *ctx, bool a4, bool a5)
Definition J2DPane.cpp:259
static s16 J2DCast_F32_to_S16(f32 value, u8 arg2)
Definition J2DPane.cpp:740
int getKind() const
Definition J2DPane.h:163
f32 getRotOffsetX() const
Definition J2DPane.h:141
bool isVisible() const
Definition J2DPane.h:165
u8 mColorAlpha
Definition J2DPane.h:192
f32 mRotateOffsetY
Definition J2DPane.h:201
bool mIsInfluencedAlpha
Definition J2DPane.h:193
JSUTree< J2DPane > * getFirstChild()
Definition J2DPane.h:126
f32 mScaleY
Definition J2DPane.h:203
virtual u16 getTypeID() const
Definition J2DPane.h:83
bool mVisible
Definition J2DPane.h:189
virtual void calcMtx()
Definition J2DPane.h:91
virtual const J2DAnmTransform * animationPane(const J2DAnmTransform *transform)
Definition J2DPane.cpp:892
u8 mBasePosition
Definition J2DPane.h:196
virtual void setAnimation(J2DAnmTevRegKey *anm)
Definition J2DPane.h:114
virtual void makeMatrix(f32 a, f32 b)
Definition J2DPane.h:101
JSUTree< J2DPane > * getEndChild()
Definition J2DPane.h:127
virtual void add(f32 x, f32 y)
Definition J2DPane.cpp:389
f32 getWidth() const
Definition J2DPane.h:125
f32 getScaleX() const
Definition J2DPane.h:131
J2DPane * getNextChildPane()
Definition J2DPane.cpp:650
virtual void drawSelf(f32 arg1, f32 arg2)
Definition J2DPane.cpp:969
char mRotAxis
Definition J2DPane.h:195
f32 mTranslateY
Definition J2DPane.h:205
virtual void resize(f32 x, f32 y)
Definition J2DPane.cpp:396
J2DPane * getParentPane()
Definition J2DPane.cpp:658
void initialize(J2DPane *, bool, u64, const JGeometry::TBox2< f32 > &)
Definition J2DPane.cpp:47
virtual J2DPane * searchUserInfo(u64 tag)
Definition J2DPane.cpp:484
virtual J2DPane * search(u64 tag)
Definition J2DPane.cpp:469
f32 mTranslateX
Definition J2DPane.h:204
void makePaneStream(J2DPane *other, JSURandomInputStream *stream)
Definition J2DPane.cpp:110
virtual void setAnimation(J2DAnmBase *anm)
Definition J2DPane.cpp:800
virtual bool isUsed(const ResTIMG *timg)
Definition J2DPane.cpp:499
virtual void setAnimation(J2DAnmTextureSRTKey *anm)
Definition J2DPane.h:113
MtxP getGlbMtx()
Definition J2DPane.h:145
bool isConnectParent() const
Definition J2DPane.h:170
f32 getTranslateY() const
Definition J2DPane.h:137
virtual void setAnimationVF(J2DAnmVisibilityFull *visibility)
Definition J2DPane.cpp:935
f32 mRotateY
Definition J2DPane.h:198
const J2DAnmTransform * mTransform
Definition J2DPane.h:207
void makePaneExStream(J2DPane *other, JSURandomInputStream *stream)
Definition J2DPane.cpp:688
JSUTree< J2DPane > mPaneTree
Definition J2DPane.h:206
virtual void setCullBack(_GXCullMode cmode)
u64 mInfoTag
Definition J2DPane.h:182
void scale(f32 scaleH, f32 scaleV)
Definition J2DPane.h:157
virtual void setAnimation(J2DAnmVtxColor *anm)
Definition J2DPane.h:116
virtual void clearAnmTransform()
Definition J2DPane.cpp:842
virtual void move(f32 x, f32 y)
Definition J2DPane.cpp:382
virtual void setAnimation(J2DAnmColor *anm)
Definition J2DPane.h:111
void setMtx(Mtx m)
Definition J2DPane.h:149
void translate(f32 transX, f32 transY)
Definition J2DPane.h:151
f32 getRotOffsetY() const
Definition J2DPane.h:143
f32 getTranslateX() const
Definition J2DPane.h:135
void hide()
Definition J2DPane.h:168
u64 mUserInfoTag
Definition J2DPane.h:183
f32 getScaleY() const
Definition J2DPane.h:133
u16 field_0x4
Definition J2DPane.h:180
Mtx mGlobalMtx
Definition J2DPane.h:188
JGeometry::TBox2< f32 > mClipRect
Definition J2DPane.h:186
virtual void setAnimation(J2DAnmTexPattern *anm)
Definition J2DPane.h:112
JGeometry::TBox2< f32 > mGlobalBounds
Definition J2DPane.h:185
bool mConnected
Definition J2DPane.h:194
const Mtx * getMtx() const
Definition J2DPane.h:173
void setInfluencedAlpha(bool arg1, bool arg2)
Definition J2DPane.cpp:574
bool appendChild(J2DPane *child)
Definition J2DPane.cpp:225
void show()
Definition J2DPane.h:167
virtual void setVtxColorAnimation(J2DAnmVtxColor *vtx_color)
Definition J2DPane.cpp:881
void clip(const JGeometry::TBox2< f32 > &bounds)
Definition J2DPane.cpp:461
u8 mAlpha
Definition J2DPane.h:191
f32 mScaleX
Definition J2DPane.h:202
virtual void drawSelf(f32 arg1, f32 arg2, Mtx *mtx)
void updateTransform(const J2DAnmTransform *transform)
Definition J2DPane.cpp:908
static JGeometry::TBox2< f32 > static_mBounds
Definition J2DPane.h:177
void rotate(f32 offsetX, f32 offsetY, J2DRotateAxis axis, f32 angle)
Definition J2DPane.cpp:440
void initiate()
Definition J2DPane.cpp:22
virtual void rewriteAlpha()
Definition J2DPane.cpp:929
virtual void update()
Definition J2DPane.cpp:964
virtual ~J2DPane()
Definition J2DPane.cpp:216
u8 getAlpha() const
Definition J2DPane.h:129
virtual bool setConnectParent(bool connected)
Definition J2DPane.cpp:958
Mtx mPositionMtx
Definition J2DPane.h:187
f32 mRotateOffsetX
Definition J2DPane.h:200
Definition J2DScreen.h:48
Definition JKRArchive.h:57
Definition JSURandomInputStream.h:10
Definition JSUList.h:186
JSUTree< T > * getFirstChild() const
Definition JSUList.h:199
JSUTree< T > * getEndChild() const
Definition JSUList.h:197
JSUTree< T > * getParent() const
Definition JSUList.h:211
static u8 child[40]
Definition d_a_e_rb.cpp:675
static u8 angle[2+2]
Definition d_a_obj_kago.cpp:845
c
Definition e_acos.c:97
double x double x
Definition e_atan2.c:58
int m
Definition e_atan2.c:62
double x double y
Definition e_atan2.c:58
a
Definition k_cos.c:89
f32(* MtxP)[4]
Definition mtx.h:18
f32 Mtx[3][4]
Definition mtx.h:15
Definition J2DPane.h:42
u32 mSize
Definition J2DPane.h:44
u32 mKind
Definition J2DPane.h:43
Definition JGeometry.h:496
T i
Definition JGeometry.h:467
Definition JUTFont.h:11
Image data header.
Definition d_menu_dmap_map.cpp:109
Definition d_a_hozelda.cpp:18
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
unsigned char u8
Definition types.h:8