Files
ss/include/nw4r/g3d/g3d_resanmvis.h
T
robojumper 1180e1f486 m3d (#13)
* Initial M3d Pass
* `m_bmdl` and `m_bline` left

---------

Co-authored-by: elijah-thomas774 <elijahthomas774@gmail.com>
Co-authored-by: Elijah Thomas <42302100+elijah-thomas774@users.noreply.github.com>
2024-09-12 16:36:34 -04:00

83 lines
1.5 KiB
C++

#ifndef NW4R_G3D_RESANMVIS_H
#define NW4R_G3D_RESANMVIS_H
#include "nw4r/g3d/g3d_resdict.h"
#include "nw4r/g3d/g3d_resanm.h"
#include "nw4r/g3d/g3d_anmobj.h"
namespace nw4r
{
namespace g3d
{
struct ResAnmVisInfoData
{
char UNK_0x0[0xC];
u16 mNumFrames; // at 0x20
u16 mNumNodes;
AnmPolicy mAnmPolicy; // at 0x24
};
struct ResAnmVisNodeData
{
UNKWORD WORD_0x0;
u32 mFlags; // at 0x4
ResBoolAnmFramesData mBoolFrames[]; // at 0x8
};
struct ResAnmVisData
{
char UNK_0x0[0x8];
u32 mRevision; // at 0x8
char UNK_0xC[0x4];
s32 mNodeDictOffset; // at 0x10
ResAnmVisInfoData mInfo; // at 0x14
};
struct ResAnmVis
{
enum
{
REVISION = 3
};
ResCommon<ResAnmVisData> mAnmVis;
inline ResAnmVis(void * vptr) : mAnmVis(vptr) {}
bool IsValid() const { return mAnmVis.IsValid(); }
inline ResAnmVisData & ref() const
{
return mAnmVis.ref();
}
inline bool CheckRevision() const
{
return ref().mRevision == REVISION;
}
inline const ResAnmVisNodeData * GetNodeAnm(u32 i) const
{
return static_cast<const ResAnmVisNodeData *>(mAnmVis.ofs_to_obj<ResDic>(ref().mNodeDictOffset)[i]);
}
AnmPolicy GetAnmPolicy() const
{
return ref().mInfo.mAnmPolicy;
}
int GetNumFrame() const
{
return ref().mInfo.mNumFrames;
}
int GetNumNode() const
{
return ref().mInfo.mNumNodes;
}
bool GetAnmResult(u32, float) const;
};
}
}
#endif