From fa6de9cb6bbe71129b4525384362d2988e633fab Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Thu, 3 Oct 2024 12:43:18 -0700 Subject: [PATCH] Implement/match Pizza::FUN_10038220 (#1107) --- LEGO1/lego/legoomni/include/pizza.h | 20 +++++++++---------- LEGO1/lego/legoomni/src/actors/pizza.cpp | 25 ++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/LEGO1/lego/legoomni/include/pizza.h b/LEGO1/lego/legoomni/include/pizza.h index 70dd2126..e8bd71c9 100644 --- a/LEGO1/lego/legoomni/include/pizza.h +++ b/LEGO1/lego/legoomni/include/pizza.h @@ -38,8 +38,7 @@ class PizzaMissionState : public LegoState { undefined m_unk0x03[3]; // 0x03 MxS16 m_unk0x06; // 0x06 undefined m_unk0x08[8]; // 0x08 - MxS16 m_unk0x10; // 0x10 - MxS16 m_unk0x12; // 0x12 + undefined4 m_unk0x10; // 0x10 MxS16 m_unk0x14; // 0x14 MxS16 m_unk0x16; // 0x16 MxS16 m_score; // 0x18 @@ -107,6 +106,7 @@ class Pizza : public IsleActor { void FUN_10038220(MxU32 p_objectId); void FUN_100382b0(); void FUN_10038380(); + void FUN_10038fe0(MxU32 p_objectId, MxBool); void SetSkateboard(SkateBoard* p_skateboard) { m_skateboard = p_skateboard; } @@ -114,14 +114,14 @@ class Pizza : public IsleActor { // Pizza::`scalar deleting destructor' private: - PizzaMissionState* m_state; // 0x7c - undefined4 m_unk0x80; // 0x80 - SkateBoard* m_skateboard; // 0x84 - Act1State* m_act1state; // 0x88 - undefined4 m_unk0x8c; // 0x8c - undefined4 m_unk0x90; // 0x90 - undefined4 m_unk0x94; // 0x94 - undefined m_unk0x98; // 0x98 + PizzaMissionState* m_state; // 0x7c + PizzaMissionState::Entry* m_entry; // 0x80 + SkateBoard* m_skateboard; // 0x84 + Act1State* m_act1state; // 0x88 + undefined4 m_unk0x8c; // 0x8c + undefined4 m_unk0x90; // 0x90 + undefined4 m_unk0x94; // 0x94 + undefined m_unk0x98; // 0x98 }; #endif // PIZZA_H diff --git a/LEGO1/lego/legoomni/src/actors/pizza.cpp b/LEGO1/lego/legoomni/src/actors/pizza.cpp index e634891b..593d7f74 100644 --- a/LEGO1/lego/legoomni/src/actors/pizza.cpp +++ b/LEGO1/lego/legoomni/src/actors/pizza.cpp @@ -1,6 +1,8 @@ #include "pizza.h" +#include "isle.h" #include "isle_actions.h" +#include "legoanimationmanager.h" #include "legogamestate.h" #include "legoworld.h" #include "misc.h" @@ -11,11 +13,14 @@ DECOMP_SIZE_ASSERT(Pizza, 0x9c) DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb4) DECOMP_SIZE_ASSERT(PizzaMissionState::Entry, 0x20) +// Flags used in isle.cpp +extern MxU32 g_isleFlags; + // FUNCTION: LEGO1 0x10037ef0 Pizza::Pizza() { m_state = NULL; - m_unk0x80 = 0; + m_entry = NULL; m_skateboard = NULL; m_act1state = NULL; m_unk0x8c = -1; @@ -56,9 +61,19 @@ void Pizza::CreateState() } } -// STUB: LEGO1 0x10038220 +// FUNCTION: LEGO1 0x10038220 void Pizza::FUN_10038220(MxU32 p_objectId) { + AnimationManager()->FUN_10064740(NULL); + m_entry = m_state->GetState(GameState()->GetActorId()); + m_state->m_unk0x0c = 1; + m_act1state->m_unk0x018 = 3; + m_entry->m_unk0x10 = 0x80000000; + g_isleFlags &= ~Isle::c_playMusic; + AnimationManager()->EnableCamAnims(FALSE); + AnimationManager()->FUN_1005f6d0(FALSE); + FUN_10038fe0(p_objectId, FALSE); + m_unk0x8c = -1; } // STUB: LEGO1 0x100382b0 @@ -99,6 +114,12 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam&) return 0; } +// STUB: LEGO1 0x10038fe0 +void Pizza::FUN_10038fe0(MxU32 p_objectId, MxBool) +{ + // TODO +} + // STUB: LEGO1 0x10039030 PizzaMissionState::PizzaMissionState() {