2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 04:27:42 +00:00

CMDL cooking updates

This commit is contained in:
Jack Andersen
2015-10-06 15:17:17 -10:00
parent cdeb1234c8
commit 3b7f7f2f3a
16 changed files with 63 additions and 30 deletions

View File

@@ -512,15 +512,6 @@ public:
float thisFac = ++count / fsz;
progress(bestNameView.sys_str().c_str(), thisFac);
HECL::ProjectPath cooked = getCooked(item.second);
if (force || cooked.getPathType() == HECL::ProjectPath::PT_NONE)
{
PAKEntryReadStream s = item.second->beginReadStream(*m_node);
FILE* fout = HECL::Fopen(cooked.getAbsolutePath().c_str(), _S("wb"));
fwrite(s.data(), 1, s.length(), fout);
fclose(fout);
}
HECL::ProjectPath working = getWorking(item.second, extractor);
if (extractor.func_a) /* Doesn't need PAKRouter access */
{
@@ -542,6 +533,17 @@ public:
});
}
}
/* Extract original cooked copy AFTER working so timestamps make
* the original a valid cached item */
HECL::ProjectPath cooked = getCooked(item.second);
if (force || cooked.getPathType() == HECL::ProjectPath::PT_NONE)
{
PAKEntryReadStream s = item.second->beginReadStream(*m_node);
FILE* fout = HECL::Fopen(cooked.getAbsolutePath().c_str(), _S("wb"));
fwrite(s.data(), 1, s.length(), fout);
fclose(fout);
}
}
}