metaforce/DataSpec/DNAMP3/MAPA.hpp

38 lines
1.1 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2018-06-29 20:21:36 +00:00
#include "DataSpec/DNACommon/PAK.hpp"
#include "DataSpec/DNACommon/MAPA.hpp"
#include "DNAMP3.hpp"
2017-12-29 08:08:12 +00:00
namespace DataSpec::DNAMP3
{
struct MAPA : DNAMAPA::MAPA
{
static bool Extract(const SpecBase& dataSpec,
PAKEntryReadStream& rs,
2016-03-04 23:04:53 +00:00
const hecl::ProjectPath& outPath,
PAKRouter<PAKBridge>& pakRouter,
const PAK::Entry& entry,
bool force,
2017-12-29 08:08:12 +00:00
hecl::blender::Token& btok,
2016-03-04 23:04:53 +00:00
std::function<void(const hecl::SystemChar*)> fileChanged)
{
MAPA mapa;
mapa.read(rs);
2017-12-29 08:08:12 +00:00
hecl::blender::Connection& conn = btok.getBlenderConnection();
return DNAMAPA::ReadMAPAToBlender(conn, mapa, outPath, pakRouter, entry, force);
}
2017-03-20 05:09:53 +00:00
2017-12-29 08:08:12 +00:00
static bool Cook(const hecl::blender::MapArea& mapa, const hecl::ProjectPath& out)
2017-03-20 05:09:53 +00:00
{
return DNAMAPA::Cook<MAPA>(mapa, out);
}
static uint32_t Version() { return 5; }
using Header = DNAMAPA::MAPA::HeaderMP3;
using MappableObject = DNAMAPA::MAPA::MappableObjectMP3;
};
}