From e507f42717a83406a7b3128c6ebd20d5e6c0e9ae Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 18 Jun 2024 13:35:03 -0400 Subject: [PATCH] Implement/match LegoPlantManager::CreatePlant (#1039) * Implement/match LegoPlantManager::CreatePlant * Update names * Fix name * Fix * Fix --- .../legoomni/include/legoanimationmanager.h | 4 +- .../legoomni/include/legobuildingmanager.h | 2 +- LEGO1/lego/legoomni/include/legomain.h | 28 +-- .../lego/legoomni/include/legoplantmanager.h | 7 +- LEGO1/lego/legoomni/include/legoplants.h | 19 +- LEGO1/lego/legoomni/include/legoworld.h | 6 +- .../src/common/legoanimationmanager.cpp | 24 +-- .../src/common/legobuildingmanager.cpp | 6 +- .../legoomni/src/common/legoplantmanager.cpp | 67 +++++++- LEGO1/lego/legoomni/src/common/legoplants.cpp | 162 +++++++++--------- LEGO1/lego/legoomni/src/entity/legoworld.cpp | 16 +- .../src/entity/legoworldpresenter.cpp | 8 +- LEGO1/lego/legoomni/src/main/legomain.cpp | 72 ++++---- 13 files changed, 242 insertions(+), 179 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 018a0059..5038ac47 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -151,7 +151,7 @@ class LegoAnimationManager : public MxCore { void Resume(); void FUN_1005f6d0(MxBool p_unk0x400); void EnableCamAnims(MxBool p_enableCamAnims); - MxResult LoadScriptInfo(MxS32 p_scriptIndex); + MxResult LoadWorldInfo(MxS32 p_worldId); MxBool FindVehicle(const char* p_name, MxU32& p_index); MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info); MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info); @@ -244,7 +244,7 @@ class LegoAnimationManager : public MxCore { void FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404); void FUN_10064b50(MxLong p_time); - MxS32 m_scriptIndex; // 0x08 + MxS32 m_worldId; // 0x08 MxU16 m_animCount; // 0x0c MxU16 m_unk0x0e; // 0x0e MxU16 m_unk0x10; // 0x10 diff --git a/LEGO1/lego/legoomni/include/legobuildingmanager.h b/LEGO1/lego/legoomni/include/legobuildingmanager.h index 45cb8caf..5ca8a06f 100644 --- a/LEGO1/lego/legoomni/include/legobuildingmanager.h +++ b/LEGO1/lego/legoomni/include/legobuildingmanager.h @@ -67,7 +67,7 @@ class LegoBuildingManager : public MxCore { void Init(); void FUN_1002fa00(); - void UpdatePosition(MxS32 p_index, LegoWorld* p_world); + void CreateBuilding(MxS32 p_index, LegoWorld* p_world); void FUN_1002fb30(); MxResult Write(LegoStorage* p_storage); MxResult Read(LegoStorage* p_storage); diff --git a/LEGO1/lego/legoomni/include/legomain.h b/LEGO1/lego/legoomni/include/legomain.h index 95cf7324..eee96fb5 100644 --- a/LEGO1/lego/legoomni/include/legomain.h +++ b/LEGO1/lego/legoomni/include/legomain.h @@ -38,17 +38,17 @@ class LegoOmni : public MxOmni { }; // SIZE 0x1c - struct ScriptContainer { + struct WorldContainer { // FUNCTION: LEGO1 0x1005ac40 - ScriptContainer() + WorldContainer() { - m_index = -1; + m_id = -1; m_atomId = NULL; } - ScriptContainer(MxS32 p_index, const char* p_key, MxAtomId* p_atomId) + WorldContainer(MxS32 p_id, const char* p_key, MxAtomId* p_atomId) { - m_index = p_index; + m_id = p_id; if (p_key) { strcpy(m_key, p_key); @@ -58,18 +58,18 @@ class LegoOmni : public MxOmni { } // FUNCTION: LEGO1 0x1005ac50 - ScriptContainer& operator=(const ScriptContainer& p_container) + WorldContainer& operator=(const WorldContainer& p_container) { - m_index = p_container.m_index; + m_id = p_container.m_id; strcpy(m_key, p_container.m_key); m_atomId = p_container.m_atomId; return *this; } - inline MxS32 GetIndex() { return m_index; } + inline MxS32 GetId() { return m_id; } inline const char* GetKey() { return m_key; } - MxS32 m_index; // 0x00 + MxS32 m_id; // 0x00 char m_key[20]; // 0x04 MxAtomId* m_atomId; // 0x18 }; @@ -110,10 +110,10 @@ class LegoOmni : public MxOmni { void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags); void CreateBackgroundAudio(); void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId); - MxResult RegisterScripts(); - const char* GetScriptName(MxU32 p_index); - MxAtomId* GetScriptAtom(MxU32 p_index); - MxS32 GetScriptIndex(const char* p_key); + MxResult RegisterWorlds(); + const char* GetWorldName(MxU32 p_id); + MxAtomId* GetWorldAtom(MxU32 p_id); + MxS32 GetWorldId(const char* p_key); void DeleteAction(); static MxS32 GetCurrPathInfo(LegoPathBoundary**, MxS32&); @@ -154,7 +154,7 @@ class LegoOmni : public MxOmni { // LegoOmni::`scalar deleting destructor' private: - ScriptContainer* m_scripts; // 0x68 + WorldContainer* m_worlds; // 0x68 ViewLODListManager* m_viewLODListManager; // 0x6c LegoInputManager* m_inputManager; // 0x70 LegoTextureContainer* m_textureContainer; // 0x74 diff --git a/LEGO1/lego/legoomni/include/legoplantmanager.h b/LEGO1/lego/legoomni/include/legoplantmanager.h index 765e5e7e..2db3dc6e 100644 --- a/LEGO1/lego/legoomni/include/legoplantmanager.h +++ b/LEGO1/lego/legoomni/include/legoplantmanager.h @@ -8,6 +8,7 @@ class LegoEntity; class LegoPathBoundary; class LegoROI; class LegoStorage; +class LegoWorld; // VTABLE: LEGO1 0x100d6758 // SIZE 0x2c @@ -26,7 +27,7 @@ class LegoPlantManager : public MxCore { } void Init(); - void FUN_10026360(MxS32 p_scriptIndex); + void LoadWorldInfo(MxS32 p_worldId); void FUN_100263a0(undefined4 p_und); MxResult Write(LegoStorage* p_storage); MxResult Read(LegoStorage* p_storage); @@ -47,9 +48,11 @@ class LegoPlantManager : public MxCore { // LegoPlantManager::`scalar deleting destructor' private: + LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS32 p_worldId); + static char* g_customizeAnimFile; - undefined4 m_unk0x08; // 0x08 + MxS32 m_worldId; // 0x08 undefined m_unk0x0c; // 0x0c undefined m_unk0x10[0x17]; // 0x10 undefined m_unk0x24; // 0x24 diff --git a/LEGO1/lego/legoomni/include/legoplants.h b/LEGO1/lego/legoomni/include/legoplants.h index 638baea4..ee1ea49b 100644 --- a/LEGO1/lego/legoomni/include/legoplants.h +++ b/LEGO1/lego/legoomni/include/legoplants.h @@ -9,13 +9,14 @@ class LegoPathBoundary; // SIZE 0x54 struct LegoPlantInfo { - enum { - c_flag1 = 0x01, - c_flag2 = 0x02, - c_flag5 = 0x10, - c_flag6 = 0x20, - c_flag16 = 0x8000, - c_flag17 = 0x10000 + // See LegoOmni::RegisterWorlds for IDs + enum Worlds { + c_act1 = 1 << 0, + c_imain = 1 << 1, + c_ielev = 1 << 4, + c_iisle = 1 << 5, + c_act2 = 1 << 15, + c_act3 = 1 << 16 }; enum Variant { @@ -34,8 +35,8 @@ struct LegoPlantInfo { }; LegoEntity* m_entity; // 0x00 - MxU32 m_flags; // 0x04 - Variant m_variant; // 0x08 + MxU32 m_worlds; // 0x04 - see enum for possible bit flags + MxU8 m_variant; // 0x08 - see enum for possible values MxU32 m_sound; // 0x0c MxU32 m_move; // 0x10 MxU8 m_mood; // 0x14 diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index f1de12c9..0ae00795 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -90,12 +90,12 @@ class LegoWorld : public LegoEntity { inline LegoCameraController* GetCamera() { return m_cameraController; } inline LegoEntityList* GetEntityList() { return m_entityList; } - inline MxS32 GetScriptIndex() { return m_scriptIndex; } + inline MxS32 GetWorldId() { return m_worldId; } inline MxBool GetUnknown0xd0Empty() { return m_set0xd0.empty(); } inline list& GetROIList() { return m_roiList; } inline LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnimPresenter; } - inline void SetScriptIndex(MxS32 p_scriptIndex) { m_scriptIndex = p_scriptIndex; } + inline void SetWorldId(MxS32 p_worldId) { m_worldId = p_worldId; } // SYNTHETIC: LEGO1 0x1001dee0 // LegoWorld::`scalar deleting destructor' @@ -111,7 +111,7 @@ class LegoWorld : public LegoEntity { MxPresenterList m_controlPresenters; // 0xb8 MxCoreSet m_set0xd0; // 0xd0 list m_roiList; // 0xe0 - MxS32 m_scriptIndex; // 0xec + MxS32 m_worldId; // 0xec LegoHideAnimPresenter* m_hideAnimPresenter; // 0xf0 MxS16 m_startupTicks; // 0xf4 MxBool m_worldStarted; // 0xf6 diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 3c4545b5..ab48daef 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -415,7 +415,7 @@ void LegoAnimationManager::Suspend() m_animState = (AnimState*) GameState()->CreateState("AnimState"); } - if (m_scriptIndex == 0) { + if (m_worldId == 0) { m_animState->FUN_10065240(m_animCount, m_anims, m_lastExtraCharacterId); } @@ -494,7 +494,7 @@ void LegoAnimationManager::Resume() void LegoAnimationManager::Init() { m_unk0x402 = FALSE; - m_scriptIndex = -1; + m_worldId = -1; m_animCount = 0; m_anims = NULL; m_unk0x18 = 0; @@ -579,12 +579,12 @@ void LegoAnimationManager::EnableCamAnims(MxBool p_enableCamAnims) } // FUNCTION: LEGO1 0x1005f720 -MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex) +MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId) { MxResult result = FAILURE; MxS32 i, j, k; - if (m_scriptIndex != p_scriptIndex) { + if (m_worldId != p_worldId) { if (m_tranInfoList != NULL) { delete m_tranInfoList; m_tranInfoList = NULL; @@ -614,7 +614,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex) m_animState = (AnimState*) GameState()->CreateState("AnimState"); } - if (m_scriptIndex == 0) { + if (m_worldId == 0) { m_animState->FUN_10065240(m_animCount, m_anims, m_lastExtraCharacterId); } @@ -622,14 +622,14 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex) LegoFile file; - if (p_scriptIndex == -1) { + if (p_worldId == -1) { result = SUCCESS; goto done; } char filename[128]; char path[1024]; - sprintf(filename, "lego\\data\\%sinf.dta", Lego()->GetScriptName(p_scriptIndex)); + sprintf(filename, "lego\\data\\%sinf.dta", Lego()->GetWorldName(p_worldId)); sprintf(path, "%s", MxOmni::GetHD()); if (path[strlen(path) - 1] != '\\') { @@ -708,7 +708,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex) } } - m_scriptIndex = p_scriptIndex; + m_worldId = p_worldId; m_tranInfoList = new LegoTranInfoList(); m_tranInfoList2 = new LegoTranInfoList(); @@ -726,7 +726,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex) m_unk0x402 = FALSE; } - if (p_scriptIndex == 0) { + if (p_worldId == 0) { m_animState->FUN_100651d0(m_animCount, m_anims, m_lastExtraCharacterId); } } @@ -934,7 +934,7 @@ MxResult LegoAnimationManager::FUN_100605e0( { MxResult result = FAILURE; - if (m_scriptIndex != -1 && p_index < m_animCount && m_tranInfoList != NULL) { + if (m_worldId != -1 && p_index < m_animCount && m_tranInfoList != NULL) { PurgeExtra(FALSE); FUN_10062770(); @@ -983,7 +983,7 @@ MxResult LegoAnimationManager::FUN_100605e0( char buf[256]; sprintf(buf, "%s:%d", g_strANIMMAN_ID, tranInfo->m_index); - action.SetAtomId(*Lego()->GetScriptAtom(m_scriptIndex)); + action.SetAtomId(*Lego()->GetWorldAtom(m_worldId)); action.SetObjectId(animInfo.m_objectId); action.SetUnknown24(-1); action.AppendExtra(strlen(buf) + 1, buf); @@ -1050,7 +1050,7 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix char buf[256]; sprintf(buf, "%s:%d", g_strANIMMAN_ID, info->m_index); - action.SetAtomId(*Lego()->GetScriptAtom(m_scriptIndex)); + action.SetAtomId(*Lego()->GetWorldAtom(m_worldId)); action.SetObjectId(p_objectId); action.SetUnknown24(-1); action.AppendExtra(strlen(buf) + 1, buf); diff --git a/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp b/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp index be886496..ad4551c8 100644 --- a/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp @@ -263,7 +263,7 @@ void LegoBuildingManager::FUN_1002fa00() LegoWorld* world = CurrentWorld(); for (i = 0; i < sizeOfArray(g_buildingInfo); i++) { - UpdatePosition(i, world); + CreateBuilding(i, world); } if (g_buildingManagerConfig <= 1) { @@ -287,7 +287,7 @@ void LegoBuildingManager::FUN_1002fa00() // FUNCTION: LEGO1 0x1002fa90 // FUNCTION: BETA10 0x10063b88 -void LegoBuildingManager::UpdatePosition(MxS32 p_index, LegoWorld* p_world) +void LegoBuildingManager::CreateBuilding(MxS32 p_index, LegoWorld* p_world) { LegoEntity* entity = (LegoEntity*) p_world->Find("MxEntity", g_buildingInfo[p_index].m_variant); @@ -457,7 +457,7 @@ MxBool LegoBuildingManager::SwitchVariant(LegoEntity* p_entity) roi->SetVisibility(FALSE); info->m_variant = g_buildingInfoVariants[m_nextVariant]; - UpdatePosition(12, CurrentWorld()); + CreateBuilding(12, CurrentWorld()); if (info->m_entity != NULL) { info->m_entity->GetROI()->SetVisibility(TRUE); diff --git a/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp b/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp index 6be98452..793de4f5 100644 --- a/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp @@ -1,10 +1,23 @@ #include "legoplantmanager.h" +#include "legocharactermanager.h" #include "legoentity.h" #include "legoplants.h" +#include "legoworld.h" +#include "misc.h" + +#include DECOMP_SIZE_ASSERT(LegoPlantManager, 0x2c) +// GLOBAL: LEGO1 0x100f1660 +const char* g_plantLodNames[4][5] = { + {"flwrwht", "flwrblk", "flwryel", "flwrred", "flwrgrn"}, + {"treewht", "treeblk", "treeyel", "treered", "tree"}, + {"bushwht", "bushblk", "bushyel", "bushred", "bush"}, + {"palmwht", "palmblk", "palmyel", "palmred", "palm"} +}; + // GLOBAL: LEGO1 0x100f3188 char* LegoPlantManager::g_customizeAnimFile = NULL; @@ -31,16 +44,23 @@ void LegoPlantManager::Init() g_plantInfo[i] = g_plantInfoInit[i]; } - m_unk0x08 = -1; + m_worldId = -1; m_unk0x0c = 0; m_unk0x24 = 0; } -// STUB: LEGO1 0x10026360 +// FUNCTION: LEGO1 0x10026360 // FUNCTION: BETA10 0x100c5032 -void LegoPlantManager::FUN_10026360(MxS32 p_scriptIndex) +void LegoPlantManager::LoadWorldInfo(MxS32 p_worldId) { - // TODO + m_worldId = p_worldId; + LegoWorld* world = CurrentWorld(); + + for (MxS32 i = 0; i < sizeOfArray(g_plantInfo); i++) { + CreatePlant(i, world, p_worldId); + } + + m_unk0x0c = 0; } // STUB: LEGO1 0x100263a0 @@ -49,6 +69,45 @@ void LegoPlantManager::FUN_100263a0(undefined4 p_und) // TODO } +// FUNCTION: LEGO1 0x10026590 +// FUNCTION: BETA10 0x100c561e +LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS32 p_worldId) +{ + LegoEntity* entity = NULL; + + if (p_index < sizeOfArray(g_plantInfo)) { + MxU32 world = 1 << (MxU8) p_worldId; + + if (g_plantInfo[p_index].m_worlds & world && g_plantInfo[p_index].m_unk0x16 != 0) { + if (g_plantInfo[p_index].m_entity == NULL) { + char name[256]; + char lodName[256]; + + sprintf(name, "plant%d", p_index); + sprintf(lodName, "%s", g_plantLodNames[g_plantInfo[p_index].m_variant][g_plantInfo[p_index].m_color]); + + LegoROI* roi = CharacterManager()->CreateAutoROI(name, lodName, TRUE); + roi->SetVisibility(TRUE); + + entity = roi->GetEntity(); + entity->SetLocation( + g_plantInfo[p_index].m_position, + g_plantInfo[p_index].m_direction, + g_plantInfo[p_index].m_up, + FALSE + ); + entity->SetType(LegoEntity::e_plant); + g_plantInfo[p_index].m_entity = entity; + } + else { + entity = g_plantInfo[p_index].m_entity; + } + } + } + + return entity; +} + // STUB: LEGO1 0x10026720 // FUNCTION: BETA10 0x100c5918 MxResult LegoPlantManager::Write(LegoStorage* p_storage) diff --git a/LEGO1/lego/legoomni/src/common/legoplants.cpp b/LEGO1/lego/legoomni/src/common/legoplants.cpp index 8979614a..daa892ec 100644 --- a/LEGO1/lego/legoomni/src/common/legoplants.cpp +++ b/LEGO1/lego/legoomni/src/common/legoplants.cpp @@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(LegoPlantInfo, 0x54) // GLOBAL: LEGO1 0x100f16c8 LegoPlantInfo g_plantInfoInit[81] = { {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -29,7 +29,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -53,7 +53,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -77,7 +77,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -101,7 +101,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -125,7 +125,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -149,7 +149,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -173,7 +173,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -197,7 +197,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -221,7 +221,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -245,7 +245,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -269,7 +269,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -293,7 +293,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -317,7 +317,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -341,7 +341,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -365,7 +365,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -389,7 +389,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_bush, 3, 0, @@ -413,7 +413,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_bush, 3, 0, @@ -437,7 +437,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_bush, 3, 0, @@ -461,7 +461,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_bush, 3, 0, @@ -485,7 +485,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -509,7 +509,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -533,7 +533,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -557,7 +557,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -581,7 +581,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -605,7 +605,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -629,7 +629,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -653,7 +653,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -677,7 +677,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -701,7 +701,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -725,7 +725,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -749,7 +749,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -773,7 +773,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -797,7 +797,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -821,7 +821,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -845,7 +845,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -869,7 +869,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -893,7 +893,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -917,7 +917,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -941,7 +941,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -965,7 +965,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -989,7 +989,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1013,7 +1013,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1037,7 +1037,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1061,7 +1061,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1085,7 +1085,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1109,7 +1109,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1133,7 +1133,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1157,7 +1157,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1181,7 +1181,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_flower, 3, 0, @@ -1205,7 +1205,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1229,7 +1229,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1253,7 +1253,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1277,7 +1277,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1301,7 +1301,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1325,7 +1325,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1349,7 +1349,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1373,7 +1373,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1397,7 +1397,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1421,7 +1421,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1445,7 +1445,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1469,7 +1469,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1493,7 +1493,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1517,7 +1517,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1541,7 +1541,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1565,7 +1565,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1589,7 +1589,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1613,7 +1613,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1637,7 +1637,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_palm, 3, 0, @@ -1661,7 +1661,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -1685,7 +1685,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -1709,7 +1709,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -1733,7 +1733,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -1757,7 +1757,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -1781,7 +1781,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag1 | LegoPlantInfo::c_flag16 | LegoPlantInfo::c_flag17, + LegoPlantInfo::c_act1 | LegoPlantInfo::c_act2 | LegoPlantInfo::c_act3, LegoPlantInfo::e_tree, 3, 0, @@ -1805,7 +1805,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag2, + LegoPlantInfo::c_imain, LegoPlantInfo::e_flower, 3, 0, @@ -1829,7 +1829,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag2, + LegoPlantInfo::c_imain, LegoPlantInfo::e_flower, 3, 0, @@ -1853,7 +1853,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag5, + LegoPlantInfo::c_ielev, LegoPlantInfo::e_flower, 3, 0, @@ -1877,7 +1877,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag5, + LegoPlantInfo::c_ielev, LegoPlantInfo::e_flower, 3, 0, @@ -1901,7 +1901,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag6, + LegoPlantInfo::c_iisle, LegoPlantInfo::e_flower, 3, 0, @@ -1925,7 +1925,7 @@ LegoPlantInfo g_plantInfoInit[81] = { 1, 0}, {NULL, - LegoPlantInfo::c_flag6, + LegoPlantInfo::c_iisle, LegoPlantInfo::e_flower, 3, 0, diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 74236576..608ec193 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -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(); } diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index cc64360f..37488092 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -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)); } } } diff --git a/LEGO1/lego/legoomni/src/main/legomain.cpp b/LEGO1/lego/legoomni/src/main/legomain.cpp index a0cc4113..62a927ff 100644 --- a/LEGO1/lego/legoomni/src/main/legomain.cpp +++ b/LEGO1/lego/legoomni/src/main/legomain.cpp @@ -34,7 +34,7 @@ #include "viewmanager/viewmanager.h" DECOMP_SIZE_ASSERT(LegoOmni, 0x140) -DECOMP_SIZE_ASSERT(LegoOmni::ScriptContainer, 0x1c) +DECOMP_SIZE_ASSERT(LegoOmni::WorldContainer, 0x1c) DECOMP_SIZE_ASSERT(LegoWorldList, 0x18) DECOMP_SIZE_ASSERT(LegoWorldListCursor, 0x10) @@ -58,7 +58,7 @@ LegoOmni::~LegoOmni() void LegoOmni::Init() { MxOmni::Init(); - m_scripts = NULL; + m_worlds = NULL; m_inputManager = NULL; m_viewLODListManager = NULL; m_textureContainer = NULL; @@ -145,8 +145,8 @@ void LegoOmni::Destroy() m_action.ClearAtom(); DestroyScripts(); - if (m_scripts) { - delete[] m_scripts; + if (m_worlds) { + delete[] m_worlds; } MxOmni::Destroy(); @@ -235,7 +235,7 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) CreateScripts(); IslePathActor::RegisterSpawnLocations(); - result = RegisterScripts(); + result = RegisterWorlds(); if (result != SUCCESS) { goto done; @@ -264,33 +264,33 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) } // FUNCTION: LEGO1 0x1005a5f0 -MxResult LegoOmni::RegisterScripts() +MxResult LegoOmni::RegisterWorlds() { - m_scripts = new ScriptContainer[19]; + m_worlds = new WorldContainer[19]; - if (!m_scripts) { + if (!m_worlds) { return FAILURE; } - m_scripts[0] = ScriptContainer(); - m_scripts[1] = ScriptContainer(0, "ACT1", g_isleScript); - m_scripts[2] = ScriptContainer(1, "IMAIN", g_infomainScript); - m_scripts[3] = ScriptContainer(2, "ICUBE", g_infoscorScript); - m_scripts[4] = ScriptContainer(3, "IREG", g_regbookScript); - m_scripts[5] = ScriptContainer(4, "IELEV", g_elevbottScript); - m_scripts[6] = ScriptContainer(5, "IISLE", g_infodoorScript); - m_scripts[7] = ScriptContainer(6, "HOSP", g_hospitalScript); - m_scripts[8] = ScriptContainer(7, "POLICE", g_policeScript); - m_scripts[9] = ScriptContainer(8, "GMAIN", g_garageScript); - m_scripts[10] = ScriptContainer(9, "BLDH", g_copterScript); - m_scripts[11] = ScriptContainer(10, "BLDD", g_dunecarScript); - m_scripts[12] = ScriptContainer(11, "BLDJ", g_jetskiScript); - m_scripts[13] = ScriptContainer(12, "BLDR", g_racecarScript); - m_scripts[14] = ScriptContainer(13, "RACC", g_carraceScript); - m_scripts[15] = ScriptContainer(14, "RACJ", g_jetraceScript); - m_scripts[16] = ScriptContainer(15, "ACT2", g_act2mainScript); - m_scripts[17] = ScriptContainer(16, "ACT3", g_act3Script); - m_scripts[18] = ScriptContainer(17, "TEST", g_testScript); + m_worlds[0] = WorldContainer(); + m_worlds[1] = WorldContainer(0, "ACT1", g_isleScript); + m_worlds[2] = WorldContainer(1, "IMAIN", g_infomainScript); + m_worlds[3] = WorldContainer(2, "ICUBE", g_infoscorScript); + m_worlds[4] = WorldContainer(3, "IREG", g_regbookScript); + m_worlds[5] = WorldContainer(4, "IELEV", g_elevbottScript); + m_worlds[6] = WorldContainer(5, "IISLE", g_infodoorScript); + m_worlds[7] = WorldContainer(6, "HOSP", g_hospitalScript); + m_worlds[8] = WorldContainer(7, "POLICE", g_policeScript); + m_worlds[9] = WorldContainer(8, "GMAIN", g_garageScript); + m_worlds[10] = WorldContainer(9, "BLDH", g_copterScript); + m_worlds[11] = WorldContainer(10, "BLDD", g_dunecarScript); + m_worlds[12] = WorldContainer(11, "BLDJ", g_jetskiScript); + m_worlds[13] = WorldContainer(12, "BLDR", g_racecarScript); + m_worlds[14] = WorldContainer(13, "RACC", g_carraceScript); + m_worlds[15] = WorldContainer(14, "RACJ", g_jetraceScript); + m_worlds[16] = WorldContainer(15, "ACT2", g_act2mainScript); + m_worlds[17] = WorldContainer(16, "ACT3", g_act3Script); + m_worlds[18] = WorldContainer(17, "TEST", g_testScript); return SUCCESS; } @@ -474,11 +474,11 @@ MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value) } // FUNCTION: LEGO1 0x1005b430 -const char* LegoOmni::GetScriptName(MxU32 p_index) +const char* LegoOmni::GetWorldName(MxU32 p_id) { for (MxS32 i = 0; i < 19; i++) { - if (m_scripts[i].m_index == p_index) { - return m_scripts[i].m_key; + if (m_worlds[i].m_id == p_id) { + return m_worlds[i].m_key; } } @@ -486,11 +486,11 @@ const char* LegoOmni::GetScriptName(MxU32 p_index) } // FUNCTION: LEGO1 0x1005b460 -MxAtomId* LegoOmni::GetScriptAtom(MxU32 p_index) +MxAtomId* LegoOmni::GetWorldAtom(MxU32 p_id) { for (MxS32 i = 0; i < 19; i++) { - if (m_scripts[i].m_index == p_index) { - return m_scripts[i].m_atomId; + if (m_worlds[i].m_id == p_id) { + return m_worlds[i].m_atomId; } } @@ -498,11 +498,11 @@ MxAtomId* LegoOmni::GetScriptAtom(MxU32 p_index) } // FUNCTION: LEGO1 0x1005b490 -MxS32 LegoOmni::GetScriptIndex(const char* p_key) +MxS32 LegoOmni::GetWorldId(const char* p_key) { for (MxS32 i = 0; i < 19; i++) { - if ((MxS32) &m_scripts[i] != -4 && !strcmpi(m_scripts[i].GetKey(), p_key)) { - return m_scripts[i].GetIndex(); + if ((MxS32) &m_worlds[i] != -4 && !strcmpi(m_worlds[i].GetKey(), p_key)) { + return m_worlds[i].GetId(); } }