#ifndef _CAABOXCOLLISIONTREE #define _CAABOXCOLLISIONTREE #include "CAABox.bt" #include "COBBox.bt" #include "CTransform4f.bt" typedef enum { kCOL_AABox = 0, kCOL_OBBox = 1, } CollisionPrimitiveType; struct CAABoxTreeNode { CAABox bounds; uint start; uint end; uchar unk3; uchar unk4; uchar unk5; uchar unk6; }; struct COBBoxTreeNode { COBBox bounds; uint start; uint end; uchar unk3; uchar unk4; uchar unk5; uchar unk6; }; struct CCollisionMaterial { uint orientation; uint materialType; uint worldType; uint behaviorList; uint filterList; }; struct CIndexedTriangle { uint idx1; uint idx2; uint idx3; if (form.readerVersion > 2 && form.writerVersion > 2) //Fix reading test collisions from DKCTF { ushort material; ushort unk2; } }; struct CollisionMaterialVector { uint count; CCollisionMaterial collisionMaterials[count]; }; struct VertexVector { uint count; CVector3f vertices[count]; }; struct IndexedTriangleVector { uint count; CIndexedTriangle tris[count]; }; struct TreeNodeVector(CollisionPrimitiveType type) { uint count; switch (type) { case kCOL_AABox: CAABoxTreeNode nodes[count]; break; case kCOL_OBBox: COBBoxTreeNode nodes[count]; break; } }; struct ModConData { char id[16]; CTransform4f xf; ushort unk; }; local int idx =0; typedef struct CCollisionTree(uint64 size, CollisionPrimitiveType type) { local CollisionPrimitiveType tmpType = type; local uint64 start