#ifndef _DNAMP1_DEAFBABE_HPP_ #define _DNAMP1_DEAFBABE_HPP_ #include "../DNACommon/DeafBabe.hpp" namespace DataSpec { namespace DNAMP1 { struct DeafBabe : BigDNA { DECL_DNA using BspNodeType = DataSpec::BspNodeType; struct Material : BigDNA { DECL_DNA Value material; bool fireThrough() const {return material >> 18 & 0x1;} void setFireThrough(bool v) {material &= ~0x40000; material |= v << 18;} enum class Type { Mat0, MatGround, Mat2, MatStone, MatHardStone, MatMetal, Mat6, Mat7, Mat8, MatLeaves }; Type type() const {return Type(material & 0xff);} void setType(Type t) {material &= ~0xff; material |= atUint32(t);} }; struct Edge : BigDNA { DECL_DNA Value verts[2]; atUint16 findCommon(const Edge& other) const { if (verts[0] == other.verts[0] || verts[0] == other.verts[1]) return verts[0]; if (verts[1] == other.verts[0] || verts[1] == other.verts[1]) return verts[1]; return -1; } }; struct Triangle : BigDNA { DECL_DNA Value edges[3]; }; Value unk1; Value length; Value magic; Value version; Value aabb[2]; Value rootNodeType; Value bspSize; Buffer bspTree; Value materialCount; Vector materials; Value vertMatsCount; Vector vertMats; Value edgeMatsCount; Vector edgeMats; Value triMatsCount; Vector triMats; Value edgeVertsCount; Vector edgeVertConnections; Value triangleEdgesCount; Vector triangleEdgeConnections; Value vertCount; Vector verts; /* Dummy MP2 member */ void insertNoClimb(hecl::BlenderConnection::PyOutStream&) const {} static void BlenderInit(hecl::BlenderConnection::PyOutStream& os); void sendToBlender(hecl::BlenderConnection::PyOutStream& os) const { DeafBabeSendToBlender(os, *this); } }; } } #endif // _DNAMP1_DEAFBABE_HPP_