NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
animation.hpp
1#pragma once
2#include <types.h>
3#include <game/mLib/m_2d/frame_ctrl.hpp>
4#include <game/mLib/m_2d/layout.hpp>
5#include <game/mLib/m_2d/resource.hpp>
6#include <nw4r/lyt.h>
7#include <nw4r/ut.h>
8
9namespace m2d {
10
11/// @unofficial
13 nw4r::lyt::Group *mpGroup;
14 nw4r::lyt::AnimTransform *mpAnimTransform;
15};
16
17class AnmResV2_c {
18public:
19 AnmResV2_c() {}
20 virtual ~AnmResV2_c() {}
21
22 bool create(const char *name, m2d::ResAccIf_c *resAcc, m2d::Layout_c *layout, bool useOverride);
23 bool remove();
24 GroupAnimTransform_s *getGroupAnimTransform(const char *name);
25 void setAnmEnable(nw4r::lyt::Group *group, bool enable);
26 void updateFrame(nw4r::lyt::Group *group, float frame);
27 nw4r::lyt::AnimationLink *findAnmLink(nw4r::lyt::Pane *pane, bool recursive);
28 void setAnmFrame(nw4r::lyt::Pane *pane, float frame);
29
30 nw4r::lyt::AnimResource mAnimResource;
31 GroupAnimTransform_s *mGroupAnim;
32 int mGroupNum;
33};
34
35class AnmGroupBase_c {
36public:
37 enum FLAG_e {
38 FLAG_ENABLED = BIT_FLAG(0),
39 };
40
41 AnmGroupBase_c() {}
42
43 bool create(AnmResV2_c *anmRes, const char *name);
44 void setAnmEnable(bool enable);
45 void updateFrame();
46
47 FrameCtrl_c *mpFrameCtrl;
48 AnmResV2_c *mpAnmRes;
49 GroupAnimTransform_s *mpGroupAnim;
50 u8 mFlags;
51};
52
53class AnmGroup_c : public AnmGroupBase_c {
54public:
55};
56
57} // namespace m2d