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

New atdna YAML handling

This commit is contained in:
Jack Andersen
2016-03-03 15:01:37 -10:00
parent f638b97810
commit 1884f89f53
14 changed files with 133 additions and 196 deletions

View File

@@ -90,11 +90,7 @@ public:
if (!g_PakRouter)
LogDNACommon.report(LogVisor::FatalError,
"UniqueIDBridge::setPakRouter must be called before translatePakIdToPath");
HECL::ProjectPath res = g_PakRouter->getWorking(id);
if (!res)
LogDNACommon.report(LogVisor::FatalError,
"unable to translate %s to path", id.toString().c_str());
return res;
return g_PakRouter->getWorking(id);
}
static HECL::ProjectPath MakePathFromString(const std::string& str)
{
@@ -126,7 +122,10 @@ public:
{
if (!operator bool())
return;
writer.writeString(nullptr, UniqueIDBridge::TranslatePakIdToPath(*this).getRelativePathUTF8());
HECL::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(*this);
if (!path)
return;
writer.writeString(nullptr, path.getRelativePathUTF8());
}
size_t binarySize(size_t __isz) const
{return __isz + 4;}
@@ -186,7 +185,10 @@ public:
{
if (!operator bool())
return;
writer.writeString(nullptr, UniqueIDBridge::TranslatePakIdToPath(*this).getRelativePathUTF8());
HECL::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(*this);
if (!path)
return;
writer.writeString(nullptr, path.getRelativePathUTF8());
}
size_t binarySize(size_t __isz) const
{return __isz + 8;}
@@ -267,7 +269,10 @@ public:
{
if (!operator bool())
return;
writer.writeString(nullptr, UniqueIDBridge::TranslatePakIdToPath(*this).getRelativePathUTF8());
HECL::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(*this);
if (!path)
return;
writer.writeString(nullptr, path.getRelativePathUTF8());
}
size_t binarySize(size_t __isz) const
{return __isz + 16;}