2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 19:44:55 +00:00

Lots of reverse naming functionality added

This commit is contained in:
Jack Andersen
2015-10-26 14:19:03 -10:00
parent fa8b48d43e
commit d46f44cefa
92 changed files with 2396 additions and 41 deletions

View File

@@ -80,6 +80,29 @@ struct SCAN : BigYAML
fclose(fp);
return true;
}
static void Name(const SpecBase& dataSpec,
PAKEntryReadStream& rs,
PAKRouter<PAKBridge>& pakRouter,
PAK::Entry& entry)
{
SCAN scan;
scan.read(rs);
if (scan.string)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(scan.string);
ent->name = HECL::Format("SCAN_%s_strg", entry.id.toString().c_str());
}
for (int i=0 ; i<4 ; ++i)
{
const Texture& tex = scan.textures[i];
if (tex.texture)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(tex.texture);
ent->name = HECL::Format("SCAN_%s_tex%d", entry.id.toString().c_str(), i+1);
}
}
}
};
}
}