diff --git a/LEGO1/act1state.h b/LEGO1/act1state.h index 772d39c1..e2e8d3e1 100644 --- a/LEGO1/act1state.h +++ b/LEGO1/act1state.h @@ -23,6 +23,7 @@ class Act1State : public LegoState { }; inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; } + inline MxU32 GetUnknown18() { return m_unk0x18; } protected: undefined m_unk0x8[0x10]; // 0x8 diff --git a/LEGO1/isle.cpp b/LEGO1/isle.cpp index 3c6c23b2..687efa16 100644 --- a/LEGO1/isle.cpp +++ b/LEGO1/isle.cpp @@ -1,6 +1,7 @@ #include "isle.h" #include "act1state.h" +#include "ambulance.h" #include "islepathactor.h" #include "legocontrolmanager.h" #include "legogamestate.h" @@ -9,6 +10,8 @@ #include "legoutil.h" #include "mxnotificationmanager.h" #include "mxtransitionmanager.h" +#include "pizza.h" +#include "towtrack.h" DECOMP_SIZE_ASSERT(Isle, 0x140); @@ -90,10 +93,50 @@ MxResult Isle::Create(MxDSObject& p_dsObject) return result; } -// STUB: LEGO1 0x10030c10 +// FUNCTION: LEGO1 0x10030c10 MxLong Isle::Notify(MxParam& p_param) { - // TODO + if (m_unk0xf6) { + switch (((MxNotificationParam&) p_param).GetNotification()) { + case c_notificationEndAction: + return StopAction(p_param); + case c_notificationButtonUp: + case c_notificationButtonDown: + switch (m_act1state->GetUnknown18()) { + case 3: + return m_pizza->Notify(p_param); + case 10: + return m_ambulance->Notify(p_param); + default: + return 0; + } + case TYPE17: + return HandleType17Notification(p_param); + case TYPE18: + switch (m_act1state->GetUnknown18()) { + case 4: + return GetCurrentVehicle()->Notify(p_param); + case 8: + return m_towtrack->Notify(p_param); + case 10: + return m_ambulance->Notify(p_param); + } + case TYPE19: + return HandleType19Notification(p_param); + case TYPE20: + VTable0x68(TRUE); + return 0; + case MXTRANSITIONMANAGER_TRANSITIONENDED: + return HandleTransitionEnd(); + } + } + + return 0; +} + +// STUB: LEGO1 0x10030d90 +MxLong Isle::StopAction(MxParam& p_param) +{ return 0; } @@ -103,12 +146,30 @@ void Isle::Stop() // TODO } +// STUB: LGEO1 0x10031030 +MxLong Isle::HandleType17Notification(MxParam& p_param) +{ + return 0; +} + +// STUB: LEGO1 0x100315f0 +MxLong Isle::HandleType19Notification(MxParam& p_param) +{ + return 0; +} + // STUB: LEGO1 0x10031820 void Isle::VTable0x68(MxBool p_add) { // TODO } +// STUB: LEGO1 0x10031820 +MxLong Isle::HandleTransitionEnd() +{ + return 0; +} + // FUNCTION: LEGO1 0x10032f10 void Isle::VTable0x58(MxCore* p_object) { diff --git a/LEGO1/isle.h b/LEGO1/isle.h index 7b9f3987..c4625632 100644 --- a/LEGO1/isle.h +++ b/LEGO1/isle.h @@ -27,6 +27,7 @@ class Isle : public LegoWorld { virtual ~Isle() override; virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4 + MxLong StopAction(MxParam& p_param); // FUNCTION: LEGO1 0x10030910 inline virtual const char* ClassName() const override // vtable+0x0c @@ -42,13 +43,16 @@ class Isle : public LegoWorld { } virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18 virtual void Stop() override; // vtable+50 - virtual void VTable0x58(MxCore* p_object) override; // vtable+58 + MxLong HandleType17Notification(MxParam& p_param); + MxLong HandleType19Notification(MxParam& p_param); + virtual void VTable0x58(MxCore* p_object) override; // vtable+58 // FUNCTION: LEGO1 0x10030900 virtual MxBool VTable0x5c() override { return TRUE; } // vtable+5c // FUNCTION: LEGO1 0x10033170 - virtual void VTable0x60() override {} // vtable+60 - virtual MxBool VTable0x64() override; // vtable+64 - virtual void VTable0x68(MxBool p_add) override; // vtable+68 + virtual void VTable0x60() override {} // vtable+60 + virtual MxBool VTable0x64() override; // vtable+64 + virtual void VTable0x68(MxBool p_add) override; // vtable+68 + MxLong HandleTransitionEnd(); virtual void VTable0x6c(IslePathActor* p_actor); // vtable+6c inline void SetUnknown13c(MxU32 p_unk0x13c) { m_unk0x13c = p_unk0x13c; }