Clear unknowns in LegoPlantManager (#1587)

This commit is contained in:
Fabian Neundorf 2025-06-24 22:38:08 +02:00 committed by GitHub
parent ce85377f18
commit 8498c69af1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 13 deletions

View File

@ -54,7 +54,7 @@ public:
LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId); LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId);
MxBool DecrementCounter(LegoEntity* p_entity); MxBool DecrementCounter(LegoEntity* p_entity);
void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length); void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length);
MxResult FUN_10026410(); MxResult DetermineBoundaries();
void ClearCounters(); void ClearCounters();
void SetInitialCounters(); void SetInitialCounters();
@ -77,11 +77,11 @@ private:
static MxS32 g_maxMove[4]; static MxS32 g_maxMove[4];
static MxU32 g_maxSound; static MxU32 g_maxSound;
LegoOmni::World m_worldId; // 0x08 LegoOmni::World m_worldId; // 0x08
undefined m_unk0x0c; // 0x0c MxBool m_boundariesDetermined; // 0x0c
AnimEntry* m_entries[5]; // 0x10 AnimEntry* m_entries[5]; // 0x10
MxS8 m_numEntries; // 0x24 MxS8 m_numEntries; // 0x24
LegoWorld* m_world; // 0x28 LegoWorld* m_world; // 0x28
}; };
#endif // LEGOPLANTMANAGER_H #endif // LEGOPLANTMANAGER_H

View File

@ -83,7 +83,7 @@ void LegoPlantManager::Init()
} }
m_worldId = LegoOmni::e_undefined; m_worldId = LegoOmni::e_undefined;
m_unk0x0c = 0; m_boundariesDetermined = FALSE;
m_numEntries = 0; m_numEntries = 0;
} }
@ -98,7 +98,7 @@ void LegoPlantManager::LoadWorldInfo(LegoOmni::World p_worldId)
CreatePlant(i, world, p_worldId); CreatePlant(i, world, p_worldId);
} }
m_unk0x0c = 0; m_boundariesDetermined = FALSE;
} }
// FUNCTION: LEGO1 0x100263a0 // FUNCTION: LEGO1 0x100263a0
@ -119,12 +119,12 @@ void LegoPlantManager::Reset(LegoOmni::World p_worldId)
} }
m_worldId = LegoOmni::e_undefined; m_worldId = LegoOmni::e_undefined;
m_unk0x0c = 0; m_boundariesDetermined = FALSE;
} }
// FUNCTION: LEGO1 0x10026410 // FUNCTION: LEGO1 0x10026410
// FUNCTION: BETA10 0x100c50e9 // FUNCTION: BETA10 0x100c50e9
MxResult LegoPlantManager::FUN_10026410() MxResult LegoPlantManager::DetermineBoundaries()
{ {
// similar to LegoBuildingManager::FUN_10030630() // similar to LegoBuildingManager::FUN_10030630()
@ -192,7 +192,7 @@ MxResult LegoPlantManager::FUN_10026410()
} }
} }
m_unk0x0c = TRUE; m_boundariesDetermined = TRUE;
return SUCCESS; return SUCCESS;
} }
@ -200,8 +200,8 @@ MxResult LegoPlantManager::FUN_10026410()
// FUNCTION: BETA10 0x100c55e0 // FUNCTION: BETA10 0x100c55e0
LegoPlantInfo* LegoPlantManager::GetInfoArray(MxS32& p_length) LegoPlantInfo* LegoPlantManager::GetInfoArray(MxS32& p_length)
{ {
if (!m_unk0x0c) { if (!m_boundariesDetermined) {
FUN_10026410(); DetermineBoundaries();
} }
p_length = sizeOfArray(g_plantInfo); p_length = sizeOfArray(g_plantInfo);