diff --git a/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp index 04d91784..1407de1b 100644 --- a/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp @@ -40,11 +40,11 @@ void LegoActionControlPresenter::RepeatingTickle() #ifdef COMPAT_MODE { - MxAtomId atom(m_unk0x54.GetData(), MxAtomId::e_lowerCase2); + MxAtomId atom(m_unk0x54.GetData(), e_lowerCase2); InvokeAction(m_unk0x50, atom, m_unk0x64, NULL); } #else - InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), MxAtomId::e_lowerCase2), m_unk0x64, NULL); + InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), e_lowerCase2), m_unk0x64, NULL); #endif ProgressTickleState(e_done); } diff --git a/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp b/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp index 0aaee764..8e3d7526 100644 --- a/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp +++ b/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp @@ -106,7 +106,7 @@ // FUNCTION: LEGO1 0x10006e40 LegoObjectFactory::LegoObjectFactory() { -#define X(V) this->m_id##V = MxAtomId(#V, MxAtomId::e_exact); +#define X(V) this->m_id##V = MxAtomId(#V, e_exact); FOR_LEGOOBJECTFACTORY_OBJECTS(X) #undef X } @@ -114,7 +114,7 @@ LegoObjectFactory::LegoObjectFactory() // FUNCTION: LEGO1 0x10009a90 MxCore* LegoObjectFactory::Create(const char* p_name) { - MxAtomId atom(p_name, MxAtomId::e_exact); + MxAtomId atom(p_name, e_exact); #define X(V) \ if (this->m_id##V == atom) { \ diff --git a/LEGO1/lego/legoomni/src/common/legoutil.cpp b/LEGO1/lego/legoomni/src/common/legoutil.cpp index 71b5a187..fb207f50 100644 --- a/LEGO1/lego/legoomni/src/common/legoutil.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutil.cpp @@ -99,8 +99,7 @@ void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetE // FUNCTION: LEGO1 0x1003e670 MxBool CheckIfEntityExists(MxBool p_enable, const char* p_filename, MxS32 p_entityId) { - LegoWorld* world = - (LegoWorld*) FindEntityByAtomIdOrEntityId(MxAtomId(p_filename, MxAtomId::e_lowerCase2), p_entityId); + LegoWorld* world = (LegoWorld*) FindEntityByAtomIdOrEntityId(MxAtomId(p_filename, e_lowerCase2), p_entityId); if (world) { world->VTable0x68(p_enable); return TRUE; diff --git a/LEGO1/lego/legoomni/src/main/legoomni.cpp b/LEGO1/lego/legoomni/src/main/legoomni.cpp index cbf95b52..8d5ea831 100644 --- a/LEGO1/lego/legoomni/src/main/legoomni.cpp +++ b/LEGO1/lego/legoomni/src/main/legoomni.cpp @@ -298,34 +298,34 @@ LegoEntity* PickEntity(MxLong, MxLong) // FUNCTION: LEGO1 0x100528e0 void RegisterScripts() { - g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", MxAtomId::e_lowerCase2); - g_dunecarScript = new MxAtomId("\\lego\\scripts\\build\\dunecar", MxAtomId::e_lowerCase2); - g_jetskiScript = new MxAtomId("\\lego\\scripts\\build\\jetski", MxAtomId::e_lowerCase2); - g_racecarScript = new MxAtomId("\\lego\\scripts\\build\\racecar", MxAtomId::e_lowerCase2); - g_carraceScript = new MxAtomId("\\lego\\scripts\\race\\carrace", MxAtomId::e_lowerCase2); - g_carracerScript = new MxAtomId("\\lego\\scripts\\race\\carracer", MxAtomId::e_lowerCase2); - g_jetraceScript = new MxAtomId("\\lego\\scripts\\race\\jetrace", MxAtomId::e_lowerCase2); - g_jetracerScript = new MxAtomId("\\lego\\scripts\\race\\jetracer", MxAtomId::e_lowerCase2); - g_isleScript = new MxAtomId("\\lego\\scripts\\isle\\isle", MxAtomId::e_lowerCase2); - g_elevbottScript = new MxAtomId("\\lego\\scripts\\infocntr\\elevbott", MxAtomId::e_lowerCase2); - g_infodoorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infodoor", MxAtomId::e_lowerCase2); - g_infomainScript = new MxAtomId("\\lego\\scripts\\infocntr\\infomain", MxAtomId::e_lowerCase2); - g_infoscorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infoscor", MxAtomId::e_lowerCase2); - g_regbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\regbook", MxAtomId::e_lowerCase2); - g_histbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\histbook", MxAtomId::e_lowerCase2); - g_hospitalScript = new MxAtomId("\\lego\\scripts\\hospital\\hospital", MxAtomId::e_lowerCase2); - g_policeScript = new MxAtomId("\\lego\\scripts\\police\\police", MxAtomId::e_lowerCase2); - g_garageScript = new MxAtomId("\\lego\\scripts\\garage\\garage", MxAtomId::e_lowerCase2); - g_act2mainScript = new MxAtomId("\\lego\\scripts\\act2\\act2main", MxAtomId::e_lowerCase2); - g_act3Script = new MxAtomId("\\lego\\scripts\\act3\\act3", MxAtomId::e_lowerCase2); - g_jukeboxScript = new MxAtomId("\\lego\\scripts\\isle\\jukebox", MxAtomId::e_lowerCase2); - g_pz5Script = new MxAtomId("\\lego\\scripts\\isle\\pz5", MxAtomId::e_lowerCase2); - g_introScript = new MxAtomId("\\lego\\scripts\\intro", MxAtomId::e_lowerCase2); - g_testScript = new MxAtomId("\\lego\\scripts\\test\\test", MxAtomId::e_lowerCase2); - g_jukeboxwScript = new MxAtomId("\\lego\\scripts\\isle\\jukeboxw", MxAtomId::e_lowerCase2); - g_sndAnimScript = new MxAtomId("\\lego\\scripts\\sndanim", MxAtomId::e_lowerCase2); - g_creditsScript = new MxAtomId("\\lego\\scripts\\credits", MxAtomId::e_lowerCase2); - g_nocdSourceName = new MxAtomId("\\lego\\scripts\\nocd", MxAtomId::e_lowerCase2); + g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", e_lowerCase2); + g_dunecarScript = new MxAtomId("\\lego\\scripts\\build\\dunecar", e_lowerCase2); + g_jetskiScript = new MxAtomId("\\lego\\scripts\\build\\jetski", e_lowerCase2); + g_racecarScript = new MxAtomId("\\lego\\scripts\\build\\racecar", e_lowerCase2); + g_carraceScript = new MxAtomId("\\lego\\scripts\\race\\carrace", e_lowerCase2); + g_carracerScript = new MxAtomId("\\lego\\scripts\\race\\carracer", e_lowerCase2); + g_jetraceScript = new MxAtomId("\\lego\\scripts\\race\\jetrace", e_lowerCase2); + g_jetracerScript = new MxAtomId("\\lego\\scripts\\race\\jetracer", e_lowerCase2); + g_isleScript = new MxAtomId("\\lego\\scripts\\isle\\isle", e_lowerCase2); + g_elevbottScript = new MxAtomId("\\lego\\scripts\\infocntr\\elevbott", e_lowerCase2); + g_infodoorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infodoor", e_lowerCase2); + g_infomainScript = new MxAtomId("\\lego\\scripts\\infocntr\\infomain", e_lowerCase2); + g_infoscorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infoscor", e_lowerCase2); + g_regbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\regbook", e_lowerCase2); + g_histbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\histbook", e_lowerCase2); + g_hospitalScript = new MxAtomId("\\lego\\scripts\\hospital\\hospital", e_lowerCase2); + g_policeScript = new MxAtomId("\\lego\\scripts\\police\\police", e_lowerCase2); + g_garageScript = new MxAtomId("\\lego\\scripts\\garage\\garage", e_lowerCase2); + g_act2mainScript = new MxAtomId("\\lego\\scripts\\act2\\act2main", e_lowerCase2); + g_act3Script = new MxAtomId("\\lego\\scripts\\act3\\act3", e_lowerCase2); + g_jukeboxScript = new MxAtomId("\\lego\\scripts\\isle\\jukebox", e_lowerCase2); + g_pz5Script = new MxAtomId("\\lego\\scripts\\isle\\pz5", e_lowerCase2); + g_introScript = new MxAtomId("\\lego\\scripts\\intro", e_lowerCase2); + g_testScript = new MxAtomId("\\lego\\scripts\\test\\test", e_lowerCase2); + g_jukeboxwScript = new MxAtomId("\\lego\\scripts\\isle\\jukeboxw", e_lowerCase2); + g_sndAnimScript = new MxAtomId("\\lego\\scripts\\sndanim", e_lowerCase2); + g_creditsScript = new MxAtomId("\\lego\\scripts\\credits", e_lowerCase2); + g_nocdSourceName = new MxAtomId("\\lego\\scripts\\nocd", e_lowerCase2); } // FUNCTION: LEGO1 0x100530c0 @@ -638,7 +638,7 @@ MxEntity* LegoOmni::FindWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p { LegoWorld* foundEntity = NULL; if (strcmpi(p_id, g_current)) { - foundEntity = (LegoWorld*) FindByEntityIdOrAtomId(MxAtomId(p_id, MxAtomId::e_lowerCase2), p_entityId); + foundEntity = (LegoWorld*) FindByEntityIdOrAtomId(MxAtomId(p_id, e_lowerCase2), p_entityId); } else { foundEntity = this->m_currentWorld; diff --git a/LEGO1/omni/include/mxatomid.h b/LEGO1/omni/include/mxatomid.h index d276b51a..388ffce3 100644 --- a/LEGO1/omni/include/mxatomid.h +++ b/LEGO1/omni/include/mxatomid.h @@ -4,16 +4,16 @@ #include "mxatomidcounter.h" #include "mxtypes.h" +enum LookupMode { + e_exact = 0, + e_lowerCase, + e_upperCase, + e_lowerCase2, +}; + // SIZE 0x04 class MxAtomId { public: - enum LookupMode { - e_exact = 0, - e_lowerCase, - e_upperCase, - e_lowerCase2, - }; - __declspec(dllexport) MxAtomId(const char*, LookupMode); __declspec(dllexport) MxAtomId& operator=(const MxAtomId& p_atomId); __declspec(dllexport) ~MxAtomId(); diff --git a/LEGO1/omni/src/common/mxobjectfactory.cpp b/LEGO1/omni/src/common/mxobjectfactory.cpp index 838eb809..93f2e0a0 100644 --- a/LEGO1/omni/src/common/mxobjectfactory.cpp +++ b/LEGO1/omni/src/common/mxobjectfactory.cpp @@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db // FUNCTION: LEGO1 0x100b0d80 MxObjectFactory::MxObjectFactory() { -#define X(V) this->m_id##V = MxAtomId(#V, MxAtomId::e_exact); +#define X(V) this->m_id##V = MxAtomId(#V, e_exact); FOR_MXOBJECTFACTORY_OBJECTS(X) #undef X } @@ -28,7 +28,7 @@ MxObjectFactory::MxObjectFactory() MxCore* MxObjectFactory::Create(const char* p_name) { MxCore* object = NULL; - MxAtomId atom(p_name, MxAtomId::e_exact); + MxAtomId atom(p_name, e_exact); if (0) { } diff --git a/LEGO1/omni/src/stream/mxstreamcontroller.cpp b/LEGO1/omni/src/stream/mxstreamcontroller.cpp index cf6b6124..204bdab8 100644 --- a/LEGO1/omni/src/stream/mxstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxstreamcontroller.cpp @@ -82,7 +82,7 @@ MxResult MxStreamController::Open(const char* p_filename) MxAutoLocker lock(&m_criticalSection); MakeSourceName(sourceName, p_filename); - this->m_atom = MxAtomId(sourceName, MxAtomId::e_lowerCase2); + this->m_atom = MxAtomId(sourceName, e_lowerCase2); return SUCCESS; }