diff --git a/LEGO1/lego/legoomni/include/legoact2.h b/LEGO1/lego/legoomni/include/legoact2.h index 30da0c57..8788af3e 100644 --- a/LEGO1/lego/legoomni/include/legoact2.h +++ b/LEGO1/lego/legoomni/include/legoact2.h @@ -40,9 +40,12 @@ class LegoAct2State : public LegoState { // SYNTHETIC: LEGO1 0x1000e040 // LegoAct2State::`scalar deleting destructor' + // FUNCTION: BETA10 0x100151b0 + void SetUnknown0x08(undefined4 p_unk0x08) { m_unk0x08 = p_unk0x08; } + undefined4 GetUnknown0x08() { return m_unk0x08; } - // TODO: Most likely getters/setters are not used according to BETA. + // TODO: Most likely getters/setters are not used according to BETA. (?) undefined4 m_unk0x08; // 0x08 MxBool m_enabled; // 0x0c @@ -70,7 +73,7 @@ class LegoAct2 : public LegoWorld { MxResult FUN_100516b0(); void FUN_100517b0(); - undefined4 FUN_10051f20(); + MxResult BadEnding(); MxResult FUN_10052560( Act2mainScript::Script p_objectId, MxBool p_param2, diff --git a/LEGO1/lego/legoomni/src/actors/act2actor.cpp b/LEGO1/lego/legoomni/src/actors/act2actor.cpp index ddc660fc..8f4f85cb 100644 --- a/LEGO1/lego/legoomni/src/actors/act2actor.cpp +++ b/LEGO1/lego/legoomni/src/actors/act2actor.cpp @@ -527,7 +527,7 @@ undefined4 Act2Actor::FUN_10019700(MxFloat p_param) m_unk0x1e = 1; if (m_unk0x1d == 8) { - ((LegoAct2*) CurrentWorld())->FUN_10051f20(); + ((LegoAct2*) CurrentWorld())->BadEnding(); } return 1; diff --git a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp index 5d953d5d..ac8bd647 100644 --- a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp +++ b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp @@ -928,12 +928,24 @@ void LegoAct2::SpawnBricks() m_nextBrick++; } -// STUB: LEGO1 0x10051f20 -// STUB: BETA10 0x10013f48 -undefined4 LegoAct2::FUN_10051f20() +// FUNCTION: LEGO1 0x10051f20 +// FUNCTION: BETA10 0x10013f48 +MxResult LegoAct2::BadEnding() { - // TODO - return 0; + for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_bricks); i++) { + m_bricks[i].Remove(); + } + + LegoPathActor* actor = m_unk0x1138; + actor->SetState(LegoPathActor::c_bit3); + + m_gameState->SetUnknown0x08(104); + m_destLocation = LegoGameState::e_infomain; + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); + + MxTrace("Bad End of Act2\n"); + m_unk0x10c4 = 14; + return SUCCESS; } // FUNCTION: LEGO1 0x10051fa0