2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 01:07:43 +00:00

temporary ID dumping hard-coded

This commit is contained in:
Jack Andersen
2015-10-25 16:31:09 -10:00
parent fb11af23c6
commit fa8b48d43e
16 changed files with 435 additions and 70 deletions

View File

@@ -71,12 +71,17 @@ bool MREA::Extract(const SpecBase& dataSpec,
const HECL::ProjectPath& outPath,
PAKRouter<PAKBridge>& pakRouter,
const PAK::Entry& entry,
bool,
bool force,
std::function<void(const HECL::SystemChar*)>)
{
using RigPair = std::pair<CSKR*, CINF*>;
RigPair dummy(nullptr, nullptr);
/* Rename MREA for consistency */
HECL::ProjectPath mreaPath(outPath.getParentPath(), _S("!area.blend"));
if (!force && mreaPath.getPathType() == HECL::ProjectPath::PT_FILE)
return true;
/* Do extract */
Header head;
head.read(rs);
@@ -99,7 +104,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
/* Start up blender connection */
HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection();
if (!conn.createBlend(outPath, HECL::BlenderConnection::TypeArea))
if (!conn.createBlend(mreaPath, HECL::BlenderConnection::TypeArea))
return false;
/* Open Py Stream and read sections */
@@ -267,7 +272,7 @@ bool MREA::ExtractLayerDeps(PAKEntryReadStream& rs, PAKBridge::Level::Area& area
for (; r<deps.depLayers[l] ; ++r)
layer.resources.emplace(deps.deps[r].id);
}
areaOut.resources.reserve(deps.depCount - r);
areaOut.resources.reserve(deps.depCount - r + 2);
for (; r<deps.depCount ; ++r)
areaOut.resources.emplace(deps.deps[r].id);