mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 17:44:56 +00:00
MSVC fixes
This commit is contained in:
@@ -48,7 +48,7 @@ ResExtractor PAKBridge::LookupExtractor(const DNAMP1::PAK::Entry& entry)
|
||||
switch (entry.type.toUint32())
|
||||
{
|
||||
case SBIG('STRG'):
|
||||
return {STRG::Extract<STRG>, ".as"};
|
||||
return {STRG::Extract, ".as"};
|
||||
case SBIG('TXTR'):
|
||||
return {TXTR::Extract, ".png"};
|
||||
}
|
||||
|
||||
@@ -141,6 +141,7 @@ void STRG::write(Athena::io::IStreamWriter& writer) const
|
||||
|
||||
bool STRG::readAngelScript(const AngelScript::asIScriptModule& in)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void STRG::writeAngelScript(std::ofstream& out) const
|
||||
|
||||
@@ -60,11 +60,32 @@ struct STRG : ISTRG, BigDNA
|
||||
#else
|
||||
return HECL::WideToUTF8(search->second->at(idx));
|
||||
#endif
|
||||
return std::string();
|
||||
return HECL::SystemString();
|
||||
}
|
||||
|
||||
bool readAngelScript(const AngelScript::asIScriptModule& in);
|
||||
void writeAngelScript(std::ofstream& out) const;
|
||||
|
||||
static bool Extract(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;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user