mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Move enum to global namespace
This commit is contained in:
parent
a100c94a86
commit
bdf9677246
@ -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);
|
||||
}
|
||||
|
||||
@ -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) { \
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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) {
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user