mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
Implement/match LegoPlantManager::CreatePlant (#1039)
* Implement/match LegoPlantManager::CreatePlant * Update names * Fix name * Fix * Fix
This commit is contained in:
committed by
GitHub
parent
1a46d370ec
commit
e507f42717
@@ -100,7 +100,7 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
SetIsWorldActive(TRUE);
|
||||
m_scriptIndex = -1;
|
||||
m_worldId = -1;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -177,8 +177,8 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_scriptIndex != -1 && m_set0xd0.empty()) {
|
||||
PlantManager()->FUN_100263a0(m_scriptIndex);
|
||||
if (m_worldId != -1 && m_set0xd0.empty()) {
|
||||
PlantManager()->FUN_100263a0(m_worldId);
|
||||
BuildingManager()->FUN_1002fb30();
|
||||
}
|
||||
|
||||
@@ -691,9 +691,9 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
Lego()->SetNavController(m_cameraController->GetNavController());
|
||||
}
|
||||
|
||||
if (m_scriptIndex != -1) {
|
||||
PlantManager()->FUN_10026360(m_scriptIndex);
|
||||
AnimationManager()->LoadScriptInfo(m_scriptIndex);
|
||||
if (m_worldId != -1) {
|
||||
PlantManager()->LoadWorldInfo(m_worldId);
|
||||
AnimationManager()->LoadWorldInfo(m_worldId);
|
||||
BuildingManager()->FUN_1002fa00();
|
||||
AnimationManager()->Resume();
|
||||
}
|
||||
@@ -714,8 +714,8 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
AnimationManager()->Reset(FALSE);
|
||||
m_set0xd0.insert(this);
|
||||
|
||||
if (m_scriptIndex != -1) {
|
||||
PlantManager()->FUN_100263a0(m_scriptIndex);
|
||||
if (m_worldId != -1) {
|
||||
PlantManager()->FUN_100263a0(m_worldId);
|
||||
BuildingManager()->FUN_1002fb30();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ LegoWorldPresenter::~LegoWorldPresenter()
|
||||
{
|
||||
MxBool result = FALSE;
|
||||
if (m_entity) {
|
||||
MxS32 scriptIndex = ((LegoWorld*) m_entity)->GetScriptIndex();
|
||||
PlantManager()->FUN_10026360(scriptIndex);
|
||||
AnimationManager()->LoadScriptInfo(scriptIndex);
|
||||
MxS32 worldId = ((LegoWorld*) m_entity)->GetWorldId();
|
||||
PlantManager()->LoadWorldInfo(worldId);
|
||||
AnimationManager()->LoadWorldInfo(worldId);
|
||||
BuildingManager()->FUN_1002fa00();
|
||||
result = ((LegoWorld*) m_entity)->VTable0x5c();
|
||||
}
|
||||
@@ -438,7 +438,7 @@ void LegoWorldPresenter::ParseExtra()
|
||||
if (KeyValueStringParse(output, g_strWORLD, extraCopy)) {
|
||||
char* worldKey = strtok(output, g_parseExtraTokens);
|
||||
LoadWorld(worldKey, (LegoWorld*) m_entity);
|
||||
((LegoWorld*) m_entity)->SetScriptIndex(Lego()->GetScriptIndex(worldKey));
|
||||
((LegoWorld*) m_entity)->SetWorldId(Lego()->GetWorldId(worldKey));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user