mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 17:44:56 +00:00
Huge compile performance refactor
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct AFSM : public BigYAML
|
||||
{
|
||||
@@ -165,6 +163,5 @@ struct AFSM : public BigYAML
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _RETRO_AFSM_HPP_
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "AGSC.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
using namespace std::literals;
|
||||
@@ -103,4 +101,3 @@ bool AGSC::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
class AGSC
|
||||
@@ -22,7 +20,6 @@ public:
|
||||
static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_AGSC_HPP_
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ANCS.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
@@ -1018,7 +1019,7 @@ bool ANCS::Extract(const SpecBase& dataSpec,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
hecl::ProjectPath yamlPath = outPath.getWithExtension(_S(".yaml"), true);
|
||||
@@ -1041,7 +1042,7 @@ bool ANCS::Extract(const SpecBase& dataSpec,
|
||||
|
||||
if (force || blendType == hecl::ProjectPath::Type::None)
|
||||
{
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
DNAANCS::ReadANCSToBlender<PAKRouter<PAKBridge>, ANCS, MaterialSet, DNACMDL::SurfaceHeader_1, 2>
|
||||
(conn, ancs, blendPath, pakRouter, entry, dataSpec, fileChanged, force);
|
||||
}
|
||||
@@ -1123,7 +1124,7 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath,
|
||||
{
|
||||
if (sub.armature >= 0)
|
||||
{
|
||||
const DNAANCS::Actor::Armature& arm = actor.armatures[sub.armature];
|
||||
const DNAANCS::Armature& arm = actor.armatures[sub.armature];
|
||||
hecl::SystemStringConv armSysName(arm.name);
|
||||
ch.cinf = inPath.ensureAuxInfo(hecl::SystemString(armSysName.sys_str()) + _S(".CINF"));
|
||||
ch.cmdl = sub.mesh;
|
||||
@@ -1152,7 +1153,7 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath,
|
||||
|
||||
/* Gather ANIM resources */
|
||||
ancs.animationSet.animResources.reserve(actor.actions.size());
|
||||
for (const DNAANCS::Actor::Action& act : actor.actions)
|
||||
for (const DNAANCS::Action& act : actor.actions)
|
||||
{
|
||||
hecl::SystemStringConv sysStr(act.name);
|
||||
hecl::ProjectPath pathOut = inPath.ensureAuxInfo(hecl::SystemString(sysStr.sys_str()) + _S(".ANIM"));
|
||||
@@ -1183,7 +1184,7 @@ bool ANCS::CookCINF(const hecl::ProjectPath& outPath,
|
||||
hecl::SystemString armName(inPath.getAuxInfo().begin(),
|
||||
inPath.getAuxInfo().end() - 5);
|
||||
|
||||
for (const DNAANCS::Actor::Armature& arm : actor.armatures)
|
||||
for (const DNAANCS::Armature& arm : actor.armatures)
|
||||
{
|
||||
hecl::SystemStringConv sysStr(arm.name);
|
||||
if (sysStr.sys_str() == armName)
|
||||
@@ -1220,7 +1221,7 @@ bool ANCS::CookCSKR(const hecl::ProjectPath& outPath,
|
||||
|
||||
/* Build bone ID map */
|
||||
std::unordered_map<std::string, atInt32> boneIdMap;
|
||||
for (const DNAANCS::Actor::Armature& arm : actor.armatures)
|
||||
for (const DNAANCS::Armature& arm : actor.armatures)
|
||||
{
|
||||
CINF cinf(arm, boneIdMap);
|
||||
}
|
||||
@@ -1350,13 +1351,13 @@ bool ANCS::CookCSKR(const hecl::ProjectPath& outPath,
|
||||
bool ANCS::CookANIM(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const DNAANCS::Actor& actor,
|
||||
hecl::BlenderConnection::DataStream& ds,
|
||||
hecl::blender::DataStream& ds,
|
||||
bool pc)
|
||||
{
|
||||
hecl::SystemString actName(inPath.getAuxInfo().begin(),
|
||||
inPath.getAuxInfo().end() - 5);
|
||||
hecl::SystemUTF8Conv actNameView(actName);
|
||||
DNAANCS::Actor::Action action = ds.compileActionChannelsOnly(actNameView.str());
|
||||
DNAANCS::Action action = ds.compileActionChannelsOnly(actNameView.str());
|
||||
|
||||
if (!actor.armatures.size())
|
||||
Log.report(logvisor::Fatal, _S("0 armatures in %s"),
|
||||
@@ -1366,7 +1367,7 @@ bool ANCS::CookANIM(const hecl::ProjectPath& outPath,
|
||||
std::unordered_map<std::string, atInt32> boneIdMap;
|
||||
std::experimental::optional<CINF> rigCinf;
|
||||
std::experimental::optional<DNAANIM::RigInverter<CINF>> rigInv;
|
||||
for (const DNAANCS::Actor::Armature& arm : actor.armatures)
|
||||
for (const DNAANCS::Armature& arm : actor.armatures)
|
||||
{
|
||||
if (!rigInv)
|
||||
{
|
||||
|
||||
@@ -5,16 +5,13 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "../DNACommon/ANCS.hpp"
|
||||
#include "CMDLMaterials.hpp"
|
||||
#include "hecl/Blender/BlenderConnection.hpp"
|
||||
#include "CINF.hpp"
|
||||
#include "CSKR.hpp"
|
||||
#include "ANIM.hpp"
|
||||
#include "EVNT.hpp"
|
||||
#include "athena/FileReader.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct ANCS : BigYAML
|
||||
@@ -552,7 +549,7 @@ struct ANCS : BigYAML
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged);
|
||||
|
||||
static bool Cook(const hecl::ProjectPath& outPath,
|
||||
@@ -571,11 +568,10 @@ struct ANCS : BigYAML
|
||||
static bool CookANIM(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const DNAANCS::Actor& actor,
|
||||
hecl::BlenderConnection::DataStream& ds,
|
||||
hecl::blender::DataStream& ds,
|
||||
bool pc);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_ANCS_HPP_
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
#include "ANIM.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
using ANIMOutStream = hecl::BlenderConnection::PyOutStream::ANIMOutStream;
|
||||
using ANIMOutStream = hecl::blender::ANIMOutStream;
|
||||
|
||||
void ANIM::IANIM::sendANIMToBlender(hecl::BlenderConnection::PyOutStream& os, const DNAANIM::RigInverter<CINF>& rig) const
|
||||
void ANIM::IANIM::sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANIM::RigInverter<CINF>& rig) const
|
||||
{
|
||||
os.format("act.hecl_fps = round(%f)\n"
|
||||
"act.hecl_looping = %s\n",
|
||||
@@ -606,4 +605,3 @@ ANIM::ANIM(const BlenderAction& act,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#ifndef _DNAMP1_ANIM_HPP_
|
||||
#define _DNAMP1_ANIM_HPP_
|
||||
|
||||
#include "hecl/Blender/BlenderConnection.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
#include "../DNACommon/ANIM.hpp"
|
||||
#include "DataSpec/DNACommon/RigInverter.hpp"
|
||||
#include "CINF.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct ANIM : BigDNA
|
||||
@@ -30,7 +27,7 @@ struct ANIM : BigDNA
|
||||
UniqueID32 evnt;
|
||||
bool looping = false;
|
||||
|
||||
void sendANIMToBlender(hecl::BlenderConnection::PyOutStream&, const DNAANIM::RigInverter<CINF>& rig) const;
|
||||
void sendANIMToBlender(hecl::blender::PyOutStream&, const DNAANIM::RigInverter<CINF>& rig) const;
|
||||
};
|
||||
|
||||
struct ANIM0 : IANIM
|
||||
@@ -231,7 +228,7 @@ struct ANIM : BigDNA
|
||||
return m_anim->binarySize(__isz + 4);
|
||||
}
|
||||
|
||||
void sendANIMToBlender(hecl::BlenderConnection::PyOutStream& os, const DNAANIM::RigInverter<CINF>& rig, bool) const
|
||||
void sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANIM::RigInverter<CINF>& rig, bool) const
|
||||
{
|
||||
m_anim->sendANIMToBlender(os, rig);
|
||||
}
|
||||
@@ -243,7 +240,7 @@ struct ANIM : BigDNA
|
||||
return m_anim->looping;
|
||||
}
|
||||
|
||||
using BlenderAction = hecl::BlenderConnection::DataStream::Actor::Action;
|
||||
using BlenderAction = hecl::blender::Action;
|
||||
|
||||
ANIM() = default;
|
||||
ANIM(const BlenderAction& act,
|
||||
@@ -252,7 +249,6 @@ struct ANIM : BigDNA
|
||||
bool pc);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_ANIM_HPP_
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "CINF.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
atUint32 CINF::getInternalBoneIdxFromId(atUint32 id) const
|
||||
@@ -37,7 +36,7 @@ const std::string* CINF::getBoneNameFromId(atUint32 id) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CINF::sendVertexGroupsToBlender(hecl::BlenderConnection::PyOutStream& os) const
|
||||
void CINF::sendVertexGroupsToBlender(hecl::blender::PyOutStream& os) const
|
||||
{
|
||||
for (atUint32 bid : boneIds)
|
||||
{
|
||||
@@ -52,7 +51,7 @@ void CINF::sendVertexGroupsToBlender(hecl::BlenderConnection::PyOutStream& os) c
|
||||
}
|
||||
}
|
||||
|
||||
void CINF::sendCINFToBlender(hecl::BlenderConnection::PyOutStream& os, const UniqueID32& cinfId) const
|
||||
void CINF::sendCINFToBlender(hecl::blender::PyOutStream& os, const UniqueID32& cinfId) const
|
||||
{
|
||||
DNAANIM::RigInverter<CINF> inverter(*this);
|
||||
|
||||
@@ -92,7 +91,7 @@ std::string CINF::GetCINFArmatureName(const UniqueID32& cinfId)
|
||||
return hecl::Format("CINF_%08X", cinfId.toUint32());
|
||||
}
|
||||
|
||||
int CINF::RecursiveAddArmatureBone(const Armature& armature, const Armature::Bone* bone, int parent, int& curId,
|
||||
int CINF::RecursiveAddArmatureBone(const Armature& armature, const BlenderBone* bone, int parent, int& curId,
|
||||
std::unordered_map<std::string, atInt32>& idMap, std::map<std::string, int>& nameMap)
|
||||
{
|
||||
int selId;
|
||||
@@ -114,7 +113,7 @@ int CINF::RecursiveAddArmatureBone(const Armature& armature, const Armature::Bon
|
||||
boneOut.linkedCount = bone->children.size() + 1;
|
||||
boneOut.linked.reserve(boneOut.linkedCount);
|
||||
|
||||
const Armature::Bone* child;
|
||||
const BlenderBone* child;
|
||||
boneOut.linked.push_back(parent);
|
||||
for (size_t i=0 ; (child = armature.getChild(bone, i)) ; ++i)
|
||||
boneOut.linked.push_back(RecursiveAddArmatureBone(armature, child, boneOut.id, curId, idMap, nameMap));
|
||||
@@ -129,13 +128,13 @@ CINF::CINF(const Armature& armature, std::unordered_map<std::string, atInt32>& i
|
||||
|
||||
std::map<std::string, int> nameMap;
|
||||
|
||||
const Armature::Bone* bone = armature.getRoot();
|
||||
const BlenderBone* bone = armature.getRoot();
|
||||
if (bone)
|
||||
{
|
||||
if (bone->children.size())
|
||||
{
|
||||
int curId = 4;
|
||||
const Armature::Bone* child;
|
||||
const BlenderBone* child;
|
||||
for (size_t i=0 ; (child = armature.getChild(bone, i)) ; ++i)
|
||||
RecursiveAddArmatureBone(armature, child, 3, curId, idMap, nameMap);
|
||||
}
|
||||
@@ -179,4 +178,3 @@ CINF::CINF(const Armature& armature, std::unordered_map<std::string, atInt32>& i
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#ifndef _DNAMP1_CINF_HPP_
|
||||
#define _DNAMP1_CINF_HPP_
|
||||
|
||||
#include "hecl/Blender/BlenderConnection.hpp"
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "../DNACommon/RigInverter.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct CINF : BigDNA
|
||||
@@ -40,20 +37,20 @@ struct CINF : BigDNA
|
||||
atUint32 getInternalBoneIdxFromId(atUint32 id) const;
|
||||
atUint32 getBoneIdxFromId(atUint32 id) const;
|
||||
const std::string* getBoneNameFromId(atUint32 id) const;
|
||||
void sendVertexGroupsToBlender(hecl::BlenderConnection::PyOutStream& os) const;
|
||||
void sendCINFToBlender(hecl::BlenderConnection::PyOutStream& os, const UniqueID32& cinfId) const;
|
||||
void sendVertexGroupsToBlender(hecl::blender::PyOutStream& os) const;
|
||||
void sendCINFToBlender(hecl::blender::PyOutStream& os, const UniqueID32& cinfId) const;
|
||||
static std::string GetCINFArmatureName(const UniqueID32& cinfId);
|
||||
|
||||
CINF() = default;
|
||||
using Armature = hecl::BlenderConnection::DataStream::Actor::Armature;
|
||||
using Armature = hecl::blender::Armature;
|
||||
using BlenderBone = hecl::blender::Bone;
|
||||
|
||||
int RecursiveAddArmatureBone(const Armature& armature, const Armature::Bone* bone, int parent, int& curId,
|
||||
int RecursiveAddArmatureBone(const Armature& armature, const BlenderBone* bone, int parent, int& curId,
|
||||
std::unordered_map<std::string, atInt32>& idMap, std::map<std::string, int>& nameMap);
|
||||
|
||||
CINF(const Armature& armature, std::unordered_map<std::string, atInt32>& idMap);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_CINF_HPP_
|
||||
|
||||
145
DataSpec/DNAMP1/CMDL.cpp
Normal file
145
DataSpec/DNAMP1/CMDL.cpp
Normal file
@@ -0,0 +1,145 @@
|
||||
#include "CMDL.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
bool CMDL::Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
const hecl::ProjectPath& outPath,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
/* Check for RigPair */
|
||||
const PAKRouter<PAKBridge>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
CINF cinf;
|
||||
CSKR cskr;
|
||||
std::pair<CSKR*,CINF*> loadRp(nullptr, nullptr);
|
||||
if (rp)
|
||||
{
|
||||
pakRouter.lookupAndReadDNA(rp->first, cskr);
|
||||
pakRouter.lookupAndReadDNA(rp->second, cinf);
|
||||
loadRp.first = &cskr;
|
||||
loadRp.second = &cinf;
|
||||
}
|
||||
|
||||
/* Do extract */
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(outPath, hecl::blender::BlendType::Mesh))
|
||||
return false;
|
||||
DNACMDL::ReadCMDLToBlender<PAKRouter<PAKBridge>, MaterialSet, std::pair<CSKR*,CINF*>, DNACMDL::SurfaceHeader_1, 2>
|
||||
(conn, rs, pakRouter, entry, dataSpec, loadRp);
|
||||
conn.saveBlend();
|
||||
|
||||
#if 0
|
||||
/* Cook and re-extract test */
|
||||
hecl::ProjectPath tempOut = outPath.getWithExtension(_S(".recook"), true);
|
||||
hecl::blender::Connection::DataStream ds = conn.beginData();
|
||||
DNACMDL::Mesh mesh = ds.compileMesh(hecl::TopologyTriStrips, -1);
|
||||
ds.close();
|
||||
DNACMDL::WriteCMDL<MaterialSet, DNACMDL::SurfaceHeader_1_2, 2>(tempOut, outPath, mesh);
|
||||
|
||||
athena::io::FileReader reader(tempOut.getAbsolutePath());
|
||||
hecl::ProjectPath tempBlend = outPath.getWithExtension(_S(".recook.blend"), true);
|
||||
if (!conn.createBlend(tempBlend, hecl::blender::Connection::TypeMesh))
|
||||
return false;
|
||||
DNACMDL::ReadCMDLToBlender<PAKRouter<PAKBridge>, MaterialSet, std::pair<CSKR*,CINF*>, DNACMDL::SurfaceHeader_1_2, 2>
|
||||
(conn, reader, pakRouter, entry, dataSpec, loadRp);
|
||||
return conn.saveBlend();
|
||||
#elif 0
|
||||
/* HMDL cook test */
|
||||
hecl::ProjectPath tempOut = outPath.getWithExtension(_S(".recook"), true);
|
||||
hecl::blender::Connection::DataStream ds = conn.beginData();
|
||||
DNACMDL::Mesh mesh = ds.compileMesh(hecl::HMDLTopology::TriStrips, 16);
|
||||
ds.close();
|
||||
DNACMDL::WriteHMDLCMDL<HMDLMaterialSet, DNACMDL::SurfaceHeader_1, 2>(tempOut, outPath, mesh);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMDL::Cook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const DNACMDL::Mesh& mesh)
|
||||
{
|
||||
if (mesh.skins.size())
|
||||
{
|
||||
DNACMDL::Mesh skinMesh = mesh.getContiguousSkinningVersion();
|
||||
if (!DNACMDL::WriteCMDL<MaterialSet, DNACMDL::SurfaceHeader_1, 2>(outPath, inPath, skinMesh))
|
||||
return false;
|
||||
|
||||
/* Output skinning intermediate */
|
||||
auto vertCountIt = skinMesh.contiguousSkinVertCounts.cbegin();
|
||||
athena::io::FileWriter writer(outPath.getWithExtension(_S(".skinint")).getAbsolutePath());
|
||||
writer.writeUint32Big(skinMesh.skins.size());
|
||||
for (const std::vector<DNACMDL::Mesh::SkinBind> skin : skinMesh.skins)
|
||||
{
|
||||
writer.writeUint32Big(skin.size());
|
||||
for (const DNACMDL::Mesh::SkinBind& bind : skin)
|
||||
{
|
||||
writer.writeUint32Big(bind.boneIdx);
|
||||
writer.writeFloatBig(bind.weight);
|
||||
}
|
||||
writer.writeUint32Big(*vertCountIt++);
|
||||
}
|
||||
writer.writeUint32Big(skinMesh.pos.size());
|
||||
writer.writeUint32Big(skinMesh.boneNames.size());
|
||||
for (const std::string& boneName : skinMesh.boneNames)
|
||||
writer.writeString(boneName);
|
||||
}
|
||||
else if (!DNACMDL::WriteCMDL<MaterialSet, DNACMDL::SurfaceHeader_1, 2>(outPath, inPath, mesh))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMDL::HMDLCook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const DNACMDL::Mesh& mesh)
|
||||
{
|
||||
hecl::blender::PoolSkinIndex poolSkinIndex;
|
||||
if (mesh.skins.size())
|
||||
{
|
||||
if (!DNACMDL::WriteHMDLCMDL<HMDLMaterialSet, DNACMDL::SurfaceHeader_2, 2>(
|
||||
outPath, inPath, mesh, poolSkinIndex))
|
||||
return false;
|
||||
|
||||
/* Output skinning intermediate */
|
||||
athena::io::FileWriter writer(outPath.getWithExtension(_S(".skinint")).getAbsolutePath());
|
||||
writer.writeUint32Big(mesh.skinBanks.banks.size());
|
||||
for (const DNACMDL::Mesh::SkinBanks::Bank& sb : mesh.skinBanks.banks)
|
||||
{
|
||||
writer.writeUint32Big(sb.m_boneIdxs.size());
|
||||
for (uint32_t bind : sb.m_boneIdxs)
|
||||
writer.writeUint32Big(bind);
|
||||
}
|
||||
writer.writeUint32Big(mesh.boneNames.size());
|
||||
for (const std::string& boneName : mesh.boneNames)
|
||||
writer.writeString(boneName);
|
||||
|
||||
/* CVirtualBone structure just like original (for CPU skinning) */
|
||||
writer.writeUint32Big(mesh.skins.size());
|
||||
for (auto& s : mesh.skins)
|
||||
{
|
||||
writer.writeUint32Big(s.size());
|
||||
for (auto& b : s)
|
||||
{
|
||||
writer.writeUint32Big(b.boneIdx);
|
||||
writer.writeFloatBig(b.weight);
|
||||
}
|
||||
}
|
||||
|
||||
/* Write indirection table mapping pool verts to CVirtualBones */
|
||||
writer.writeUint32Big(poolSkinIndex.m_poolSz);
|
||||
for (uint32_t i=0 ; i<poolSkinIndex.m_poolSz ; ++i)
|
||||
writer.writeUint32Big(poolSkinIndex.m_poolToSkinIndex[i]);
|
||||
}
|
||||
else if (!DNACMDL::WriteHMDLCMDL<HMDLMaterialSet, DNACMDL::SurfaceHeader_2, 2>(
|
||||
outPath, inPath, mesh, poolSkinIndex))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
#include <athena/FileReader.hpp>
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct CMDL
|
||||
@@ -23,56 +21,8 @@ struct CMDL
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
/* Check for RigPair */
|
||||
const PAKRouter<PAKBridge>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
CINF cinf;
|
||||
CSKR cskr;
|
||||
std::pair<CSKR*,CINF*> loadRp(nullptr, nullptr);
|
||||
if (rp)
|
||||
{
|
||||
pakRouter.lookupAndReadDNA(rp->first, cskr);
|
||||
pakRouter.lookupAndReadDNA(rp->second, cinf);
|
||||
loadRp.first = &cskr;
|
||||
loadRp.second = &cinf;
|
||||
}
|
||||
|
||||
/* Do extract */
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(outPath, hecl::BlenderConnection::BlendType::Mesh))
|
||||
return false;
|
||||
DNACMDL::ReadCMDLToBlender<PAKRouter<PAKBridge>, MaterialSet, std::pair<CSKR*,CINF*>, DNACMDL::SurfaceHeader_1, 2>
|
||||
(conn, rs, pakRouter, entry, dataSpec, loadRp);
|
||||
conn.saveBlend();
|
||||
|
||||
#if 0
|
||||
/* Cook and re-extract test */
|
||||
hecl::ProjectPath tempOut = outPath.getWithExtension(_S(".recook"), true);
|
||||
hecl::BlenderConnection::DataStream ds = conn.beginData();
|
||||
DNACMDL::Mesh mesh = ds.compileMesh(hecl::TopologyTriStrips, -1);
|
||||
ds.close();
|
||||
DNACMDL::WriteCMDL<MaterialSet, DNACMDL::SurfaceHeader_1_2, 2>(tempOut, outPath, mesh);
|
||||
|
||||
athena::io::FileReader reader(tempOut.getAbsolutePath());
|
||||
hecl::ProjectPath tempBlend = outPath.getWithExtension(_S(".recook.blend"), true);
|
||||
if (!conn.createBlend(tempBlend, hecl::BlenderConnection::TypeMesh))
|
||||
return false;
|
||||
DNACMDL::ReadCMDLToBlender<PAKRouter<PAKBridge>, MaterialSet, std::pair<CSKR*,CINF*>, DNACMDL::SurfaceHeader_1_2, 2>
|
||||
(conn, reader, pakRouter, entry, dataSpec, loadRp);
|
||||
return conn.saveBlend();
|
||||
#elif 0
|
||||
/* HMDL cook test */
|
||||
hecl::ProjectPath tempOut = outPath.getWithExtension(_S(".recook"), true);
|
||||
hecl::BlenderConnection::DataStream ds = conn.beginData();
|
||||
DNACMDL::Mesh mesh = ds.compileMesh(hecl::HMDLTopology::TriStrips, 16);
|
||||
ds.close();
|
||||
DNACMDL::WriteHMDLCMDL<HMDLMaterialSet, DNACMDL::SurfaceHeader_1, 2>(tempOut, outPath, mesh);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged);
|
||||
|
||||
static void Name(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
@@ -84,87 +34,13 @@ struct CMDL
|
||||
|
||||
static bool Cook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const DNACMDL::Mesh& mesh)
|
||||
{
|
||||
if (mesh.skins.size())
|
||||
{
|
||||
DNACMDL::Mesh skinMesh = mesh.getContiguousSkinningVersion();
|
||||
if (!DNACMDL::WriteCMDL<MaterialSet, DNACMDL::SurfaceHeader_1, 2>(outPath, inPath, skinMesh))
|
||||
return false;
|
||||
|
||||
/* Output skinning intermediate */
|
||||
auto vertCountIt = skinMesh.contiguousSkinVertCounts.cbegin();
|
||||
athena::io::FileWriter writer(outPath.getWithExtension(_S(".skinint")).getAbsolutePath());
|
||||
writer.writeUint32Big(skinMesh.skins.size());
|
||||
for (const std::vector<DNACMDL::Mesh::SkinBind> skin : skinMesh.skins)
|
||||
{
|
||||
writer.writeUint32Big(skin.size());
|
||||
for (const DNACMDL::Mesh::SkinBind& bind : skin)
|
||||
{
|
||||
writer.writeUint32Big(bind.boneIdx);
|
||||
writer.writeFloatBig(bind.weight);
|
||||
}
|
||||
writer.writeUint32Big(*vertCountIt++);
|
||||
}
|
||||
writer.writeUint32Big(skinMesh.pos.size());
|
||||
writer.writeUint32Big(skinMesh.boneNames.size());
|
||||
for (const std::string& boneName : skinMesh.boneNames)
|
||||
writer.writeString(boneName);
|
||||
}
|
||||
else if (!DNACMDL::WriteCMDL<MaterialSet, DNACMDL::SurfaceHeader_1, 2>(outPath, inPath, mesh))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
const DNACMDL::Mesh& mesh);
|
||||
|
||||
static bool HMDLCook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const DNACMDL::Mesh& mesh)
|
||||
{
|
||||
hecl::PoolSkinIndex poolSkinIndex;
|
||||
if (mesh.skins.size())
|
||||
{
|
||||
if (!DNACMDL::WriteHMDLCMDL<HMDLMaterialSet, DNACMDL::SurfaceHeader_2, 2>(
|
||||
outPath, inPath, mesh, poolSkinIndex))
|
||||
return false;
|
||||
|
||||
/* Output skinning intermediate */
|
||||
athena::io::FileWriter writer(outPath.getWithExtension(_S(".skinint")).getAbsolutePath());
|
||||
writer.writeUint32Big(mesh.skinBanks.banks.size());
|
||||
for (const DNACMDL::Mesh::SkinBanks::Bank& sb : mesh.skinBanks.banks)
|
||||
{
|
||||
writer.writeUint32Big(sb.m_boneIdxs.size());
|
||||
for (uint32_t bind : sb.m_boneIdxs)
|
||||
writer.writeUint32Big(bind);
|
||||
}
|
||||
writer.writeUint32Big(mesh.boneNames.size());
|
||||
for (const std::string& boneName : mesh.boneNames)
|
||||
writer.writeString(boneName);
|
||||
|
||||
/* CVirtualBone structure just like original (for CPU skinning) */
|
||||
writer.writeUint32Big(mesh.skins.size());
|
||||
for (auto& s : mesh.skins)
|
||||
{
|
||||
writer.writeUint32Big(s.size());
|
||||
for (auto& b : s)
|
||||
{
|
||||
writer.writeUint32Big(b.boneIdx);
|
||||
writer.writeFloatBig(b.weight);
|
||||
}
|
||||
}
|
||||
|
||||
/* Write indirection table mapping pool verts to CVirtualBones */
|
||||
writer.writeUint32Big(poolSkinIndex.m_poolSz);
|
||||
for (uint32_t i=0 ; i<poolSkinIndex.m_poolSz ; ++i)
|
||||
writer.writeUint32Big(poolSkinIndex.m_poolToSkinIndex[i]);
|
||||
}
|
||||
else if (!DNACMDL::WriteHMDLCMDL<HMDLMaterialSet, DNACMDL::SurfaceHeader_2, 2>(
|
||||
outPath, inPath, mesh, poolSkinIndex))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
const DNACMDL::Mesh& mesh);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_CMDL_HPP_
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#include "CMDLMaterials.hpp"
|
||||
#include "../DNAMP2/CMDLMaterials.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
using Stream = hecl::BlenderConnection::PyOutStream;
|
||||
using Stream = hecl::blender::PyOutStream;
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
using Material = MaterialSet::Material;
|
||||
|
||||
@@ -1152,7 +1151,7 @@ MaterialSet::Material::Material(const hecl::Backend::GX& gx,
|
||||
|
||||
HMDLMaterialSet::Material::Material(hecl::Frontend::Frontend& FE,
|
||||
const std::string& diagName,
|
||||
const hecl::BlenderConnection::DataStream::Mesh::Material& mat,
|
||||
const hecl::blender::Material& mat,
|
||||
const std::unordered_map<std::string, int32_t>& iprops,
|
||||
const std::vector<hecl::ProjectPath>& texPaths)
|
||||
{
|
||||
@@ -1297,12 +1296,9 @@ MaterialSet::Material::UVAnimation::UVAnimation(const std::string& gameFunction,
|
||||
Log.report(logvisor::Fatal, "unsupported UV anim '%s'", gameFunction.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP2
|
||||
namespace DataSpec::DNAMP2
|
||||
{
|
||||
|
||||
void MaterialSet::ConstructMaterial(Stream& out,
|
||||
@@ -1312,4 +1308,3 @@ void MaterialSet::ConstructMaterial(Stream& out,
|
||||
{DataSpec::DNAMP1::_ConstructMaterial(out, material, groupIdx, matIdx);}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#ifndef _DNAMP1_CMDL_MATERIALS_HPP_
|
||||
#define _DNAMP1_CMDL_MATERIALS_HPP_
|
||||
|
||||
#include "hecl/Blender/BlenderConnection.hpp"
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "../DNACommon/GX.hpp"
|
||||
#include "../DNACommon/CMDL.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct MaterialSet : BigDNA
|
||||
@@ -365,15 +362,15 @@ struct MaterialSet : BigDNA
|
||||
};
|
||||
Vector<UVAnimation, DNA_COUNT(uvAnimsCount)> uvAnims;
|
||||
|
||||
static void AddTexture(hecl::BlenderConnection::PyOutStream& out,
|
||||
static void AddTexture(hecl::blender::PyOutStream& out,
|
||||
GX::TexGenSrc type, int mtxIdx, uint32_t texIdx);
|
||||
static void AddTextureAnim(hecl::BlenderConnection::PyOutStream& out,
|
||||
static void AddTextureAnim(hecl::blender::PyOutStream& out,
|
||||
MaterialSet::Material::UVAnimation::Mode type,
|
||||
unsigned idx, const float* vals);
|
||||
static void AddKcolor(hecl::BlenderConnection::PyOutStream& out,
|
||||
static void AddKcolor(hecl::blender::PyOutStream& out,
|
||||
const GX::Color& col, unsigned idx);
|
||||
static void AddDynamicColor(hecl::BlenderConnection::PyOutStream& out, unsigned idx);
|
||||
static void AddDynamicAlpha(hecl::BlenderConnection::PyOutStream& out, unsigned idx);
|
||||
static void AddDynamicColor(hecl::blender::PyOutStream& out, unsigned idx);
|
||||
static void AddDynamicAlpha(hecl::blender::PyOutStream& out, unsigned idx);
|
||||
|
||||
Material() = default;
|
||||
Material(const hecl::Backend::GX& gx,
|
||||
@@ -388,12 +385,12 @@ struct MaterialSet : BigDNA
|
||||
};
|
||||
Vector<Material, DNA_COUNT(head.materialCount)> materials;
|
||||
|
||||
static void RegisterMaterialProps(hecl::BlenderConnection::PyOutStream& out);
|
||||
static void ConstructMaterial(hecl::BlenderConnection::PyOutStream& out,
|
||||
static void RegisterMaterialProps(hecl::blender::PyOutStream& out);
|
||||
static void ConstructMaterial(hecl::blender::PyOutStream& out,
|
||||
const MaterialSet::Material& material,
|
||||
unsigned groupIdx, unsigned matIdx);
|
||||
|
||||
void readToBlender(hecl::BlenderConnection::PyOutStream& os,
|
||||
void readToBlender(hecl::blender::PyOutStream& os,
|
||||
const PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAKRouter<PAKBridge>::EntryType& entry,
|
||||
unsigned setIdx)
|
||||
@@ -473,14 +470,13 @@ struct HMDLMaterialSet : BigDNA
|
||||
Material() = default;
|
||||
Material(hecl::Frontend::Frontend& FE,
|
||||
const std::string& diagName,
|
||||
const hecl::BlenderConnection::DataStream::Mesh::Material& mat,
|
||||
const hecl::blender::Material& mat,
|
||||
const std::unordered_map<std::string, int32_t>& iprops,
|
||||
const std::vector<hecl::ProjectPath>& texPaths);
|
||||
};
|
||||
Vector<Material, DNA_COUNT(head.materialCount)> materials;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_CMDL_MATERIALS_HPP_
|
||||
|
||||
@@ -44,12 +44,14 @@ set(DNAMP1_SOURCES
|
||||
STRG.hpp STRG.cpp
|
||||
AGSC.cpp
|
||||
CSNG.cpp
|
||||
CSKR.cpp
|
||||
ANCS.cpp
|
||||
ANIM.cpp
|
||||
CINF.cpp
|
||||
EVNT.cpp
|
||||
CMDL.hpp
|
||||
CMDL.hpp CMDL.cpp
|
||||
CMDLMaterials.cpp
|
||||
DCLN.cpp
|
||||
MAPA.hpp
|
||||
MAPU.hpp
|
||||
MREA.cpp
|
||||
|
||||
21
DataSpec/DNAMP1/CSKR.cpp
Normal file
21
DataSpec/DNAMP1/CSKR.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "CSKR.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
void CSKR::weightVertex(hecl::blender::PyOutStream& os, const CINF& cinf, atUint32 idx) const
|
||||
{
|
||||
atUint32 accum = 0;
|
||||
for (const SkinningRule& rule : skinningRules)
|
||||
{
|
||||
if (idx >= accum && idx < accum + rule.vertCount)
|
||||
for (const SkinningRule::Weight& weight : rule.weights)
|
||||
os.format("vert[dvert_lay][%u] = %f\n",
|
||||
cinf.getBoneIdxFromId(weight.boneId),
|
||||
weight.weight);
|
||||
accum += rule.vertCount;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
#ifndef _DNAMP1_CSKR_HPP_
|
||||
#define _DNAMP1_CSKR_HPP_
|
||||
|
||||
#include "hecl/Blender/BlenderConnection.hpp"
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "CINF.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct CSKR : BigDNA
|
||||
@@ -34,22 +31,9 @@ struct CSKR : BigDNA
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void weightVertex(hecl::BlenderConnection::PyOutStream& os, const CINF& cinf, atUint32 idx) const
|
||||
{
|
||||
atUint32 accum = 0;
|
||||
for (const SkinningRule& rule : skinningRules)
|
||||
{
|
||||
if (idx >= accum && idx < accum + rule.vertCount)
|
||||
for (const SkinningRule::Weight& weight : rule.weights)
|
||||
os.format("vert[dvert_lay][%u] = %f\n",
|
||||
cinf.getBoneIdxFromId(weight.boneId),
|
||||
weight.weight);
|
||||
accum += rule.vertCount;
|
||||
}
|
||||
}
|
||||
void weightVertex(hecl::blender::PyOutStream& os, const CINF& cinf, atUint32 idx) const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_CSKR_HPP_
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "CSNG.hpp"
|
||||
#include "amuse/SongConverter.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
bool CSNG::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
|
||||
@@ -87,4 +85,3 @@ bool CSNG::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
class CSNG
|
||||
@@ -25,7 +23,6 @@ public:
|
||||
static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_CSNG_HPP_
|
||||
|
||||
106
DataSpec/DNAMP1/DCLN.cpp
Normal file
106
DataSpec/DNAMP1/DCLN.cpp
Normal file
@@ -0,0 +1,106 @@
|
||||
#include "DCLN.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
#if DCLN_DUMP_OBB
|
||||
void DCLN::Collision::NodesendToBlender(hecl::blender::PyOutStream& os) const
|
||||
{
|
||||
os.format("obj = bpy.data.objects.new('%s', None)\n"
|
||||
"obj.empty_draw_type = 'CUBE'\n"
|
||||
"bpy.context.scene.objects.link(obj)\n"
|
||||
"mtx = Matrix(((%f,%f,%f,%f),(%f,%f,%f,%f),(%f,%f,%f,%f),(0.0,0.0,0.0,1.0)))\n"
|
||||
"mtxd = mtx.decompose()\n"
|
||||
"obj.rotation_mode = 'QUATERNION'\n"
|
||||
"obj.location = mtxd[0]\n"
|
||||
"obj.rotation_quaternion = mtxd[1]\n"
|
||||
"obj.scale = (%f,%f,%f)\n", isLeaf ? "leaf" : "branch",
|
||||
xf[0].vec[0], xf[0].vec[1], xf[0].vec[2], xf[0].vec[3],
|
||||
xf[1].vec[0], xf[1].vec[1], xf[1].vec[2], xf[1].vec[3],
|
||||
xf[2].vec[0], xf[2].vec[1], xf[2].vec[2], xf[2].vec[3],
|
||||
halfExtent.vec[0], halfExtent.vec[1], halfExtent.vec[2]);
|
||||
if (isLeaf)
|
||||
os << "obj.show_name = True\n";
|
||||
if (!isLeaf)
|
||||
{
|
||||
left->sendToBlender(os);
|
||||
right->sendToBlender(os);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void DCLN::sendToBlender(hecl::blender::Connection& conn, std::string_view entryName)
|
||||
{
|
||||
/* Open Py Stream and read sections */
|
||||
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
|
||||
os.format("import bpy\n"
|
||||
"import bmesh\n"
|
||||
"from mathutils import Vector, Matrix\n"
|
||||
"\n"
|
||||
"bpy.context.scene.name = '%s'\n"
|
||||
"# Clear Scene\n"
|
||||
"for ob in bpy.data.objects:\n"
|
||||
" if ob.type != 'CAMERA':\n"
|
||||
" bpy.context.scene.objects.unlink(ob)\n"
|
||||
" bpy.data.objects.remove(ob)\n",
|
||||
entryName.data());
|
||||
|
||||
DeafBabe::BlenderInit(os);
|
||||
atInt32 idx = 0;
|
||||
for (const Collision& col : collision)
|
||||
{
|
||||
DeafBabeSendToBlender(os, col, true, idx++);
|
||||
#if DCLN_DUMP_OBB
|
||||
col.root.sendToBlender(os);
|
||||
#endif
|
||||
}
|
||||
os.centerView();
|
||||
os.close();
|
||||
}
|
||||
|
||||
bool DCLN::Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
const hecl::ProjectPath& outPath,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
DCLN dcln;
|
||||
dcln.read(rs);
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(outPath, hecl::blender::BlendType::ColMesh))
|
||||
return false;
|
||||
|
||||
dcln.sendToBlender(conn, pakRouter.getBestEntryName(entry, false));
|
||||
return conn.saveBlend();
|
||||
}
|
||||
|
||||
bool DCLN::Cook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const std::vector<Mesh>& meshes,
|
||||
hecl::blender::Connection* conn)
|
||||
{
|
||||
DCLN dcln;
|
||||
dcln.colCount = atUint32(meshes.size());
|
||||
for (const Mesh& mesh : meshes)
|
||||
{
|
||||
dcln.collision.emplace_back();
|
||||
Collision& colOut = dcln.collision.back();
|
||||
DeafBabeBuildFromBlender(colOut, mesh);
|
||||
colOut.root = std::move(*OBBTreeBuilder::buildCol<Collision::Node>(mesh));
|
||||
colOut.memSize = atUint32(colOut.root.getMemoryUsage());
|
||||
}
|
||||
|
||||
athena::io::FileWriter w(outPath.getAbsolutePath());
|
||||
dcln.write(w);
|
||||
int64_t rem = w.position() % 32;
|
||||
if (rem)
|
||||
for (int64_t i=0 ; i<32-rem ; ++i)
|
||||
w.writeUByte(0xff);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,14 +10,12 @@
|
||||
|
||||
#define DCLN_DUMP_OBB 0
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct DCLN : BigDNA
|
||||
{
|
||||
using Mesh = hecl::BlenderConnection::DataStream::ColMesh;
|
||||
using Mesh = hecl::blender::ColMesh;
|
||||
|
||||
DECL_DNA
|
||||
Value<atUint32> colCount;
|
||||
@@ -130,29 +128,7 @@ struct DCLN : BigDNA
|
||||
}
|
||||
|
||||
#if DCLN_DUMP_OBB
|
||||
void sendToBlender(hecl::BlenderConnection::PyOutStream& os) const
|
||||
{
|
||||
os.format("obj = bpy.data.objects.new('%s', None)\n"
|
||||
"obj.empty_draw_type = 'CUBE'\n"
|
||||
"bpy.context.scene.objects.link(obj)\n"
|
||||
"mtx = Matrix(((%f,%f,%f,%f),(%f,%f,%f,%f),(%f,%f,%f,%f),(0.0,0.0,0.0,1.0)))\n"
|
||||
"mtxd = mtx.decompose()\n"
|
||||
"obj.rotation_mode = 'QUATERNION'\n"
|
||||
"obj.location = mtxd[0]\n"
|
||||
"obj.rotation_quaternion = mtxd[1]\n"
|
||||
"obj.scale = (%f,%f,%f)\n", isLeaf ? "leaf" : "branch",
|
||||
xf[0].vec[0], xf[0].vec[1], xf[0].vec[2], xf[0].vec[3],
|
||||
xf[1].vec[0], xf[1].vec[1], xf[1].vec[2], xf[1].vec[3],
|
||||
xf[2].vec[0], xf[2].vec[1], xf[2].vec[2], xf[2].vec[3],
|
||||
halfExtent.vec[0], halfExtent.vec[1], halfExtent.vec[2]);
|
||||
if (isLeaf)
|
||||
os << "obj.show_name = True\n";
|
||||
if (!isLeaf)
|
||||
{
|
||||
left->sendToBlender(os);
|
||||
right->sendToBlender(os);
|
||||
}
|
||||
}
|
||||
sendToBlender(hecl::blender::PyOutStream& os) const;
|
||||
#endif
|
||||
};
|
||||
Node root;
|
||||
@@ -162,40 +138,13 @@ struct DCLN : BigDNA
|
||||
}
|
||||
|
||||
/* Dummy MP2 member */
|
||||
void insertNoClimb(hecl::BlenderConnection::PyOutStream&) const {}
|
||||
void insertNoClimb(hecl::blender::PyOutStream&) const {}
|
||||
};
|
||||
|
||||
|
||||
Vector<Collision, DNA_COUNT(colCount)> collision;
|
||||
|
||||
void sendToBlender(hecl::BlenderConnection& conn, std::string_view entryName)
|
||||
{
|
||||
/* Open Py Stream and read sections */
|
||||
hecl::BlenderConnection::PyOutStream os = conn.beginPythonOut(true);
|
||||
os.format("import bpy\n"
|
||||
"import bmesh\n"
|
||||
"from mathutils import Vector, Matrix\n"
|
||||
"\n"
|
||||
"bpy.context.scene.name = '%s'\n"
|
||||
"# Clear Scene\n"
|
||||
"for ob in bpy.data.objects:\n"
|
||||
" if ob.type != 'CAMERA':\n"
|
||||
" bpy.context.scene.objects.unlink(ob)\n"
|
||||
" bpy.data.objects.remove(ob)\n",
|
||||
entryName.data());
|
||||
|
||||
DeafBabe::BlenderInit(os);
|
||||
atInt32 idx = 0;
|
||||
for (const Collision& col : collision)
|
||||
{
|
||||
DeafBabeSendToBlender(os, col, true, idx++);
|
||||
#if DCLN_DUMP_OBB
|
||||
col.root.sendToBlender(os);
|
||||
#endif
|
||||
}
|
||||
os.centerView();
|
||||
os.close();
|
||||
}
|
||||
void sendToBlender(hecl::blender::Connection& conn, std::string_view entryName);
|
||||
|
||||
static bool Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
@@ -203,45 +152,14 @@ struct DCLN : BigDNA
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
DCLN dcln;
|
||||
dcln.read(rs);
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(outPath, hecl::BlenderConnection::BlendType::ColMesh))
|
||||
return false;
|
||||
|
||||
dcln.sendToBlender(conn, pakRouter.getBestEntryName(entry, false));
|
||||
return conn.saveBlend();
|
||||
}
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged);
|
||||
|
||||
static bool Cook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const std::vector<Mesh>& meshes,
|
||||
hecl::BlenderConnection* conn = nullptr)
|
||||
{
|
||||
DCLN dcln;
|
||||
dcln.colCount = atUint32(meshes.size());
|
||||
for (const Mesh& mesh : meshes)
|
||||
{
|
||||
dcln.collision.emplace_back();
|
||||
Collision& colOut = dcln.collision.back();
|
||||
DeafBabeBuildFromBlender(colOut, mesh);
|
||||
colOut.root = std::move(*OBBTreeBuilder::buildCol<Collision::Node>(mesh));
|
||||
colOut.memSize = atUint32(colOut.root.getMemoryUsage());
|
||||
}
|
||||
|
||||
athena::io::FileWriter w(outPath.getAbsolutePath());
|
||||
dcln.write(w);
|
||||
int64_t rem = w.position() % 32;
|
||||
if (rem)
|
||||
for (int64_t i=0 ; i<32-rem ; ++i)
|
||||
w.writeUByte(0xff);
|
||||
return true;
|
||||
}
|
||||
hecl::blender::Connection* conn = nullptr);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif // __DNAMP1_DCLN_HPP__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#define NOD_ATHENA 1
|
||||
#include "DNAMP1.hpp"
|
||||
@@ -46,9 +46,7 @@
|
||||
#include "MazeSeeds.hpp"
|
||||
#include "SnowForces.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
logvisor::Module Log("urde::DNAMP1");
|
||||
|
||||
@@ -432,4 +430,3 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK& pak, const PAK::En
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "PAK.hpp"
|
||||
#include "zeus/CMatrix4f.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
extern logvisor::Module Log;
|
||||
@@ -44,7 +42,6 @@ public:
|
||||
std::unordered_map<UniqueID32, hecl::ProjectPath>& pathOverrides) const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_HPP__
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#include "DeafBabe.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
void DeafBabe::BlenderInit(hecl::BlenderConnection::PyOutStream& os)
|
||||
void DeafBabe::BlenderInit(hecl::blender::PyOutStream& os)
|
||||
{
|
||||
os << "TYPE_COLORS = {'NoSFX':(0.0, 0.0, 0.0),\n"
|
||||
" 'Stone':(1.0, 0.43, 0.15),\n"
|
||||
@@ -232,4 +231,3 @@ void DeafBabe::BlenderInit(hecl::BlenderConnection::PyOutStream& os)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
#include "../DNACommon/DeafBabe.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct DeafBabe : BigDNA
|
||||
@@ -143,16 +141,15 @@ struct DeafBabe : BigDNA
|
||||
Vector<atVec3f, DNA_COUNT(vertCount)> verts;
|
||||
|
||||
/* Dummy MP2 member */
|
||||
void insertNoClimb(hecl::BlenderConnection::PyOutStream&) const {}
|
||||
void insertNoClimb(hecl::blender::PyOutStream&) const {}
|
||||
|
||||
static void BlenderInit(hecl::BlenderConnection::PyOutStream& os);
|
||||
void sendToBlender(hecl::BlenderConnection::PyOutStream& os) const
|
||||
static void BlenderInit(hecl::blender::PyOutStream& os);
|
||||
void sendToBlender(hecl::blender::PyOutStream& os) const
|
||||
{
|
||||
DeafBabeSendToBlender(os, *this);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_DEAFBABE_HPP_
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "EVNT.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
void EVNT::read(athena::io::IStreamReader& reader)
|
||||
@@ -96,4 +94,3 @@ size_t EVNT::binarySize(size_t __isz) const
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct EVNT : BigYAML
|
||||
@@ -107,7 +105,6 @@ struct EVNT : BigYAML
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_EVNT_HPP__
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "FRME.hpp"
|
||||
#include "../DNACommon/TXTR.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
void FRME::read(athena::io::IStreamReader& __dna_reader)
|
||||
{
|
||||
@@ -317,23 +316,23 @@ bool FRME::Extract(const SpecBase &dataSpec,
|
||||
PAKRouter<PAKBridge> &pakRouter,
|
||||
const PAK::Entry &entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void (const hecl::SystemChar *)> fileChanged)
|
||||
{
|
||||
FRME frme;
|
||||
frme.read(rs);
|
||||
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
|
||||
#if 0
|
||||
if (!force && outPath.isFile())
|
||||
return true;
|
||||
#endif
|
||||
|
||||
if (!conn.createBlend(outPath, hecl::BlenderConnection::BlendType::Frame))
|
||||
if (!conn.createBlend(outPath, hecl::blender::BlendType::Frame))
|
||||
return false;
|
||||
|
||||
hecl::BlenderConnection::PyOutStream os = conn.beginPythonOut(true);
|
||||
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
|
||||
|
||||
os << "import bpy, math, bmesh\n"
|
||||
"from mathutils import Matrix, Quaternion\n"
|
||||
@@ -718,4 +717,3 @@ bool FRME::Extract(const SpecBase &dataSpec,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "DNAMP1.hpp"
|
||||
#include <athena/FileWriter.hpp>
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FRME : BigDNA
|
||||
{
|
||||
@@ -299,11 +297,10 @@ struct FRME : BigDNA
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP1_FRME_HPP_
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "../DNACommon/PAK.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct HINT : BigYAML
|
||||
{
|
||||
@@ -58,5 +56,4 @@ struct HINT : BigYAML
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif // _DNAMP1_HINT_HPP_
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
#include "../DNACommon/MAPA.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct MAPA : DNAMAPA::MAPA
|
||||
@@ -20,16 +18,16 @@ struct MAPA : DNAMAPA::MAPA
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
MAPA mapa;
|
||||
mapa.read(rs);
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
return DNAMAPA::ReadMAPAToBlender(conn, mapa, outPath, pakRouter, entry, force);
|
||||
}
|
||||
|
||||
static bool Cook(const hecl::BlenderConnection::DataStream::MapArea& mapa, const hecl::ProjectPath& out)
|
||||
static bool Cook(const hecl::blender::MapArea& mapa, const hecl::ProjectPath& out)
|
||||
{
|
||||
return DNAMAPA::Cook<MAPA>(mapa, out);
|
||||
}
|
||||
@@ -39,6 +37,5 @@ struct MAPA : DNAMAPA::MAPA
|
||||
using MappableObject = DNAMAPA::MAPA::MappableObjectMP1_2;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
#include "../DNACommon/MAPU.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct MAPU : DNAMAPU::MAPU
|
||||
@@ -20,16 +18,15 @@ struct MAPU : DNAMAPU::MAPU
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
MAPU mapu;
|
||||
mapu.read(rs);
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
return DNAMAPU::ReadMAPUToBlender(conn, mapu, outPath, pakRouter, entry, force);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
#include "ScriptObjects/DoorArea.hpp"
|
||||
#include "Runtime/RetroTypes.hpp"
|
||||
#include "Runtime/World/ScriptObjectSupport.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
bool MLVL::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath,
|
||||
PAKRouter<PAKBridge>& pakRouter, const PAK::Entry& entry, bool force, hecl::BlenderToken& btok,
|
||||
PAKRouter<PAKBridge>& pakRouter, const PAK::Entry& entry, bool force, hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
MLVL mlvl;
|
||||
@@ -57,12 +56,12 @@ bool MLVL::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl:
|
||||
|
||||
athena::io::FileWriter writer(outPath.getWithExtension(_S(".yaml"), true).getAbsolutePath());
|
||||
mlvl.toYAMLStream(writer, static_cast<YAMLWriteMemberFn>(&MLVL::writeMeta));
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
return DNAMLVL::ReadMLVLToBlender(conn, mlvl, outPath, pakRouter, entry, force, fileChanged);
|
||||
}
|
||||
|
||||
bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPath, const World& wld,
|
||||
hecl::BlenderToken& btok)
|
||||
hecl::blender::Token& btok)
|
||||
{
|
||||
MLVL mlvl = {};
|
||||
athena::io::FileReader reader(inPath.getWithExtension(_S(".yaml"), true).getAbsolutePath());
|
||||
@@ -351,7 +350,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
||||
|
||||
bool MLVL::CookMAPW(const hecl::ProjectPath& outPath,
|
||||
const World& wld,
|
||||
hecl::BlenderToken& btok)
|
||||
hecl::blender::Token& btok)
|
||||
{
|
||||
std::vector<urde::SObjectTag> mapaTags;
|
||||
mapaTags.reserve(wld.areas.size());
|
||||
@@ -521,4 +520,3 @@ bool MLVL::CookSAVW(const hecl::ProjectPath& outPath,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "../DNACommon/MLVL.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct MLVL : BigYAML
|
||||
@@ -146,25 +144,24 @@ struct MLVL : BigYAML
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged);
|
||||
|
||||
using World = hecl::BlenderConnection::DataStream::World;
|
||||
using World = hecl::blender::World;
|
||||
|
||||
static bool Cook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
const World& wld,
|
||||
hecl::BlenderToken& btok);
|
||||
hecl::blender::Token& btok);
|
||||
|
||||
static bool CookMAPW(const hecl::ProjectPath& outPath,
|
||||
const World& wld,
|
||||
hecl::BlenderToken& btok);
|
||||
hecl::blender::Token& btok);
|
||||
|
||||
static bool CookSAVW(const hecl::ProjectPath& outPath,
|
||||
const World& wld);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_MLVL_HPP__
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <hecl/ClientProcess.hpp>
|
||||
#include <athena/MemoryReader.hpp>
|
||||
#include "hecl/ClientProcess.hpp"
|
||||
#include "athena/MemoryReader.hpp"
|
||||
#include "MREA.hpp"
|
||||
#include "SCLY.hpp"
|
||||
#include "PATH.hpp"
|
||||
@@ -9,15 +9,14 @@
|
||||
#include "zeus/CAABox.hpp"
|
||||
#include "DataSpec/DNACommon/AROTBuilder.hpp"
|
||||
#include "ScriptObjects/ScriptTypes.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
extern hecl::SystemString ExeDir;
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
void MREA::ReadBabeDeadToBlender_1_2(hecl::BlenderConnection::PyOutStream& os,
|
||||
void MREA::ReadBabeDeadToBlender_1_2(hecl::blender::PyOutStream& os,
|
||||
athena::io::IStreamReader& rs)
|
||||
{
|
||||
atUint32 bdMagic = rs.readUint32Big();
|
||||
@@ -60,7 +59,7 @@ void MREA::AddCMDLRigPairs(PAKEntryReadStream& rs,
|
||||
}
|
||||
|
||||
/* Collision octree dumper */
|
||||
static void OutputOctreeNode(hecl::BlenderConnection::PyOutStream& os, athena::io::MemoryReader& r,
|
||||
static void OutputOctreeNode(hecl::blender::PyOutStream& os, athena::io::MemoryReader& r,
|
||||
BspNodeType type, const zeus::CAABox& aabb)
|
||||
{
|
||||
if (type == BspNodeType::Branch)
|
||||
@@ -140,7 +139,7 @@ static void OutputOctreeNode(hecl::BlenderConnection::PyOutStream& os, athena::i
|
||||
static const uint32_t AROTChildCounts[] = { 0, 2, 2, 4, 2, 4, 4, 8 };
|
||||
|
||||
/* AROT octree dumper */
|
||||
static void OutputOctreeNode(hecl::BlenderConnection::PyOutStream& os, athena::io::MemoryReader& r,
|
||||
static void OutputOctreeNode(hecl::blender::PyOutStream& os, athena::io::MemoryReader& r,
|
||||
const zeus::CAABox& aabb)
|
||||
{
|
||||
r.readUint16Big();
|
||||
@@ -191,7 +190,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)>)
|
||||
{
|
||||
using RigPair = std::pair<CSKR*, CINF*>;
|
||||
@@ -205,12 +204,12 @@ bool MREA::Extract(const SpecBase& dataSpec,
|
||||
head.read(rs);
|
||||
rs.seekAlign32();
|
||||
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(outPath, hecl::BlenderConnection::BlendType::Area))
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(outPath, hecl::blender::BlendType::Area))
|
||||
return false;
|
||||
|
||||
/* Open Py Stream and read sections */
|
||||
hecl::BlenderConnection::PyOutStream os = conn.beginPythonOut(true);
|
||||
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
|
||||
os.format("import bpy\n"
|
||||
"import bmesh\n"
|
||||
"from mathutils import Vector\n"
|
||||
@@ -414,7 +413,7 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
|
||||
const std::vector<DNACMDL::Mesh>& meshes,
|
||||
const ColMesh& cMesh,
|
||||
const std::vector<Light>& lights,
|
||||
hecl::BlenderToken& btok)
|
||||
hecl::blender::Token& btok)
|
||||
{
|
||||
/* Discover area layers */
|
||||
hecl::ProjectPath areaDirPath = inPath.getParentPath();
|
||||
@@ -489,12 +488,12 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
|
||||
arotBuilder.build(secs, fullAabb, meshAabbs, meshes);
|
||||
|
||||
#if 0
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(inPath.getWithExtension(_S(".octree.blend"), true), hecl::BlenderConnection::BlendType::Area))
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(inPath.getWithExtension(_S(".octree.blend"), true), hecl::blender::Connection::BlendType::Area))
|
||||
return false;
|
||||
|
||||
/* Open Py Stream and read sections */
|
||||
hecl::BlenderConnection::PyOutStream os = conn.beginPythonOut(true);
|
||||
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
|
||||
os.format("import bpy\n"
|
||||
"import bmesh\n"
|
||||
"from mathutils import Vector\n"
|
||||
@@ -556,12 +555,12 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
|
||||
DeafBabeBuildFromBlender(collision, cMesh);
|
||||
|
||||
#if 0
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(inPath.getWithExtension(_S(".octree.blend"), true), hecl::BlenderConnection::BlendType::Area))
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
if (!conn.createBlend(inPath.getWithExtension(_S(".octree.blend"), true), hecl::blender::Connection::BlendType::Area))
|
||||
return false;
|
||||
|
||||
/* Open Py Stream and read sections */
|
||||
hecl::BlenderConnection::PyOutStream os = conn.beginPythonOut(true);
|
||||
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
|
||||
os.format("import bpy\n"
|
||||
"import bmesh\n"
|
||||
"from mathutils import Vector\n"
|
||||
@@ -704,7 +703,7 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
|
||||
w.writeUint32Big(mesh.pos.size());
|
||||
for (const auto& v : mesh.pos)
|
||||
{
|
||||
atVec3f xfPos = hecl::BlenderConnection::DataStream::MtxVecMul4RM(mesh.sceneXf, v);
|
||||
atVec3f xfPos = hecl::blender::MtxVecMul4RM(mesh.sceneXf, v);
|
||||
w.writeVec3fBig(xfPos);
|
||||
}
|
||||
|
||||
@@ -714,7 +713,7 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
|
||||
w.writeUint32Big(surf.verts.size());
|
||||
for (const DNACMDL::Mesh::Surface::Vert& vert : surf.verts)
|
||||
w.writeUint32Big(vert.iPos);
|
||||
const DNACMDL::Mesh::Material& mat = mesh.materialSets[0][surf.materialIdx];
|
||||
const DNACMDL::Material& mat = mesh.materialSets[0][surf.materialIdx];
|
||||
w.writeBool(mat.transparent);
|
||||
}
|
||||
}
|
||||
@@ -829,4 +828,3 @@ bool MREA::CookPath(const hecl::ProjectPath& outPath,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "CMDLMaterials.hpp"
|
||||
#include "CSKR.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct MREA
|
||||
@@ -101,7 +99,7 @@ struct MREA
|
||||
Value<float> unk9;
|
||||
};
|
||||
|
||||
static void ReadBabeDeadToBlender_1_2(hecl::BlenderConnection::PyOutStream& os,
|
||||
static void ReadBabeDeadToBlender_1_2(hecl::blender::PyOutStream& os,
|
||||
athena::io::IStreamReader& rs);
|
||||
|
||||
static void AddCMDLRigPairs(PAKEntryReadStream& rs,
|
||||
@@ -114,7 +112,7 @@ struct MREA
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool,
|
||||
hecl::BlenderToken& btok,
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)>);
|
||||
|
||||
static void Name(const SpecBase& dataSpec,
|
||||
@@ -122,8 +120,8 @@ struct MREA
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
PAK::Entry& entry);
|
||||
|
||||
using ColMesh = hecl::BlenderConnection::DataStream::ColMesh;
|
||||
using Light = hecl::BlenderConnection::DataStream::Light;
|
||||
using ColMesh = hecl::blender::ColMesh;
|
||||
using Light = hecl::blender::Light;
|
||||
|
||||
static bool Cook(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath,
|
||||
@@ -136,13 +134,12 @@ struct MREA
|
||||
const std::vector<DNACMDL::Mesh>& meshes,
|
||||
const ColMesh& cMesh,
|
||||
const std::vector<Light>& lights,
|
||||
hecl::BlenderToken& btok);
|
||||
hecl::blender::Token& btok);
|
||||
|
||||
static bool CookPath(const hecl::ProjectPath& outPath,
|
||||
const hecl::ProjectPath& inPath);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct MazeSeeds : BigYAML
|
||||
{
|
||||
@@ -15,6 +13,5 @@ struct MazeSeeds : BigYAML
|
||||
Value<atUint32> seeds[300];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_MAZESEEDS_HPP__
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
#include "DNAMP1.hpp"
|
||||
#include "PAK.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
void PAK::read(athena::io::IStreamReader& reader)
|
||||
@@ -180,4 +178,3 @@ std::string PAK::bestEntryName(const Entry& entry, bool& named) const
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
#include <nod/DiscBase.hpp>
|
||||
#include "../DNACommon/PAK.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct PAK : BigDNA
|
||||
@@ -59,7 +57,6 @@ struct PAK : BigDNA
|
||||
using IDType = UniqueID32;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_PAK_HPP__
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "../DNACommon/SAVWCommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Scan : BigYAML
|
||||
{
|
||||
@@ -34,6 +32,5 @@ struct SAVW : BigYAML
|
||||
Vector<Scan, DNA_COUNT(scanCount)> scans;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_SAVW_HPP__
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
static const std::vector<std::string> PaneNames =
|
||||
{
|
||||
@@ -209,6 +207,5 @@ struct SCAN : BigYAML
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "SCLY.hpp"
|
||||
#include "ScriptObjects/ScriptTypes.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
void SCLY::read(athena::io::IStreamReader& rs)
|
||||
@@ -221,4 +219,3 @@ const char* SCLY::ScriptLayer::DNAType()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "ScriptObjects/IScriptObject.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct SCLY : BigYAML
|
||||
{
|
||||
@@ -45,5 +43,4 @@ struct SCLY : BigYAML
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "STRG.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
const std::vector<FourCC> skLanguages = {FOURCC('ENGL'), FOURCC('FREN'), FOURCC('GERM'), FOURCC('SPAN'),
|
||||
@@ -571,4 +569,3 @@ void STRG::write(athena::io::YAMLDocWriter& writer) const
|
||||
|
||||
const char* STRG::DNAType() { return "urde::DNAMP1::STRG"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
#include "../DNACommon/STRG.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct STRG : ISTRG
|
||||
@@ -87,7 +85,6 @@ struct STRG : ISTRG
|
||||
void gatherDependencies(std::vector<hecl::ProjectPath> &pathsOut) const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_STRG_HPP__
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct AIJumpPoint : IScriptObject
|
||||
{
|
||||
@@ -19,6 +17,5 @@ struct AIJumpPoint : IScriptObject
|
||||
Value<float> unknown1;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
struct AIKeyframe : IScriptObject
|
||||
@@ -21,6 +19,5 @@ struct AIKeyframe : IScriptObject
|
||||
Value<float> unknown6;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
37
DataSpec/DNAMP1/ScriptObjects/Actor.cpp
Normal file
37
DataSpec/DNAMP1/ScriptObjects/Actor.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "Actor.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
zeus::CAABox Actor::getVISIAABB(hecl::blender::Token& btok) const
|
||||
{
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
zeus::CAABox aabbOut;
|
||||
|
||||
if (model)
|
||||
{
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(model);
|
||||
conn.openBlend(path);
|
||||
hecl::blender::DataStream ds = conn.beginData();
|
||||
auto aabb = ds.getMeshAABB();
|
||||
aabbOut = zeus::CAABox(aabb.first, aabb.second);
|
||||
}
|
||||
else if (animationParameters.animationCharacterSet)
|
||||
{
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(
|
||||
animationParameters.animationCharacterSet);
|
||||
conn.openBlend(path.getWithExtension(_S(".blend"), true));
|
||||
hecl::blender::DataStream ds = conn.beginData();
|
||||
auto aabb = ds.getMeshAABB();
|
||||
aabbOut = zeus::CAABox(aabb.first, aabb.second);
|
||||
}
|
||||
|
||||
if (aabbOut.min.x > aabbOut.max.x)
|
||||
return {};
|
||||
|
||||
zeus::CTransform xf = ConvertEditorEulerToTransform4f(scale, orientation, location);
|
||||
return aabbOut.getTransformedAABox(xf);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Actor : IScriptObject
|
||||
{
|
||||
@@ -65,37 +63,8 @@ struct Actor : IScriptObject
|
||||
actorParameters.scanIDs(scansOut);
|
||||
}
|
||||
|
||||
zeus::CAABox getVISIAABB(hecl::BlenderToken& btok) const
|
||||
{
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
zeus::CAABox aabbOut;
|
||||
|
||||
if (model)
|
||||
{
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(model);
|
||||
conn.openBlend(path);
|
||||
hecl::BlenderConnection::DataStream ds = conn.beginData();
|
||||
auto aabb = ds.getMeshAABB();
|
||||
aabbOut = zeus::CAABox(aabb.first, aabb.second);
|
||||
}
|
||||
else if (animationParameters.animationCharacterSet)
|
||||
{
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(
|
||||
animationParameters.animationCharacterSet);
|
||||
conn.openBlend(path.getWithExtension(_S(".blend"), true));
|
||||
hecl::BlenderConnection::DataStream ds = conn.beginData();
|
||||
auto aabb = ds.getMeshAABB();
|
||||
aabbOut = zeus::CAABox(aabb.first, aabb.second);
|
||||
}
|
||||
|
||||
if (aabbOut.min.x > aabbOut.max.x)
|
||||
return {};
|
||||
|
||||
zeus::CTransform xf = ConvertEditorEulerToTransform4f(scale, orientation, location);
|
||||
return aabbOut.getTransformedAABox(xf);
|
||||
}
|
||||
zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ActorContraption : IScriptObject
|
||||
{
|
||||
@@ -58,6 +56,5 @@ struct ActorContraption : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ActorKeyframe : IScriptObject
|
||||
{
|
||||
@@ -21,6 +19,5 @@ struct ActorKeyframe : IScriptObject
|
||||
Value<float> totalPlayback;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ActorRotate : IScriptObject
|
||||
{
|
||||
@@ -20,6 +18,5 @@ struct ActorRotate : IScriptObject
|
||||
Value<bool> active;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct AmbientAI : IScriptObject
|
||||
{
|
||||
@@ -53,6 +51,5 @@ struct AmbientAI : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct AreaAttributes : IScriptObject
|
||||
{
|
||||
@@ -35,6 +33,5 @@ struct AreaAttributes : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct AtomicAlpha : IScriptObject
|
||||
{
|
||||
@@ -63,6 +61,5 @@ struct AtomicAlpha : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct AtomicBeta : IScriptObject
|
||||
{
|
||||
@@ -76,6 +74,5 @@ struct AtomicBeta : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Babygoth : IScriptObject
|
||||
{
|
||||
@@ -139,6 +137,5 @@ struct Babygoth : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct BallTrigger : IScriptObject
|
||||
{
|
||||
@@ -23,6 +21,5 @@ struct BallTrigger : IScriptObject
|
||||
Value<bool> unknown6;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Beetle : IScriptObject
|
||||
{
|
||||
@@ -59,6 +57,5 @@ struct Beetle : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct BloodFlower : IScriptObject
|
||||
{
|
||||
@@ -97,6 +95,5 @@ struct BloodFlower : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Burrower : IScriptObject
|
||||
{
|
||||
@@ -80,6 +78,5 @@ struct Burrower : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -131,7 +131,10 @@ make_dnalist(liblist DNAMP1/ScriptObjects
|
||||
set(ScriptObjectsMP1_SOURCES
|
||||
ScriptTypes.hpp
|
||||
IScriptObject.cpp
|
||||
Parameters.cpp)
|
||||
Parameters.cpp
|
||||
Actor.cpp
|
||||
Platform.cpp
|
||||
DoorArea.cpp)
|
||||
|
||||
dataspec_add_list(DNAMP1/ScriptObjects ScriptObjectsMP1_SOURCES)
|
||||
list(APPEND ScriptObjectsMP1_SOURCES ${liblist})
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Camera : IScriptObject
|
||||
{
|
||||
@@ -29,6 +27,5 @@ struct Camera : IScriptObject
|
||||
Value<bool> unknown12;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraBlurKeyframe : IScriptObject
|
||||
{
|
||||
@@ -21,6 +19,5 @@ struct CameraBlurKeyframe : IScriptObject
|
||||
Value<float> timeOut;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraFilterKeyframe : IScriptObject
|
||||
{
|
||||
@@ -38,6 +36,5 @@ struct CameraFilterKeyframe : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraHint : IScriptObject
|
||||
{
|
||||
@@ -68,6 +66,5 @@ struct CameraHint : IScriptObject
|
||||
Value<float> controlInterpDur;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraHintTrigger : IScriptObject
|
||||
{
|
||||
@@ -21,6 +19,5 @@ struct CameraHintTrigger : IScriptObject
|
||||
Value<bool> unknown3;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraPitchVolume : IScriptObject
|
||||
{
|
||||
@@ -22,6 +20,5 @@ struct CameraPitchVolume : IScriptObject
|
||||
Value<float> unknown4;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraShaker : IScriptObject
|
||||
{
|
||||
@@ -23,6 +21,5 @@ struct CameraShaker : IScriptObject
|
||||
Value<bool> active;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CameraWaypoint : IScriptObject
|
||||
{
|
||||
@@ -20,6 +18,5 @@ struct CameraWaypoint : IScriptObject
|
||||
Value<atUint32> unknown3;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ChozoGhost : IScriptObject
|
||||
{
|
||||
@@ -86,6 +84,5 @@ struct ChozoGhost : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ColorModulate : IScriptObject
|
||||
{
|
||||
@@ -26,6 +24,5 @@ struct ColorModulate : IScriptObject
|
||||
Value<bool> unknown11;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ControllerAction : IScriptObject
|
||||
{
|
||||
@@ -18,6 +16,5 @@ struct ControllerAction : IScriptObject
|
||||
Value<bool> deactivateOnClose;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Counter : IScriptObject
|
||||
{
|
||||
@@ -19,6 +17,5 @@ struct Counter : IScriptObject
|
||||
Value<bool> unknown2;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct CoverPoint : IScriptObject
|
||||
{
|
||||
@@ -23,6 +21,5 @@ struct CoverPoint : IScriptObject
|
||||
Value<float> unknown6;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct DamageableTrigger : IScriptObject
|
||||
{
|
||||
@@ -51,7 +49,7 @@ struct DamageableTrigger : IScriptObject
|
||||
g_curSpec->flattenDependencies(colorTex, pathsOut);
|
||||
}
|
||||
|
||||
zeus::CAABox getVISIAABB(hecl::BlenderToken& btok) const
|
||||
zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const
|
||||
{
|
||||
zeus::CVector3f halfExtent = zeus::CVector3f(volume) / 2.f;
|
||||
zeus::CVector3f loc(location);
|
||||
@@ -59,6 +57,5 @@ struct DamageableTrigger : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Debris : IScriptObject
|
||||
{
|
||||
@@ -59,6 +57,5 @@ struct Debris : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct DebrisExtended : IScriptObject
|
||||
{
|
||||
@@ -92,6 +90,5 @@ struct DebrisExtended : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct DebugCameraWaypoint : IScriptObject
|
||||
{
|
||||
@@ -18,6 +16,5 @@ struct DebugCameraWaypoint : IScriptObject
|
||||
Value<atUint32> unknown1;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct DistanceFog : IScriptObject
|
||||
{
|
||||
@@ -22,6 +20,5 @@ struct DistanceFog : IScriptObject
|
||||
Value<bool> active;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Dock : IScriptObject
|
||||
{
|
||||
@@ -21,6 +19,5 @@ struct Dock : IScriptObject
|
||||
Value<bool> loadConnected;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct DockAreaChange : IScriptObject
|
||||
{
|
||||
@@ -17,6 +15,5 @@ struct DockAreaChange : IScriptObject
|
||||
Value<bool> unknown2;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
29
DataSpec/DNAMP1/ScriptObjects/DoorArea.cpp
Normal file
29
DataSpec/DNAMP1/ScriptObjects/DoorArea.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "DoorArea.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
|
||||
zeus::CAABox DoorArea::getVISIAABB(hecl::blender::Token& btok) const
|
||||
{
|
||||
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
||||
zeus::CAABox aabbOut;
|
||||
|
||||
if (animationParameters.animationCharacterSet)
|
||||
{
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(
|
||||
animationParameters.animationCharacterSet);
|
||||
conn.openBlend(path.getWithExtension(_S(".blend"), true));
|
||||
hecl::blender::DataStream ds = conn.beginData();
|
||||
auto aabb = ds.getMeshAABB();
|
||||
aabbOut = zeus::CAABox(aabb.first, aabb.second);
|
||||
}
|
||||
|
||||
if (aabbOut.min.x > aabbOut.max.x)
|
||||
return {};
|
||||
|
||||
zeus::CTransform xf = ConvertEditorEulerToTransform4f(scale, orientation, location);
|
||||
return aabbOut.getTransformedAABox(xf);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct DoorArea : IScriptObject
|
||||
{
|
||||
@@ -50,29 +48,8 @@ struct DoorArea : IScriptObject
|
||||
actorParameters.scanIDs(scansOut);
|
||||
}
|
||||
|
||||
zeus::CAABox getVISIAABB(hecl::BlenderToken& btok) const
|
||||
{
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
zeus::CAABox aabbOut;
|
||||
|
||||
if (animationParameters.animationCharacterSet)
|
||||
{
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(
|
||||
animationParameters.animationCharacterSet);
|
||||
conn.openBlend(path.getWithExtension(_S(".blend"), true));
|
||||
hecl::BlenderConnection::DataStream ds = conn.beginData();
|
||||
auto aabb = ds.getMeshAABB();
|
||||
aabbOut = zeus::CAABox(aabb.first, aabb.second);
|
||||
}
|
||||
|
||||
if (aabbOut.min.x > aabbOut.max.x)
|
||||
return {};
|
||||
|
||||
zeus::CTransform xf = ConvertEditorEulerToTransform4f(scale, orientation, location);
|
||||
return aabbOut.getTransformedAABox(xf);
|
||||
}
|
||||
zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Drone : IScriptObject
|
||||
{
|
||||
@@ -98,6 +96,5 @@ struct Drone : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Effect : IScriptObject
|
||||
{
|
||||
@@ -58,6 +56,5 @@ struct Effect : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ElectroMagneticPulse : IScriptObject
|
||||
{
|
||||
@@ -40,6 +38,5 @@ struct ElectroMagneticPulse : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct ElitePirate : IScriptObject
|
||||
{
|
||||
@@ -139,6 +137,5 @@ struct ElitePirate : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct EnergyBall : IScriptObject
|
||||
{
|
||||
@@ -81,6 +79,5 @@ struct EnergyBall : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct EnvFxDensityController : IScriptObject
|
||||
{
|
||||
@@ -18,6 +16,5 @@ struct EnvFxDensityController : IScriptObject
|
||||
Value<atUint32> unknown3;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Eyeball : IScriptObject
|
||||
{
|
||||
@@ -88,6 +86,5 @@ struct Eyeball : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FireFlea : IScriptObject
|
||||
{
|
||||
@@ -46,6 +44,5 @@ struct FireFlea : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FishCloud : IScriptObject
|
||||
{
|
||||
@@ -66,6 +64,5 @@ struct FishCloud : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FishCloudModifier : IScriptObject
|
||||
{
|
||||
@@ -21,6 +19,5 @@ struct FishCloudModifier : IScriptObject
|
||||
Value<float> unknown5;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Flaahgra : IScriptObject
|
||||
{
|
||||
@@ -90,6 +88,5 @@ struct Flaahgra : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FlaahgraTentacle : IScriptObject
|
||||
{
|
||||
@@ -43,6 +41,5 @@ struct FlaahgraTentacle : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FlickerBat : IScriptObject
|
||||
{
|
||||
@@ -47,6 +45,5 @@ struct FlickerBat : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FlyingPirate : IScriptObject
|
||||
{
|
||||
@@ -115,6 +113,5 @@ struct FlyingPirate : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct FogVolume : IScriptObject
|
||||
{
|
||||
@@ -21,6 +19,5 @@ struct FogVolume : IScriptObject
|
||||
Value<bool> unknown4;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Geemer : IScriptObject
|
||||
{
|
||||
@@ -53,6 +51,5 @@ struct Geemer : IScriptObject
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "IScriptObject.hpp"
|
||||
#include "Parameters.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
namespace DataSpec::DNAMP1
|
||||
{
|
||||
struct Generator : IScriptObject
|
||||
{
|
||||
@@ -22,6 +20,5 @@ struct Generator : IScriptObject
|
||||
Value<float> unknown7;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user