mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 11:47:43 +00:00
Huge compile performance refactor
This commit is contained in:
@@ -8,9 +8,7 @@
|
||||
#include "CINF.hpp"
|
||||
#include "CSKR.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP2
|
||||
namespace DataSpec::DNAMP2
|
||||
{
|
||||
|
||||
struct CMDL
|
||||
@@ -21,33 +19,10 @@ struct CMDL
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const DNAMP1::PAK::Entry& entry,
|
||||
bool,
|
||||
hecl::BlenderToken& btok,
|
||||
std::function<void(const hecl::SystemChar*)>)
|
||||
{
|
||||
/* 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_2, 4>
|
||||
(conn, rs, pakRouter, entry, dataSpec, loadRp);
|
||||
return conn.saveBlend();
|
||||
}
|
||||
hecl::blender::Token& btok,
|
||||
std::function<void(const hecl::SystemChar*)>);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNAMP2_CMDL_HPP_
|
||||
|
||||
Reference in New Issue
Block a user