diff --git a/LEGO1/lego/legoomni/include/isleactor.h b/LEGO1/lego/legoomni/include/isleactor.h index 5ddf79ac..6e337454 100644 --- a/LEGO1/lego/legoomni/include/isleactor.h +++ b/LEGO1/lego/legoomni/include/isleactor.h @@ -2,9 +2,11 @@ #define ISLEACTOR_H #include "legoactor.h" +#include "legoworld.h" +#include "mxactionnotificationparam.h" // VTABLE: LEGO1 0x100d5178 -// SIZE 0x78 +// SIZE 0x7c class IsleActor : public LegoActor { public: MxLong Notify(MxParam& p_param) override; // vtable+0x04 @@ -23,6 +25,30 @@ class IsleActor : public LegoActor { } MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + + // FUNCTION: LEGO1 0x1000e5f0 + virtual undefined4 VTable0x68() { return 0; } // vtable+0x68 + + // FUNCTION: LEGO1 0x1000e600 + virtual undefined4 VTable0x6c() { return 0; } // vtable+0x6c + + // FUNCTION: LEGO1 0x1000e610 + virtual undefined4 VTable0x70() { return 0; } // vtable+0x70 + + // FUNCTION: LEGO1 0x1000e620 + virtual undefined4 HandleEndAction(MxEndActionNotificationParam&) { return 0; } // vtable+0x74 + + // FUNCTION: LEGO1 0x1000e630 + virtual undefined4 HandleButtonDown(MxNotificationParam&) { return 0; } // vtable+0x78 + + // FUNCTION: LEGO1 0x1000e640 + virtual undefined4 HandleButtonUp(MxNotificationParam&) { return 0; } // vtable+0x7c + + // FUNCTION: LEGO1 0x1000e650 + virtual undefined4 VTable0x80(MxParam&) { return 0; } // vtable+0x80 + +private: + LegoWorld* m_world; // 0x78 }; // SYNTHETIC: LEGO1 0x1000e940 diff --git a/LEGO1/lego/legoomni/include/pizza.h b/LEGO1/lego/legoomni/include/pizza.h index 1b67bc6d..764a33a7 100644 --- a/LEGO1/lego/legoomni/include/pizza.h +++ b/LEGO1/lego/legoomni/include/pizza.h @@ -32,7 +32,6 @@ class Pizza : public IsleActor { // Pizza::`scalar deleting destructor' private: - undefined4 m_unk0x78; undefined4 m_unk0x7c; undefined4 m_unk0x80; undefined4 m_unk0x84; diff --git a/LEGO1/lego/legoomni/include/pizzeria.h b/LEGO1/lego/legoomni/include/pizzeria.h index ca09d7dc..f214b5d5 100644 --- a/LEGO1/lego/legoomni/include/pizzeria.h +++ b/LEGO1/lego/legoomni/include/pizzeria.h @@ -28,7 +28,6 @@ class Pizzeria : public IsleActor { // Pizzeria::`scalar deleting destructor' private: - undefined4 m_unk0x78; // 0x78 undefined4 m_unk0x7c; // 0x7c undefined4 m_unk0x80; // 0x80 }; diff --git a/LEGO1/lego/legoomni/src/actors/isleactor.cpp b/LEGO1/lego/legoomni/src/actors/isleactor.cpp index b6ac3556..faea5357 100644 --- a/LEGO1/lego/legoomni/src/actors/isleactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/isleactor.cpp @@ -1,18 +1,55 @@ #include "isleactor.h" -// NOTE: This is copied from base class LegoActor. IsleActor may in fact be larger but we don't know yet. -DECOMP_SIZE_ASSERT(IsleActor, 0x78) +#include "legoentity.h" +#include "legoomni.h" +#include "legoworld.h" +#include "misc.h" +#include "mxnotificationparam.h" -// STUB: LEGO1 0x1002c780 +DECOMP_SIZE_ASSERT(IsleActor, 0x7c) + +// FUNCTION: LEGO1 0x1002c780 MxResult IsleActor::Create(MxDSAction& p_dsAction) { - // TODO - return SUCCESS; + MxResult ret = LegoEntity::Create(p_dsAction); + + if (ret == SUCCESS) { + m_world = CurrentWorld(); + if (!m_world) { + ret = FAILURE; + } + } + return ret; } -// STUB: LEGO1 0x1002c7b0 +// FUNCTION: LEGO1 0x1002c7b0 MxLong IsleActor::Notify(MxParam& p_param) { - // TODO - return 0; + MxLong result = 0; + + switch (((MxNotificationParam&) p_param).GetNotification()) { + case c_notificationType0: + result = this->VTable0x6c(); + break; + case c_notificationEndAction: + result = this->HandleEndAction((MxEndActionNotificationParam&) p_param); + break; + case c_notificationButtonUp: + result = this->HandleButtonUp((MxNotificationParam&) p_param); + break; + case c_notificationButtonDown: + result = this->HandleButtonDown((MxNotificationParam&) p_param); + break; + case c_notificationType11: + result = this->VTable0x68(); + break; + case c_notificationType18: + result = this->VTable0x70(); + break; + case c_notificationType19: + result = this->VTable0x80((MxParam&) p_param); + break; + } + + return result; }