diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 0441668e..9ab431fe 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -66,7 +66,7 @@ class LegoAnimationManager : public MxCore { return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name); } - void FUN_1005ee80(MxBool); + void Init(MxBool p_und); void FUN_1005ef10(); void FUN_1005f0b0(); void FUN_1005f6d0(MxBool); diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 0d5d8891..0296529e 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -148,10 +148,34 @@ LegoAnimationManager::~LegoAnimationManager() NotificationManager()->Unregister(this); } -// STUB: LEGO1 0x1005ee80 -void LegoAnimationManager::FUN_1005ee80(MxBool) +// FUNCTION: LEGO1 0x1005ee80 +// FUNCTION: BETA10 0x1003fbc0 +void LegoAnimationManager::Init(MxBool p_und) { - // TODO + m_unk0x402 = 0; + + if (p_und && m_animState != NULL) { + m_animState->SetFlag(); + } + + undefined unk0x42b = m_unk0x42b; + FUN_1005ef10(); + + if (m_tranInfoList != NULL) { + delete m_tranInfoList; + } + + if (m_tranInfoList2 != NULL) { + delete m_tranInfoList2; + } + + DeleteAnimations(); + Init(); + + m_unk0x42b = unk0x42b; + m_unk0x428 = m_unk0x3a; + m_unk0x429 = m_unk0x400; + m_unk0x42a = m_unk0x402; } // STUB: LEGO1 0x1005ef10 diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 7d75e043..32d6dfdc 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -1072,7 +1072,7 @@ void LegoGameState::Init() PlantManager()->Init(); BuildingManager()->Init(); CharacterManager()->Init(); - AnimationManager()->FUN_1005ee80(TRUE); + AnimationManager()->Init(TRUE); SetColors(); RemoveActor(); DeleteState(); diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index cfae9c2e..5d4f6869 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -646,7 +646,7 @@ void LegoWorld::Enable(MxBool p_enable) FUN_1001fc80(actor); } - AnimationManager()->FUN_1005ee80(FALSE); + AnimationManager()->Init(FALSE); m_set0xd0.insert(this); if (m_scriptIndex != -1) { diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 57573c97..3fb6fa73 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -1303,7 +1303,7 @@ void Infocenter::Reset() PlantManager()->FUN_10027120(); BuildingManager()->FUN_10030590(); - AnimationManager()->FUN_1005ee80(FALSE); + AnimationManager()->Init(FALSE); CharacterManager()->FUN_100832a0(); GameState()->SetCurrentAct(LegoGameState::e_act1); GameState()->SetPreviousArea(LegoGameState::e_undefined);