IsleActor::Create, IsleActor::Notify (#779)

* IsleActor::Create, IsleActor::Notify

* fix pizzeria vtable

* clang-format

* fix pizza vtable

* fix annotation

* refactor, add annotations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach
2024-04-11 07:55:22 -04:00
committed by GitHub
parent 91ae26589a
commit 8cbb094b75
6 changed files with 116 additions and 20 deletions

View File

@@ -1,18 +1,57 @@
#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 = VTable0x6c();
break;
case c_notificationEndAction:
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
break;
case c_notificationButtonUp:
result = HandleButtonUp((MxNotificationParam&) p_param);
break;
case c_notificationButtonDown:
result = HandleButtonDown((MxNotificationParam&) p_param);
break;
case c_notificationType11:
result = VTable0x68();
break;
case c_notificationType18:
result = VTable0x70();
break;
case c_notificationType19:
result = VTable0x80(p_param);
break;
}
return result;
}