2015-11-02 18:45:39 +00:00
|
|
|
#ifndef __DNAMP2_MAPA_HPP__
|
|
|
|
#define __DNAMP2_MAPA_HPP__
|
|
|
|
|
2018-06-29 20:21:36 +00:00
|
|
|
#include "DataSpec/DNACommon/PAK.hpp"
|
|
|
|
#include "DataSpec/DNACommon/MAPA.hpp"
|
2015-11-25 00:21:58 +00:00
|
|
|
#include "DNAMP2.hpp"
|
2015-11-02 18:45:39 +00:00
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
namespace DataSpec::DNAMP2
|
2015-11-02 18:45:39 +00:00
|
|
|
{
|
2015-12-06 03:05:34 +00:00
|
|
|
struct MAPA : DNAMAPA::MAPA
|
2015-11-25 00:21:58 +00:00
|
|
|
{
|
|
|
|
static bool Extract(const SpecBase& dataSpec,
|
|
|
|
PAKEntryReadStream& rs,
|
2016-03-04 23:04:53 +00:00
|
|
|
const hecl::ProjectPath& outPath,
|
2015-11-25 00:21:58 +00:00
|
|
|
PAKRouter<PAKBridge>& pakRouter,
|
2018-09-03 00:46:16 +00:00
|
|
|
const DNAMP2::PAK::Entry& entry,
|
2015-11-25 00:21:58 +00:00
|
|
|
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)
|
2015-11-25 00:21:58 +00:00
|
|
|
{
|
|
|
|
MAPA mapa;
|
|
|
|
mapa.read(rs);
|
2017-12-29 08:08:12 +00:00
|
|
|
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
2015-11-25 00:21:58 +00:00
|
|
|
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 3; }
|
|
|
|
using Header = DNAMAPA::MAPA::HeaderMP2;
|
|
|
|
using MappableObject = DNAMAPA::MAPA::MappableObjectMP1_2;
|
2015-11-25 00:21:58 +00:00
|
|
|
};
|
2015-11-02 18:45:39 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|