NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
lyt_group.h
1#ifndef NW4R_LYT_GROUP_H
2#define NW4R_LYT_GROUP_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/lyt/lyt_resources.h>
6
7#include <nw4r/ut.h>
8
9namespace nw4r {
10namespace lyt {
11
12// Forward declarations
13class Pane;
14
15namespace detail {
16
17/******************************************************************************
18 *
19 * PaneLink
20 *
21 ******************************************************************************/
22struct PaneLink {
23 NW4R_UT_LINKLIST_NODE_DECL(); // at 0x4
24 Pane* mTarget; // at 0x8
25};
26
27NW4R_UT_LINKLIST_TYPEDEF_DECL(PaneLink);
28
29} // namespace detail
30
31namespace res {
32
33/******************************************************************************
34 *
35 * GRP1 binary layout
36 *
37 ******************************************************************************/
38struct Group {
39 static const ulong SIGNATURE = 'grp1';
40
41 DataBlockHeader blockHeader; // at 0x0
42 char name[NW4R_LYT_RES_NAME_LEN]; // at 0x8
43 u16 paneNum; // at 0x18
44 u8 PADDING_0x1A[0x1C - 0x1A]; // at 0x1A
45};
46
47} // namespace res
48
49/******************************************************************************
50 *
51 * Group
52 *
53 ******************************************************************************/
54class Group {
55public:
56 Group(const res::Group* pRes, Pane* pRootPane);
57 virtual ~Group(); // at 0x8
58
59 void AppendPane(Pane* pPane);
60
61 detail::PaneLinkList& GetPaneList() {
62 return mPaneLinkList;
63 }
64
65 const char* GetName() const {
66 return mName;
67 }
68
69 bool IsUserAllocated() const {
70 return mbUserAllocated;
71 }
72
73public:
74 NW4R_UT_LINKLIST_NODE_DECL(); // at 0x4
75
76protected:
77 detail::PaneLinkList mPaneLinkList; // at 0xC
78 char mName[NW4R_LYT_RES_NAME_LEN + 1]; // at 0x18
79 bool mbUserAllocated; // at 0x29
80 u8 PADDING_0x2A[0x2C - 0x2A]; // at 0x2A
81
82private:
83 void Init();
84};
85
86NW4R_UT_LINKLIST_TYPEDEF_DECL(Group);
87
88/******************************************************************************
89 *
90 * GroupContainer
91 *
92 ******************************************************************************/
93class GroupContainer {
94public:
95 GroupContainer() {}
96 ~GroupContainer();
97
98 void AppendGroup(Group* pGroup);
99 Group* FindGroupByName(const char* pName);
100
101 GroupList& GetGroupList() {
102 return mGroupList;
103 }
104
105protected:
106 GroupList mGroupList; // at 0x0
107};
108
109} // namespace lyt
110} // namespace nw4r
111
112#endif
2D graphics drawing library.