2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

Explicit Asset ID refactor

This commit is contained in:
Jack Andersen
2019-09-30 21:38:03 -10:00
parent c7ffe725ae
commit 16ca0d24c2
113 changed files with 1782 additions and 2057 deletions

View File

@@ -122,15 +122,7 @@
namespace urde {
static logvisor::Module Log("urde::ScriptLoader");
static SObjectTag MorphballDoorANCS = {};
static const SObjectTag& GetMorphballDoorACS() {
if (!MorphballDoorANCS) {
MorphballDoorANCS.type = FOURCC('ANCS');
MorphballDoorANCS.id = g_ResFactory->TranslateOriginalToNew(0x1F9DA858);
}
return MorphballDoorANCS;
}
constexpr SObjectTag MorphballDoorANCS = {FOURCC('ANCS'), 0x1F9DA858};
static bool EnsurePropertyCount(int count, int expected, const char* structName) {
if (count < expected) {
@@ -504,7 +496,7 @@ CEntity* ScriptLoader::LoadDoor(CStateManager& mgr, CInputStream& in, int propCo
bool isMorphballDoor = false;
if (propCount == 13) {
if (aParms.GetACSFile() == GetMorphballDoorACS().id)
if (aParms.GetACSFile() == MorphballDoorANCS.id)
isMorphballDoor = true;
} else if (propCount == 14)
isMorphballDoor = in.readBool();