2023-06-29 04:10:08 -04:00
|
|
|
#include "isleactor.h"
|
2023-08-03 12:54:08 -04:00
|
|
|
|
2024-04-11 07:55:22 -04:00
|
|
|
#include "legoentity.h"
|
|
|
|
#include "legoworld.h"
|
|
|
|
#include "misc.h"
|
|
|
|
#include "mxnotificationparam.h"
|
2024-05-04 08:06:32 -04:00
|
|
|
#include "scripts.h"
|
2024-01-20 18:04:46 -05:00
|
|
|
|
2024-04-11 07:55:22 -04:00
|
|
|
DECOMP_SIZE_ASSERT(IsleActor, 0x7c)
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1002c780
|
2024-01-20 18:04:46 -05:00
|
|
|
MxResult IsleActor::Create(MxDSAction& p_dsAction)
|
|
|
|
{
|
2024-04-27 10:06:12 -04:00
|
|
|
MxResult result = LegoEntity::Create(p_dsAction);
|
2024-04-11 07:55:22 -04:00
|
|
|
|
2024-04-27 10:06:12 -04:00
|
|
|
if (result == SUCCESS) {
|
2024-04-11 07:55:22 -04:00
|
|
|
m_world = CurrentWorld();
|
|
|
|
|
|
|
|
if (!m_world) {
|
2024-04-27 10:06:12 -04:00
|
|
|
result = FAILURE;
|
2024-04-11 07:55:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-27 10:06:12 -04:00
|
|
|
return result;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-04-11 07:55:22 -04:00
|
|
|
// FUNCTION: LEGO1 0x1002c7b0
|
2024-12-03 17:51:03 -05:00
|
|
|
// FUNCTION: BETA10 0x1003622e
|
2024-01-20 18:04:46 -05:00
|
|
|
MxLong IsleActor::Notify(MxParam& p_param)
|
|
|
|
{
|
2024-04-11 07:55:22 -04:00
|
|
|
MxLong result = 0;
|
2024-12-03 17:51:03 -05:00
|
|
|
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
2024-04-11 07:55:22 -04:00
|
|
|
|
2024-12-03 17:51:03 -05:00
|
|
|
switch (param.GetNotification()) {
|
2024-04-11 07:55:22 -04:00
|
|
|
case c_notificationType0:
|
|
|
|
result = VTable0x6c();
|
|
|
|
break;
|
|
|
|
case c_notificationEndAction:
|
|
|
|
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
|
|
|
break;
|
|
|
|
case c_notificationButtonUp:
|
2024-06-16 10:47:53 -04:00
|
|
|
result = HandleButtonUp((LegoControlManagerNotificationParam&) p_param);
|
2024-04-11 07:55:22 -04:00
|
|
|
break;
|
|
|
|
case c_notificationButtonDown:
|
2024-06-16 10:47:53 -04:00
|
|
|
result = HandleButtonDown((LegoControlManagerNotificationParam&) p_param);
|
2024-04-11 07:55:22 -04:00
|
|
|
break;
|
2024-05-30 09:54:24 -04:00
|
|
|
case c_notificationClick:
|
|
|
|
result = HandleClick();
|
2024-04-11 07:55:22 -04:00
|
|
|
break;
|
2024-05-01 09:00:42 -04:00
|
|
|
case c_notificationEndAnim:
|
2024-06-16 10:47:53 -04:00
|
|
|
result = HandleEndAnim();
|
2024-04-11 07:55:22 -04:00
|
|
|
break;
|
2024-06-13 14:10:19 -04:00
|
|
|
case c_notificationPathStruct:
|
2024-06-16 10:47:53 -04:00
|
|
|
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
2024-04-11 07:55:22 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|