NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
g3d_resanmvis.h
1#ifndef NW4R_G3D_RES_RES_ANM_VIS_H
2#define NW4R_G3D_RES_RES_ANM_VIS_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/g3d/res/g3d_resanm.h>
6#include <nw4r/g3d/res/g3d_rescommon.h>
7#include <nw4r/g3d/res/g3d_resdict.h>
8
9namespace nw4r {
10namespace g3d {
11
13 enum Flag { FLAG_ENABLE = (1 << 0), FLAG_CONST = (1 << 1) };
14
15 s32 name; // at 0x0
16 ulong flags; // at 0x4
17 ResBoolAnmFramesData visibility; // at 0x8
18};
19
21 u16 numFrame; // at 0x0
22 u16 numNode; // at 0x2
23 AnmPolicy policy; // at 0x4
24};
25
27 ResBlockHeaderData header; // at 0x0
28 ulong revision; // at 0x8
29 s32 toResFileData; // at 0xC
30 s32 toVisDataDic; // at 0x10
31 s32 toResUserData; // at 0x14
32 s32 name; // at 0x18
33 s32 original_path; // at 0x1C
34 ResAnmVisInfoData info; // at 0x20
35};
36
37class ResAnmVis : public ResCommon<ResAnmVisData> {
38public:
39 static const ulong SIGNATURE = 'VIS0';
40 static const int REVISION = 3;
41
42public:
43 NW4R_G3D_RESOURCE_FUNC_DEF(ResAnmVis);
44
45 ulong GetRevision() const {
46 return ref().revision;
47 }
48
49 bool CheckRevision() const {
50 return GetRevision() == REVISION;
51 }
52
53 bool GetAnmResult(ulong idx, f32 frame) const;
54
55 const ResAnmVisAnmData* GetNodeAnm(int idx) const {
56 return static_cast<ResAnmVisAnmData*>(
57 ofs_to_obj<ResDic>(ref().toVisDataDic)[idx]);
58 }
59 const ResAnmVisAnmData* GetNodeAnm(ulong idx) const {
60 return static_cast<ResAnmVisAnmData*>(
61 ofs_to_obj<ResDic>(ref().toVisDataDic)[idx]);
62 }
63
64 int GetNumFrame() const {
65 return ref().info.numFrame;
66 }
67
68 int GetNumNode() const {
69 return ref().info.numNode;
70 }
71
72 AnmPolicy GetAnmPolicy() const {
73 return ref().info.policy;
74 }
75};
76
77} // namespace g3d
78} // namespace nw4r
79
80#endif
3D graphics drawing library.
Definition g3d_3dsmax.h:10