metaforce/DataSpec/DNAMP1/CMDL.hpp

38 lines
970 B
C++
Raw Normal View History

2015-07-25 03:43:49 +00:00
#ifndef _DNAMP1_CMDL_HPP_
#define _DNAMP1_CMDL_HPP_
#include "../DNACommon/DNACommon.hpp"
#include "../DNACommon/CMDL.hpp"
2015-07-25 03:43:49 +00:00
#include "CMDLMaterials.hpp"
#include "DNAMP1.hpp"
2015-08-13 07:29:00 +00:00
#include "CINF.hpp"
#include "CSKR.hpp"
2015-07-25 03:43:49 +00:00
namespace Retro
{
namespace DNAMP1
{
2015-07-28 02:24:36 +00:00
struct CMDL
2015-07-25 03:43:49 +00:00
{
2015-08-05 21:46:07 +00:00
static bool Extract(const SpecBase& dataSpec,
PAKEntryReadStream& rs,
const HECL::ProjectPath& outPath,
PAKRouter<PAKBridge>& pakRouter,
2015-08-11 23:32:02 +00:00
const PAK::Entry& entry,
bool force)
2015-07-28 02:24:36 +00:00
{
HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection();
if (!conn.createBlend(outPath.getAbsolutePath()))
return false;
2015-08-13 07:29:00 +00:00
DNACMDL::ReadCMDLToBlender<PAKRouter<PAKBridge>, MaterialSet, std::pair<CSKR*,CINF*>, 2>
2015-08-16 23:00:33 +00:00
(conn, rs, pakRouter, entry, dataSpec);
2015-08-05 21:46:07 +00:00
return conn.saveBlend();
2015-07-28 02:24:36 +00:00
}
2015-07-25 03:43:49 +00:00
};
}
}
#endif // _DNAMP1_CMDL_HPP_