Add LegoOmni::World enum (#1252)

This commit is contained in:
Christian Semmler
2024-12-21 10:08:55 -07:00
committed by GitHub
parent 3e427ab03e
commit bcc41256f8
10 changed files with 93 additions and 70 deletions

View File

@@ -416,7 +416,7 @@ void LegoAnimationManager::Suspend()
m_animState = (AnimState*) GameState()->CreateState("AnimState");
}
if (m_worldId == 0) {
if (m_worldId == LegoOmni::e_act1) {
m_animState->InitFromAnims(m_animCount, m_anims, m_lastExtraCharacterId);
}
@@ -495,7 +495,7 @@ void LegoAnimationManager::Resume()
void LegoAnimationManager::Init()
{
m_unk0x402 = FALSE;
m_worldId = -1;
m_worldId = LegoOmni::e_undefined;
m_animCount = 0;
m_anims = NULL;
m_unk0x18 = 0;
@@ -580,7 +580,7 @@ void LegoAnimationManager::EnableCamAnims(MxBool p_enableCamAnims)
}
// FUNCTION: LEGO1 0x1005f720
MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId)
MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
{
MxResult result = FAILURE;
MxS32 i, j, k;
@@ -615,7 +615,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId)
m_animState = (AnimState*) GameState()->CreateState("AnimState");
}
if (m_worldId == 0) {
if (m_worldId == LegoOmni::e_act1) {
m_animState->InitFromAnims(m_animCount, m_anims, m_lastExtraCharacterId);
}
@@ -623,7 +623,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId)
LegoFile file;
if (p_worldId == -1) {
if (p_worldId == LegoOmni::e_undefined) {
result = SUCCESS;
goto done;
}
@@ -961,7 +961,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
{
MxResult result = FAILURE;
if (m_worldId != -1 && p_index < m_animCount && m_tranInfoList != NULL) {
if (m_worldId != LegoOmni::e_undefined && p_index < m_animCount && m_tranInfoList != NULL) {
PurgeExtra(FALSE);
FUN_10062770();

View File

@@ -78,14 +78,14 @@ void LegoPlantManager::Init()
g_plantInfo[i] = g_plantInfoInit[i];
}
m_worldId = -1;
m_worldId = LegoOmni::e_undefined;
m_unk0x0c = 0;
m_numEntries = 0;
}
// FUNCTION: LEGO1 0x10026360
// FUNCTION: BETA10 0x100c5032
void LegoPlantManager::LoadWorldInfo(MxS32 p_worldId)
void LegoPlantManager::LoadWorldInfo(LegoOmni::World p_worldId)
{
m_worldId = p_worldId;
LegoWorld* world = CurrentWorld();
@@ -98,7 +98,7 @@ void LegoPlantManager::LoadWorldInfo(MxS32 p_worldId)
}
// FUNCTION: LEGO1 0x100263a0
void LegoPlantManager::Reset(MxS32 p_worldId)
void LegoPlantManager::Reset(LegoOmni::World p_worldId)
{
MxU32 i;
DeleteObjects(g_sndAnimScript, SndanimScript::c_AnimC1, SndanimScript::c_AnimBld18);
@@ -113,7 +113,7 @@ void LegoPlantManager::Reset(MxS32 p_worldId)
RemovePlant(i, p_worldId);
}
m_worldId = -1;
m_worldId = LegoOmni::e_undefined;
m_unk0x0c = 0;
}
@@ -205,7 +205,7 @@ LegoPlantInfo* LegoPlantManager::GetInfoArray(MxS32& p_length)
// FUNCTION: LEGO1 0x10026590
// FUNCTION: BETA10 0x100c561e
LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS32 p_worldId)
LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId)
{
LegoEntity* entity = NULL;
@@ -244,7 +244,7 @@ LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS
// FUNCTION: LEGO1 0x100266c0
// FUNCTION: BETA10 0x100c5859
void LegoPlantManager::RemovePlant(MxS32 p_index, MxS32 p_worldId)
void LegoPlantManager::RemovePlant(MxS32 p_index, LegoOmni::World p_worldId)
{
if (p_index < sizeOfArray(g_plantInfo)) {
MxU32 world = 1 << (MxU8) p_worldId;