Files
ss/include/nw4r/g3d/g3d_resnode.h
T

66 lines
1.3 KiB
C++

#ifndef NW4R_G3D_RESNODE_H
#define NW4R_G3D_RESNODE_H
#include "common.h"
#include "nw4r/g3d/g3d_rescommon.h"
#include "nw4r/math/math_types.h"
namespace nw4r {
namespace g3d {
class ChrAnmResult;
struct ResNodeData {
u32 INT_0x0;
s32 INT_0x4;
u16 SHORT_0x8;
u16 SHORT_0xA;
UNKWORD WORD_0xC;
UNKWORD WORD_0x10;
u32 mFlags; // at 0x14
UNKWORD WORD_0x18;
UNKWORD WORD_0x1C;
math::VEC3 VEC3_0x20;
math::VEC3 VEC3_0x2C;
f32 FLOAT_0x38;
f32 FLOAT_0x3C;
f32 FLOAT_0x40;
math::VEC3 VEC3_0x44;
math::VEC3 VEC3_0x50;
};
struct ResNode {
enum ResNodeFlags { NODE_IS_VISIBLE = 0x100 };
ResCommon<ResNodeData> mNode;
inline ResNode(void *vptr) : mNode(vptr) {}
bool IsValid() const {
return mNode.IsValid();
}
UNKWORD GetID() const {
if (IsValid()) {
return mNode.ptr()->WORD_0xC;
}
return 0;
}
void SetVisibility(bool visible) {
if (IsValid()) {
if (visible) {
mNode.ptr()->mFlags |= NODE_IS_VISIBLE;
} else {
mNode.ptr()->mFlags &= ~NODE_IS_VISIBLE;
}
}
}
void PatchChrAnmResult(ChrAnmResult *) const;
void CalcChrAnmResult(ChrAnmResult *) const;
};
} // namespace g3d
} // namespace nw4r
#endif