2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 21:07:42 +00:00

Initial round of MREA cooking imps

This commit is contained in:
Jack Andersen
2016-08-09 16:52:00 -10:00
parent 9169cac38c
commit 7cd9ddfad9
12 changed files with 336 additions and 7 deletions

View File

@@ -36,15 +36,22 @@ size_t SCLY::binarySize(size_t __isz) const
return __EnumerateSize(__isz, layers);
}
void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter<PAKBridge> &pakRouter, bool force) const
void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter<PAKBridge>& pakRouter, bool force) const
{
for (atUint32 i = 0; i < layerCount; i++)
{
hecl::ProjectPath layerPath = pakRouter.getAreaLayerWorking(entry.id, i);
bool active;
hecl::ProjectPath layerPath = pakRouter.getAreaLayerWorking(entry.id, i, active);
if (layerPath.getPathType() == hecl::ProjectPath::Type::None)
layerPath.makeDir();
hecl::ProjectPath yamlFile = hecl::ProjectPath(layerPath, _S("objects.yaml"));
if (active)
{
hecl::ProjectPath activePath(layerPath, "!defaultactive");
fclose(hecl::Fopen(activePath.getAbsolutePath().c_str(), _S("wb")));
}
hecl::ProjectPath yamlFile(layerPath, _S("objects.yaml"));
if (force || yamlFile.getPathType() == hecl::ProjectPath::Type::None)
{
FILE* yaml = hecl::Fopen(yamlFile.getAbsolutePath().c_str(), _S("wb"));