2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-11-02 18:45:39 +00:00
|
|
|
|
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
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace DataSpec::DNAMP2 {
|
|
|
|
struct MAPA : DNAMAPA::MAPA {
|
|
|
|
static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath,
|
|
|
|
PAKRouter<PAKBridge>& pakRouter, const DNAMP2::PAK::Entry& entry, bool force,
|
|
|
|
hecl::blender::Token& btok, std::function<void(const hecl::SystemChar*)> fileChanged) {
|
|
|
|
MAPA mapa;
|
|
|
|
mapa.read(rs);
|
|
|
|
hecl::blender::Connection& conn = btok.getBlenderConnection();
|
|
|
|
return DNAMAPA::ReadMAPAToBlender(conn, mapa, outPath, pakRouter, entry, force);
|
|
|
|
}
|
2017-03-20 05:09:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
static bool Cook(const hecl::blender::MapArea& mapa, const hecl::ProjectPath& out) {
|
|
|
|
return DNAMAPA::Cook<MAPA>(mapa, out);
|
|
|
|
}
|
2017-03-20 05:09:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
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
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace DataSpec::DNAMP2
|