2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 20:27:42 +00:00

Refactor of CMDL to effectively share across games

This commit is contained in:
Jack Andersen
2015-08-09 15:53:24 -10:00
parent ca49972974
commit 310aa10116
19 changed files with 705 additions and 238 deletions

34
DataSpec/DNAMP2/CMDL.hpp Normal file
View File

@@ -0,0 +1,34 @@
#ifndef _DNAMP2_CMDL_HPP_
#define _DNAMP2_CMDL_HPP_
#include "../DNACommon/DNACommon.hpp"
#include "../DNACommon/CMDL.hpp"
#include "CMDLMaterials.hpp"
#include "DNAMP2.hpp"
namespace Retro
{
namespace DNAMP2
{
struct CMDL
{
static bool Extract(const SpecBase& dataSpec,
PAKEntryReadStream& rs,
const HECL::ProjectPath& outPath,
PAKRouter<PAKBridge>& pakRouter,
const DNAMP1::PAK::Entry& entry)
{
HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection();
if (!conn.createBlend(outPath.getAbsolutePath()))
return false;
DNACMDL::ReadCMDLToBlender<PAKRouter<PAKBridge>, MaterialSet, 4>
(conn, rs, pakRouter, entry, dataSpec.getMasterShaderPath());
return conn.saveBlend();
}
};
}
}
#endif // _DNAMP2_CMDL_HPP_