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-01-20 18:04:46 -05:00
|
|
|
MxLong IsleActor::Notify(MxParam& p_param)
|
|
|
|
{
|
2024-04-11 07:55:22 -04:00
|
|
|
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;
|
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-04-11 07:55:22 -04:00
|
|
|
result = VTable0x70();
|
|
|
|
break;
|
|
|
|
case c_notificationType19:
|
|
|
|
result = VTable0x80(p_param);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|