diff --git a/CMakeLists.txt b/CMakeLists.txt index f3455b11..c4475402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -337,6 +337,7 @@ function(add_lego_libraries NAME) LEGO1/lego/legoomni/src/actors/motorcycle.cpp LEGO1/lego/legoomni/src/actors/ambulance.cpp LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp + LEGO1/lego/legoomni/src/common/legovariables.cpp LEGO1/lego/legoomni/src/actors/pizza.cpp LEGO1/lego/legoomni/src/actors/act3ammo.cpp LEGO1/lego/legoomni/src/audio/legocachesoundmanager.cpp @@ -360,7 +361,6 @@ function(add_lego_libraries NAME) LEGO1/lego/legoomni/src/video/legophonemepresenter.cpp LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp LEGO1/lego/legoomni/src/worlds/legoact2.cpp - LEGO1/lego/legoomni/src/common/legovariables.cpp LEGO1/lego/legoomni/src/main/scripts.cpp LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp diff --git a/LEGO1/lego/legoomni/include/infocenterdoor.h b/LEGO1/lego/legoomni/include/infocenterdoor.h index 10caba7d..c9bb841b 100644 --- a/LEGO1/lego/legoomni/include/infocenterdoor.h +++ b/LEGO1/lego/legoomni/include/infocenterdoor.h @@ -16,6 +16,9 @@ class InfocenterDoor : public LegoWorld { MxLong Notify(MxParam& p_param) override; // vtable+0x04 + // FUNCTION: LEGO1 0x100377a0 + MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c + // FUNCTION: LEGO1 0x100377b0 // FUNCTION: BETA10 0x10032790 const char* ClassName() const override // vtable+0x0c @@ -32,12 +35,8 @@ class InfocenterDoor : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 - - // FUNCTION: LEGO1 0x100377a0 - MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c - - MxBool Escape() override; // vtable+0x64 - void Enable(MxBool p_enable) override; // vtable+0x68 + MxBool Escape() override; // vtable+0x64 + void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x100378d0 // InfocenterDoor::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/islepathactor.h b/LEGO1/lego/legoomni/include/islepathactor.h index e3a8bd37..46630e29 100644 --- a/LEGO1/lego/legoomni/include/islepathactor.h +++ b/LEGO1/lego/legoomni/include/islepathactor.h @@ -131,12 +131,6 @@ class IslePathActor : public LegoPathActor { void FUN_1001b660(); - void Reset() - { - m_roi->SetVisibility(TRUE); - SetActorState(c_initial); - } - void SetWorld(LegoWorld* p_world) { m_world = p_world; } static void RegisterSpawnLocations(); diff --git a/LEGO1/lego/legoomni/include/legocharactermanager.h b/LEGO1/lego/legoomni/include/legocharactermanager.h index cf9c7949..ae7d79c3 100644 --- a/LEGO1/lego/legoomni/include/legocharactermanager.h +++ b/LEGO1/lego/legoomni/include/legocharactermanager.h @@ -4,9 +4,9 @@ #include "decomp.h" #include "mxstl/stlcompat.h" #include "mxtypes.h" +#include "mxvariable.h" #include "roi/legoroi.h" -class CustomizeAnimFileVariable; class LegoActor; class LegoExtraActor; class LegoStorage; @@ -45,6 +45,15 @@ struct LegoActorInfo; typedef map LegoCharacterMap; +// VTABLE: LEGO1 0x100da878 +// SIZE 0x24 +class CustomizeAnimFileVariable : public MxVariable { +public: + CustomizeAnimFileVariable(const char* p_key); + + void SetValue(const char* p_value) override; // vtable+0x04 +}; + // SIZE 0x08 class LegoCharacterManager { public: diff --git a/LEGO1/lego/legoomni/include/legovariables.h b/LEGO1/lego/legoomni/include/legovariables.h index 1b5cd93b..9447a5f9 100644 --- a/LEGO1/lego/legoomni/include/legovariables.h +++ b/LEGO1/lego/legoomni/include/legovariables.h @@ -54,13 +54,4 @@ class WhoAmIVariable : public MxVariable { void SetValue(const char* p_value) override; // vtable+0x04 }; -// VTABLE: LEGO1 0x100da878 -// SIZE 0x24 -class CustomizeAnimFileVariable : public MxVariable { -public: - CustomizeAnimFileVariable(const char* p_key); - - void SetValue(const char* p_value) override; // vtable+0x04 -}; - #endif // LEGOVARIABLES_H diff --git a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp index c1b5694a..75e9b03a 100644 --- a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp @@ -100,7 +100,8 @@ void IslePathActor::Enter() // FUNCTION: BETA10 0x1003669f void IslePathActor::Exit() { - Reset(); + SetActorState(c_initial); + m_roi->SetVisibility(TRUE); GetViewManager()->Remove(m_roi); GetViewManager()->Add(m_roi); diff --git a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp index 295b90d7..8377e30f 100644 --- a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp @@ -3,9 +3,10 @@ #include "3dmanager/lego3dmanager.h" #include "legoactors.h" #include "legoanimactor.h" +#include "legobuildingmanager.h" #include "legoextraactor.h" #include "legogamestate.h" -#include "legovariables.h" +#include "legoplantmanager.h" #include "legovideomanager.h" #include "misc.h" #include "misc/legocontainer.h" @@ -21,6 +22,7 @@ DECOMP_SIZE_ASSERT(LegoCharacter, 0x08) DECOMP_SIZE_ASSERT(LegoCharacterManager, 0x08) +DECOMP_SIZE_ASSERT(CustomizeAnimFileVariable, 0x24) // GLOBAL: LEGO1 0x100fc4d0 MxU32 LegoCharacterManager::g_maxMove = 4; @@ -1086,3 +1088,21 @@ LegoROI* LegoCharacterManager::FUN_10085a80(const char* p_name, const char* p_lo { return CreateAutoROI(p_name, p_lodName, p_createEntity); } + +// FUNCTION: LEGO1 0x10085aa0 +CustomizeAnimFileVariable::CustomizeAnimFileVariable(const char* p_key) +{ + m_key = p_key; + m_key.ToUpperCase(); +} + +// FUNCTION: LEGO1 0x10085b50 +void CustomizeAnimFileVariable::SetValue(const char* p_value) +{ + // STRING: LEGO1 0x100fc4f4 + if (strcmp(m_key.GetData(), "CUSTOMIZE_ANIM_FILE") == 0) { + CharacterManager()->SetCustomizeAnimFile(p_value); + PlantManager()->SetCustomizeAnimFile(p_value); + BuildingManager()->SetCustomizeAnimFile(p_value); + } +} diff --git a/LEGO1/lego/legoomni/src/common/legovariables.cpp b/LEGO1/lego/legoomni/src/common/legovariables.cpp index 539983bf..68768e99 100644 --- a/LEGO1/lego/legoomni/src/common/legovariables.cpp +++ b/LEGO1/lego/legoomni/src/common/legovariables.cpp @@ -1,11 +1,8 @@ #include "legovariables.h" #include "3dmanager/lego3dmanager.h" -#include "legobuildingmanager.h" -#include "legocharactermanager.h" #include "legogamestate.h" #include "legonavcontroller.h" -#include "legoplantmanager.h" #include "legovideomanager.h" #include "misc.h" #include "roi/legoroi.h" @@ -14,7 +11,6 @@ DECOMP_SIZE_ASSERT(VisibilityVariable, 0x24) DECOMP_SIZE_ASSERT(CameraLocationVariable, 0x24) DECOMP_SIZE_ASSERT(CursorVariable, 0x24) DECOMP_SIZE_ASSERT(WhoAmIVariable, 0x24) -DECOMP_SIZE_ASSERT(CustomizeAnimFileVariable, 0x24) // GLOBAL: LEGO1 0x100f7ab0 // STRING: LEGO1 0x100f09c0 @@ -176,21 +172,3 @@ void WhoAmIVariable::SetValue(const char* p_value) GameState()->SetActorId(5); } } - -// FUNCTION: LEGO1 0x10085aa0 -CustomizeAnimFileVariable::CustomizeAnimFileVariable(const char* p_key) -{ - m_key = p_key; - m_key.ToUpperCase(); -} - -// FUNCTION: LEGO1 0x10085b50 -void CustomizeAnimFileVariable::SetValue(const char* p_value) -{ - // STRING: LEGO1 0x100fc4f4 - if (strcmp(m_key.GetData(), "CUSTOMIZE_ANIM_FILE") == 0) { - CharacterManager()->SetCustomizeAnimFile(p_value); - PlantManager()->SetCustomizeAnimFile(p_value); - BuildingManager()->SetCustomizeAnimFile(p_value); - } -}