Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
animation.h
Go to the documentation of this file.
1#ifndef NW4HBM_LYT_ANIMATION_H
2#define NW4HBM_LYT_ANIMATION_H
3
4#include "lyt_types.h"
5#include "resourceAccessor.h"
6#include "resources.h"
7
8
9#define TexMtxMax 10
10#define IndTexMtxMax 3
11
12namespace nw4hbm {
13 namespace lyt {
14
15 class Pane;
16 class Material;
17
18 enum {
22
26
29
32
36 };
37
38 enum {
43
48
53
58
60 };
61
62 enum {
67
72
77
82
87
92
97
102
104 };
105
106 enum {
113 };
114
115 enum {
118 };
119
120 enum {
121 /* 0 */ ANIMCURVE_NONE = 0,
124 /* 3 */ ANIMCURVE_MAX
125 };
126
128 public:
130
131 /* 0x08 */ virtual ~AnimTransform();
132 /* 0x0C */ virtual void SetResource(const res::AnimationBlock* pRes,
133 ResourceAccessor* pResAccessor) = 0;
134 /* 0x10 */ virtual void Bind(Pane* pane, bool bRecursive) = 0;
135 /* 0x14 */ virtual void Bind(Material* pMaterial) = 0;
136 /* 0x18 */ virtual void Animate(u32 idx, Pane* pane) = 0;
137 /* 0x1C */ virtual void Animate(u32 idx, Material* pMaterial) = 0;
138
139 f32 GetFrameMax() const { return GetFrameSize(); }
140 u16 GetFrameSize() const;
141
142 void SetFrame(f32 frame) { mFrame = frame; }
143
144 bool IsLoopData() const;
145
146 /* 0x00 (vtable) */
148
149 protected:
150 /* 0x0C */ const res::AnimationBlock* mpRes;
151 /* 0x10 */ f32 mFrame;
152 }; // size = 0x14
154
156 public:
157 AnimationLink() : mLink(), mbDisable(false) { Reset(); }
159
161
162 u16 GetIndex() const { return mIdx; }
163 bool IsEnable() const { return !mbDisable; }
164
165 void SetEnable(bool bEnable) { mbDisable = !bEnable; }
166
167 void Reset() { SetAnimTransform(NULL, 0); }
168
169 void SetAnimTransform(AnimTransform* animTrans, u16 idx) {
170 mAnimTrans = animTrans;
171 mIdx = idx;
172 }
173
175
176 private:
178 /* 0x0C */ u16 mIdx;
179 /* 0x0E */ bool mbDisable;
180 }; // size = 0x10
182
184 public:
186
187 /* 0x08 */ virtual ~AnimTransformBasic();
188 /* 0x0C */ virtual void SetResource(const res::AnimationBlock* pRes,
189 ResourceAccessor* pResAccessor);
190 /* 0x10 */ virtual void Bind(Pane* pane, bool bRecursive);
191 /* 0x14 */ virtual void Bind(Material* pMaterial);
192 /* 0x18 */ virtual void Animate(u32 idx, Pane* pane);
193 /* 0x1C */ virtual void Animate(u32 idx, Material* pMaterial);
194
195 private:
196 /* 0x00 (base) */
197 /* 0x14 */ void** mpFileResAry;
199 /* 0x1C */ u16 mAnimLinkNum;
200 }; // size = 0x20
201
202 namespace detail {
204 }
205
206 } // namespace lyt
207} // namespace nw4hbm
208
209#endif
Definition animation.h:183
virtual ~AnimTransformBasic()
Definition lyt_animation.cpp:285
AnimationLink * mAnimLinkAry
Definition animation.h:198
u16 mAnimLinkNum
Definition animation.h:199
virtual void Bind(Pane *pane, bool bRecursive)
Definition lyt_animation.cpp:331
void ** mpFileResAry
Definition animation.h:197
virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor)
Definition lyt_animation.cpp:295
AnimTransformBasic()
Definition lyt_animation.cpp:282
virtual void Animate(u32 idx, Pane *pane)
Definition lyt_animation.cpp:376
Definition animation.h:127
virtual void Bind(Pane *pane, bool bRecursive)=0
void SetFrame(f32 frame)
Definition animation.h:142
virtual void Bind(Material *pMaterial)=0
virtual void Animate(u32 idx, Pane *pane)=0
ut::LinkListNode mLink
Definition animation.h:147
const res::AnimationBlock * mpRes
Definition animation.h:150
f32 GetFrameMax() const
Definition animation.h:139
virtual void Animate(u32 idx, Material *pMaterial)=0
virtual ~AnimTransform()
Definition lyt_animation.cpp:276
f32 mFrame
Definition animation.h:151
AnimTransform()
Definition lyt_animation.cpp:274
u16 GetFrameSize() const
Definition lyt_animation.cpp:278
virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor)=0
Definition material.h:35
Definition pane.h:42
Definition resourceAccessor.h:13
Definition LinkList.h:23
Material
Definition d_a_npc_moir.cpp:87
unsigned long u32
Definition types.h:12
float f32
Definition types.h:25
unsigned short int u16
Definition types.h:10
AnimationLink * FindAnimationLink(AnimationLinkList *animList, AnimTransform *animTrans)
Definition lyt_animation.cpp:450
struct nw4hbm::lyt::res::Pane Pane
@ ANIMTARGET_TEXPATTURN_IMAGE
Definition animation.h:116
@ ANIMTARGET_TEXPATTURN_MAX
Definition animation.h:117
ut::LinkList< AnimTransform, offsetof(AnimTransform, mLink)> AnimTransformList
Definition animation.h:153
@ ANIMCURVE_NONE
Definition animation.h:121
@ ANIMCURVE_MAX
Definition animation.h:124
@ ANIMCURVE_HERMITE
Definition animation.h:123
@ ANIMCURVE_STEP
Definition animation.h:122
ut::LinkList< AnimationLink, offsetof(AnimationLink, mLink)> AnimationLinkList
Definition animation.h:181
@ ANIMTARGET_MATCOLOR_MAX
Definition animation.h:103
@ ANIMTARGET_MATCOLOR_MATR
Definition animation.h:63
@ ANIMTARGET_MATCOLOR_TEV1B
Definition animation.h:75
@ ANIMTARGET_MATCOLOR_MATG
Definition animation.h:64
@ ANIMTARGET_MATCOLOR_TEV0R
Definition animation.h:68
@ ANIMTARGET_MATCOLOR_TEV2A
Definition animation.h:81
@ ANIMTARGET_MATCOLOR_TEVK1A
Definition animation.h:91
@ ANIMTARGET_MATCOLOR_TEV2B
Definition animation.h:80
@ ANIMTARGET_MATCOLOR_TEVK3G
Definition animation.h:99
@ ANIMTARGET_MATCOLOR_MATA
Definition animation.h:66
@ ANIMTARGET_MATCOLOR_TEVK2A
Definition animation.h:96
@ ANIMTARGET_MATCOLOR_TEVK2R
Definition animation.h:93
@ ANIMTARGET_MATCOLOR_TEVK1B
Definition animation.h:90
@ ANIMTARGET_MATCOLOR_TEVK0R
Definition animation.h:83
@ ANIMTARGET_MATCOLOR_MATB
Definition animation.h:65
@ ANIMTARGET_MATCOLOR_TEVK3B
Definition animation.h:100
@ ANIMTARGET_MATCOLOR_TEV2G
Definition animation.h:79
@ ANIMTARGET_MATCOLOR_TEVK2B
Definition animation.h:95
@ ANIMTARGET_MATCOLOR_TEVK2G
Definition animation.h:94
@ ANIMTARGET_MATCOLOR_TEV0A
Definition animation.h:71
@ ANIMTARGET_MATCOLOR_TEVK0B
Definition animation.h:85
@ ANIMTARGET_MATCOLOR_TEV2R
Definition animation.h:78
@ ANIMTARGET_MATCOLOR_TEVK3R
Definition animation.h:98
@ ANIMTARGET_MATCOLOR_TEV0B
Definition animation.h:70
@ ANIMTARGET_MATCOLOR_TEVK1G
Definition animation.h:89
@ ANIMTARGET_MATCOLOR_TEV1A
Definition animation.h:76
@ ANIMTARGET_MATCOLOR_TEV0G
Definition animation.h:69
@ ANIMTARGET_MATCOLOR_TEVK0A
Definition animation.h:86
@ ANIMTARGET_MATCOLOR_TEVK0G
Definition animation.h:84
@ ANIMTARGET_MATCOLOR_TEVK1R
Definition animation.h:88
@ ANIMTARGET_MATCOLOR_TEVK3A
Definition animation.h:101
@ ANIMTARGET_MATCOLOR_TEV1R
Definition animation.h:73
@ ANIMTARGET_MATCOLOR_TEV1G
Definition animation.h:74
@ ANIMTARGET_VERTEXCOLOR_LB_BLUE
Definition animation.h:51
@ ANIMTARGET_VERTEXCOLOR_RT_RED
Definition animation.h:44
@ ANIMTARGET_VERTEXCOLOR_LB_RED
Definition animation.h:49
@ ANIMTARGET_VERTEXCOLOR_LB_GREEN
Definition animation.h:50
@ ANIMTARGET_VERTEXCOLOR_RT_GREEN
Definition animation.h:45
@ ANIMTARGET_VERTEXCOLOR_RB_RED
Definition animation.h:54
@ ANIMTARGET_VERTEXCOLOR_RT_ALPHA
Definition animation.h:47
@ ANIMTARGET_VERTEXCOLOR_LT_GREEN
Definition animation.h:40
@ ANIMTARGET_VERTEXCOLOR_RB_BLUE
Definition animation.h:56
@ ANIMTARGET_VERTEXCOLOR_LB_ALPHA
Definition animation.h:52
@ ANIMTARGET_VERTEXCOLOR_RT_BLUE
Definition animation.h:46
@ ANIMTARGET_VERTEXCOLOR_LT_ALPHA
Definition animation.h:42
@ ANIMTARGET_VERTEXCOLOR_LT_RED
Definition animation.h:39
@ ANIMTARGET_VERTEXCOLOR_MAX
Definition animation.h:59
@ ANIMTARGET_VERTEXCOLOR_RB_GREEN
Definition animation.h:55
@ ANIMTARGET_VERTEXCOLOR_LT_BLUE
Definition animation.h:41
@ ANIMTARGET_VERTEXCOLOR_RB_ALPHA
Definition animation.h:57
@ ANIMTARGET_PANE_ROTX
Definition animation.h:23
@ ANIMTARGET_PANE_SCALEX
Definition animation.h:27
@ ANIMTARGET_PANE_TRANSZ
Definition animation.h:21
@ ANIMTARGET_PANE_ROTY
Definition animation.h:24
@ ANIMTARGET_PANE_MAX
Definition animation.h:33
@ ANIMTARGET_PANE_SIZEX
Definition animation.h:30
@ ANIMTARGET_PANE_TRANSY
Definition animation.h:20
@ ANIMTARGET_PANE_SIZEY
Definition animation.h:31
@ ANIMTARGET_PANE_ROTZ
Definition animation.h:25
@ ANIMTARGET_PANE_COLOR_ALPHA
Definition animation.h:34
@ ANIMTARGET_PANE_TRANSX
Definition animation.h:19
@ ANIMTARGET_PANE_COLOR_MAX
Definition animation.h:35
@ ANIMTARGET_PANE_SCALEY
Definition animation.h:28
@ ANIMTARGET_TEXSRT_ROT
Definition animation.h:109
@ ANIMTARGET_TEXSRT_MAX
Definition animation.h:112
@ ANIMTARGET_TEXSRT_TRANSX
Definition animation.h:107
@ ANIMTARGET_TEXSRT_TRANSY
Definition animation.h:108
@ ANIMTARGET_TEXSRT_SCALEX
Definition animation.h:110
@ ANIMTARGET_TEXSRT_SCALEY
Definition animation.h:111
Definition HBMAnmController.h:6
Definition resources.h:107