Node_Z - widberg/fmtk GitHub Wiki
Chum World NODE
ImZouna Node_Z
struct Node_Z : ResourceObject_Z {
crc32_t parentCRC32;
// CRC32 of the parent Node_Z
// 0 if root Node_Z
crc32_t headChildNodeCRC32;
// CRC32 of the head child Node_Z
// 0 if leaf Node_Z
crc32_t prevSibling;
// CRC32 of the previous sibling
// 0 if head child Node_Z
crc32_t nextSibling;
// CRC32 of the next sibling
// 0 if tail child Node_Z
crc32_t lodOrParticlesCRC32;
crc32_t lodDataOrParticlesDataCRC32;
crc32_t userDefineCRC32;
// Can be 0
// Valid contents:
// * FITTOGROUND
// Adjusts the Y component of the position to match the ground height
// * GROUNDNORMAL
// Adjusts the rotation to match the ground normal
// Requires FITTOGROUND
crc32_t lightDataCRC32;
crc32_t unusedcrc321;
// Always? 0
crc32_t unusedcrc322;
// Always? 0
Quat rotation;
// Normalized
Vec3f translation;
std::uint32_t flags;
// OR'd with 0x80 on load
Quat rotation2;
// Normalized
float scale;
float scale2;
float reciprocalScale2;
// The reciprocal of scale2
float unknown10;
// 0
Color color;
// { 1, 1, 1, 1 }
Sphere_Z sphere;
struct Rect {
std::int32_t x1;
std::int32_t y1;
std::int32_t x2;
std::int32_t y2;
} displaySeadsRect;
// { -1, -1, -1, -1 }
Rect collideSeadsRect;
// { -1, -1, 0, 0 }
std::int16_t negative_four;
// -1 in the file
// Set to -4 on load
Mat4f worldTransformMat4;
};
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//------------------------------------------------
struct Node_Z
{
uint32 parentCRC32;
uint32 childNodeCRC322;
uint32 prevSibling;
uint32 nextSibling;
uint32 lodCRC32;
uint32 lodDataCRC32;
uint32 userDefineCRC32;
uint32 handle1;
uint32 handle2;
uint32 handle3;
float rotation[4];
float translation[3];
uint32 flag;
float rotation2[4];
float scale;
float otherScale;
float reciprocalScale2;
float unkFloat1;
float color[4];
float sphere[4];
int32 displaySeadsRect[4];
int32 collideSeadsRect[4];
int16 negative_four;
float worldTransformMat4[16];
} node;
Node_Z_Alt
struct Node_Z_Alt : ResourceObject_Z // >234
{
// ...
};
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//------------------------------------------------
struct Node_Z_Alt
{
uint32 crc32s[9];
float mat0[16];
byte unknown0[208];
float mat1[16];
uint32 unknown2;
uint32 unknown3;
uint16 unknown4;
uint32 unknown5;
uint32 unknown6;
} node;