Implement/match LegoPlantManager::CreatePlant (#1039)

* Implement/match LegoPlantManager::CreatePlant

* Update names

* Fix name

* Fix

* Fix
This commit is contained in:
Christian Semmler
2024-06-18 13:35:03 -04:00
committed by GitHub
parent 1a46d370ec
commit e507f42717
13 changed files with 242 additions and 179 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -1,10 +1,23 @@
#include "legoplantmanager.h"
#include "legocharactermanager.h"
#include "legoentity.h"
#include "legoplants.h"
#include "legoworld.h"
#include "misc.h"
#include <stdio.h>
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)

View File

@@ -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,

View File

@@ -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();
}

View File

@@ -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));
}
}
}

View File

@@ -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 @@ done:
}
// 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();
}
}