#ifndef _DNAMP2_DEAFBABE_HPP_ #define _DNAMP2_DEAFBABE_HPP_ #include "../DNAMP1/DeafBabe.hpp" namespace DataSpec { namespace DNAMP2 { struct DeafBabe : BigDNA { DECL_DNA using BspNodeType = DNAMP1::DeafBabe::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 |= atUint64(t);} }; using Edge = DNAMP1::DeafBabe::Edge; using Triangle = DNAMP1::DeafBabe::Triangle; 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 noClimbEdgeCount; Vector noClimbEdges; Value vertCount; Vector verts; static void BlenderInit(hecl::BlenderConnection::PyOutStream& os) { DNAMP1::DeafBabe::BlenderInit(os); } void insertNoClimb(hecl::BlenderConnection::PyOutStream& os) const { for (atInt16 edgeIdx : noClimbEdges) { if (edgeIdx == -1) continue; const Edge& edge = edgeVertConnections[edgeIdx]; os.format("edge = col_bm.edges.get((col_bm.verts[%u], col_bm.verts[%u]))\n" "if edge:\n" " edge.seam = True\n", edge.verts[0], edge.verts[1]); } } void sendToBlender(hecl::BlenderConnection::PyOutStream& os) const { DeafBabeSendToBlender(os, *this); } }; } } #endif // _DNAMP2_DEAFBABE_HPP_