2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 17:47:43 +00:00

ANCS fixes and cleanup

This commit is contained in:
Jack Andersen
2015-08-08 13:24:17 -10:00
parent e0bf3a7024
commit 2d18e95a91
11 changed files with 155 additions and 638 deletions

View File

@@ -63,27 +63,13 @@ struct STRG : ISTRG, BigDNA
return HECL::SystemString();
}
bool readAngelScript(const AngelScript::asIScriptModule& in);
void writeAngelScript(std::ofstream& out) const;
static bool Extract(const SpecBase& dataspec, PAKEntryReadStream& rs, const HECL::ProjectPath& outPath)
{
STRG strg;
strg.read(rs);
std::ofstream strgOut(outPath.getAbsolutePath());
strg.writeAngelScript(strgOut);
return true;
}
static bool Cook(const HECL::ProjectPath& inPath, const HECL::ProjectPath& outPath)
{
STRG strg;
HECL::Database::ASUniqueModule mod = HECL::Database::ASUniqueModule::CreateFromPath(inPath);
if (!mod)
return false;
strg.readAngelScript(mod);
Athena::io::FileWriter ws(outPath.getAbsolutePath());
strg.write(ws);
return true;
}
};