2023-06-29 04:10:08 -04:00
|
|
|
#include "islepathactor.h"
|
2023-08-03 14:10:54 -04:00
|
|
|
|
2024-04-12 07:02:32 -04:00
|
|
|
#include "legoanimationmanager.h"
|
|
|
|
#include "legonavcontroller.h"
|
2024-04-25 10:00:58 -04:00
|
|
|
#include "legopathboundary.h"
|
2024-04-12 07:02:32 -04:00
|
|
|
#include "legoutils.h"
|
|
|
|
#include "misc.h"
|
2024-03-25 07:43:03 -04:00
|
|
|
#include "mxnotificationparam.h"
|
|
|
|
|
2023-08-03 14:10:54 -04:00
|
|
|
DECOMP_SIZE_ASSERT(IslePathActor, 0x160)
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x1001a200
|
2023-08-03 14:10:54 -04:00
|
|
|
IslePathActor::IslePathActor()
|
|
|
|
{
|
2024-03-25 07:43:03 -04:00
|
|
|
m_world = NULL;
|
|
|
|
m_unk0x13c = 6.0;
|
|
|
|
m_unk0x15c = 1.0;
|
|
|
|
m_unk0x158 = 0;
|
2023-08-03 14:10:54 -04:00
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x1001a280
|
2024-01-13 15:00:11 -05:00
|
|
|
MxResult IslePathActor::Create(MxDSAction& p_dsAction)
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2024-01-13 15:00:11 -05:00
|
|
|
return MxEntity::Create(p_dsAction);
|
2023-10-24 08:37:02 -04:00
|
|
|
}
|
|
|
|
|
2024-01-14 16:28:46 -05:00
|
|
|
// FUNCTION: LEGO1 0x1001a2a0
|
|
|
|
void IslePathActor::Destroy(MxBool p_fromDestructor)
|
|
|
|
{
|
2024-02-01 15:42:10 -05:00
|
|
|
if (!p_fromDestructor) {
|
2024-01-14 16:28:46 -05:00
|
|
|
LegoPathActor::Destroy(FALSE);
|
2024-02-01 15:42:10 -05:00
|
|
|
}
|
2024-01-14 16:28:46 -05:00
|
|
|
}
|
|
|
|
|
2024-03-25 07:43:03 -04:00
|
|
|
// FUNCTION: LEGO1 0x1001a2c0
|
2024-01-20 18:04:46 -05:00
|
|
|
MxLong IslePathActor::Notify(MxParam& p_param)
|
|
|
|
{
|
2024-03-25 07:43:03 -04:00
|
|
|
MxLong ret = 0;
|
|
|
|
|
|
|
|
switch (((MxNotificationParam&) p_param).GetType()) {
|
|
|
|
case c_notificationType0:
|
|
|
|
ret = VTable0xd0();
|
|
|
|
break;
|
|
|
|
case c_notificationType11:
|
|
|
|
ret = VTable0xcc();
|
|
|
|
break;
|
|
|
|
case c_notificationClick:
|
|
|
|
ret = VTable0xd4((LegoControlManagerEvent&) p_param);
|
|
|
|
break;
|
2024-05-01 09:00:42 -04:00
|
|
|
case c_notificationEndAnim:
|
|
|
|
ret = VTable0xd8((LegoEndAnimNotificationParam&) p_param);
|
2024-03-25 07:43:03 -04:00
|
|
|
break;
|
|
|
|
case c_notificationType19:
|
|
|
|
ret = VTable0xdc((MxType19NotificationParam&) p_param);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-04-12 07:02:32 -04:00
|
|
|
// FUNCTION: LEGO1 0x1001a350
|
2023-10-24 08:37:02 -04:00
|
|
|
void IslePathActor::VTable0xe0()
|
|
|
|
{
|
2024-04-12 07:02:32 -04:00
|
|
|
m_roi->SetVisibility(FALSE);
|
|
|
|
if (CurrentActor() != this) {
|
|
|
|
m_unk0x15c = NavController()->GetMaxLinearVel();
|
|
|
|
m_unk0x158 = CurrentActor();
|
|
|
|
if (m_unk0x158) {
|
|
|
|
m_unk0x158->ResetWorldTransform(FALSE);
|
|
|
|
m_unk0x158->SetUserNavFlag(FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AnimationManager()->FUN_10061010(0);
|
|
|
|
if (!m_cameraFlag) {
|
|
|
|
ResetWorldTransform(TRUE);
|
|
|
|
SetUserNavFlag(TRUE);
|
|
|
|
|
|
|
|
NavController()->ResetLinearVel(m_unk0x13c);
|
|
|
|
|
|
|
|
SetCurrentActor(this);
|
|
|
|
FUN_1001b660();
|
|
|
|
FUN_10010c30();
|
|
|
|
}
|
2023-10-24 08:37:02 -04:00
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// STUB: LEGO1 0x1001a3f0
|
2023-10-24 08:37:02 -04:00
|
|
|
void IslePathActor::VTable0xe4()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-10-24 08:37:02 -04:00
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// STUB: LEGO1 0x1001b2a0
|
2024-03-18 10:38:02 -04:00
|
|
|
void IslePathActor::VTable0xe8(LegoGameState::Area, MxBool, MxU8)
|
2023-10-24 08:37:02 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-10-24 08:37:02 -04:00
|
|
|
}
|
|
|
|
|
2024-04-12 07:02:32 -04:00
|
|
|
// FUNCTION: LEGO1 0x1001b5b0
|
|
|
|
void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundary, MxBool p_reset)
|
|
|
|
{
|
|
|
|
if (m_world) {
|
|
|
|
m_world->FUN_1001fc80(this);
|
|
|
|
m_world->Remove(this);
|
|
|
|
VideoManager()->Get3DManager()->GetLego3DView()->Remove(*m_roi);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_world = CurrentWorld();
|
|
|
|
if (p_reset) {
|
|
|
|
VTable0xe0();
|
|
|
|
}
|
|
|
|
|
|
|
|
m_world->FUN_1001fa70(this);
|
|
|
|
p_boundary->AddActor(this);
|
|
|
|
if (m_actorId != GameState()->GetActorId()) {
|
|
|
|
m_world->Add(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_roi->FUN_100a58f0(p_transform);
|
|
|
|
if (m_cameraFlag) {
|
|
|
|
FUN_1003eda0();
|
|
|
|
FUN_10010c30();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x1001b660
|
|
|
|
void IslePathActor::FUN_1001b660()
|
2023-10-24 08:37:02 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-10-24 08:37:02 -04:00
|
|
|
}
|