mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 20:27:42 +00:00
Athena YAML refactor
This commit is contained in:
@@ -67,18 +67,16 @@ struct STRG : ISTRG
|
||||
static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
|
||||
{
|
||||
std::unique_ptr<ISTRG> strg = LoadSTRG(rs);
|
||||
FILE* fp = hecl::Fopen(outPath.getAbsolutePath().c_str(), _S("wb"));
|
||||
strg->toYAMLFile(fp);
|
||||
fclose(fp);
|
||||
athena::io::FileWriter writer(outPath.getAbsolutePath());
|
||||
strg->toYAMLStream(writer);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath)
|
||||
{
|
||||
STRG strg;
|
||||
FILE* fp = hecl::Fopen(inPath.getAbsolutePath().c_str(), _S("rb"));
|
||||
strg.fromYAMLFile(fp);
|
||||
fclose(fp);
|
||||
athena::io::FileReader reader(inPath.getAbsolutePath());
|
||||
strg.fromYAMLStream(reader);
|
||||
athena::io::FileWriter ws(outPath.getAbsolutePath());
|
||||
strg.write(ws);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user