From 84902dba7c07bd49b1d56434ad1b1b441dc8e3f9 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 29 Mar 2024 14:00:45 -0400 Subject: [PATCH] match --- LEGO1/lego/legoomni/include/legoact2state.h | 4 ++-- .../src/infocenter/infocenterentity.cpp | 24 ++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoact2state.h b/LEGO1/lego/legoomni/include/legoact2state.h index dd99d1dc..e4898960 100644 --- a/LEGO1/lego/legoomni/include/legoact2state.h +++ b/LEGO1/lego/legoomni/include/legoact2state.h @@ -28,11 +28,11 @@ class LegoAct2State : public LegoState { // LegoAct2State::`scalar deleting destructor' inline undefined4 GetUnknown0x08() { return m_unk0x08; } - inline void SetUnknown0x0C(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; } + inline void SetUnknown0x0c(undefined p_unk0x0c) { m_unk0x0c = p_unk0x0c; } private: undefined4 m_unk0x08; // 0x08 - undefined4 m_unk0x0c; // 0x0c + undefined m_unk0x0c; // 0x0c }; #endif // LEGOACT2STATE_H diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenterentity.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenterentity.cpp index c6b29b3c..10c347d2 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenterentity.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenterentity.cpp @@ -23,36 +23,32 @@ DECOMP_SIZE_ASSERT(InfoCenterEntity, 0x68) // FUNCTION: LEGO1 0x100150c0 MxLong InfoCenterEntity::VTable0x50(MxParam& p_param) { - Isle* isle; - LegoAct2* act2; - Act3* act3; - Act1State* act1state; - LegoAct2State* act2state; - switch (GameState()->GetCurrentAct()) { - case LegoGameState::Act::e_act1: + case LegoGameState::Act::e_act1: { if (CurrentActor()->GetActorId() != GameState()->GetActorId()) { CurrentActor()->VTable0xe4(); } - isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle); + Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle); isle->FUN_10033350(); isle->SetDestLocation(LegoGameState::Area::e_infomain); - act1state = (Act1State*) GameState()->GetState("Act1State"); + Act1State* act1state = (Act1State*) GameState()->GetState("Act1State"); act1state->SetUnknown18(0); break; - case LegoGameState::Act::e_act2: - act2 = (LegoAct2*) FindWorld(*g_act2mainScript, Act2mainScript::c__Act2Main); + } + case LegoGameState::Act::e_act2: { + LegoAct2* act2 = (LegoAct2*) FindWorld(*g_act2mainScript, Act2mainScript::c__Act2Main); act2->SetUnknown0x1150(2); - act2state = (LegoAct2State*) GameState()->GetState("LegoAct2State"); + LegoAct2State* act2state = (LegoAct2State*) GameState()->GetState("LegoAct2State"); if (act2state) { - act2state->SetUnknown0x0C(0); + act2state->SetUnknown0x0c(0); } break; + } case LegoGameState::Act::e_act3: - act3 = (Act3*) FindWorld(*g_act3Script, Act3Script::c__Act3); + Act3* act3 = (Act3*) FindWorld(*g_act3Script, Act3Script::c__Act3); act3->SetUnknown4270(2); break; }