Implement/match LegoAct2::HandlePathStruct

This commit is contained in:
Christian Semmler 2024-12-03 12:15:05 -07:00
parent 3c624ff14c
commit f9ca27bdf1
6 changed files with 100 additions and 3 deletions

View File

@ -29,6 +29,7 @@ class Act2Actor : public LegoAnimActor {
void FUN_10018980();
void FUN_10019520();
void FUN_10019560();
void FUN_100192a0(undefined4 p_param);
// SYNTHETIC: LEGO1 0x1001a0a0

View File

@ -31,7 +31,9 @@ class Act2Brick : public LegoPathActor {
// SYNTHETIC: LEGO1 0x1007a450
// Act2Brick::`scalar deleting destructor'
MxResult FUN_1007a4e0(undefined4 p_param1);
void Remove();
void FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary);
void PlayWhistleSound();
void StopWhistleSound();
void Mute(MxBool p_muted);

View File

@ -81,6 +81,8 @@ class LegoAct2 : public LegoWorld {
void InitBricks();
void UninitBricks();
void FUN_10051ac0();
void FUN_10051fa0(MxS32 p_param1);
void FUN_100521f0(MxS32 p_param1);
MxResult FUN_10052560(
Act2mainScript::Script p_objectId,
MxBool p_param2,

View File

@ -177,6 +177,14 @@ void Act2Actor::FUN_10019520()
FUN_100192a0(10);
}
// FUNCTION: LEGO1 0x10019560
void Act2Actor::FUN_10019560()
{
m_unk0x1e = 5;
SetWorldSpeed(m_unk0x28 + 5);
FUN_100192a0(9);
}
// FUNCTION: LEGO1 0x100195a0
// FUNCTION: BETA10 0x1000d7d3
MxS32 Act2Actor::VTable0xa0()

View File

@ -33,6 +33,14 @@ Act2Brick::~Act2Brick()
TickleManager()->UnregisterClient(this);
}
// STUB: LEGO1 0x1007a4e0
// STUB: BETA10 0x10012ad5
MxResult Act2Brick::FUN_1007a4e0(undefined4 p_param1)
{
// TODO
return SUCCESS;
}
// FUNCTION: LEGO1 0x1007a620
// FUNCTION: BETA10 0x10012ba2
void Act2Brick::Remove()
@ -48,6 +56,13 @@ void Act2Brick::Remove()
m_unk0x164 = 0;
}
// STUB: LEGO1 0x1007a670
// STUB: BETA10 0x10012c04
void Act2Brick::FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary)
{
// TODO
}
// FUNCTION: LEGO1 0x1007a750
MxResult Act2Brick::VTable0x94(LegoPathActor* p_actor, MxBool)
{

View File

@ -596,11 +596,66 @@ void LegoAct2::Enable(MxBool p_enable)
}
}
// STUB: LEGO1 0x10051460
// STUB: BETA10 0x1003bb72
// FUNCTION: LEGO1 0x10051460
// FUNCTION: BETA10 0x1003bb72
MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
{
// TODO
if (m_unk0x10c4 == 5 && p_param.GetData() == 0x32) {
LegoPathActor* actor = (LegoPathActor*) m_pepper->GetEntity();
actor->SetState(LegoPathActor::c_bit3);
actor->SetWorldSpeed(0.0f);
FUN_10051900();
if (m_unk0x10d0 < 90000) {
FUN_10052560(Act2mainScript::c_tra031ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
}
else {
FUN_10052560(Act2mainScript::c_tra032ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
}
m_unk0x112c = 50;
m_unk0x10c4 = 6;
m_unk0x10d0 = 0;
}
else if (m_unk0x10c4 == 5 && p_param.GetData() == 0x2a) {
if (m_unk0x1144 == (Act2mainScript::Script) 0) {
FUN_10052560(Act2mainScript::c_Avo907In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
m_unk0x1144 = Act2mainScript::c_Avo907In_PlayWav;
}
}
else if (m_unk0x10c4 == 5) {
FUN_100521f0(p_param.GetData());
}
else if (m_unk0x10c4 == 7) {
FUN_10051fa0(p_param.GetData());
}
else if (m_unk0x10c4 == 10 && p_param.GetData() == 0x165) {
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_bit3);
if (FUN_10052560(Act2mainScript::c_VOhide_PlayWav, FALSE, TRUE, NULL, NULL, NULL) == SUCCESS) {
m_unk0x1140 = Act2mainScript::c_VOhide_PlayWav;
}
m_unk0x1138->FUN_10019560();
m_unk0x10c4 = 11;
m_unk0x10d0 = 0;
if (m_unk0x10c0 < 6) {
m_bricks[m_unk0x10c0].FUN_1007a4e0(m_unk0x10c0);
m_unk0x10c0++;
}
MxMatrix local2world = m_ambulance->GetLocal2World();
MxMatrix local2world2 = local2world;
LegoPathBoundary* boundary = m_unk0x1138->GetBoundary();
local2world[3][1] += 1.5;
local2world2[3][1] -= 0.1;
m_bricks[m_unk0x10c0 - 1].FUN_1007a670(local2world, local2world2, boundary);
}
return 0;
}
@ -707,6 +762,20 @@ void LegoAct2::FUN_10051ac0()
// TODO
}
// STUB: LEGO1 0x10051fa0
// STUB: BETA10 0x10013fd3
void LegoAct2::FUN_10051fa0(MxS32 p_param1)
{
// TODO
}
// STUB: LEGO1 0x100521f0
// STUB: BETA10 0x100142f1
void LegoAct2::FUN_100521f0(MxS32 p_param1)
{
// TODO
}
// FUNCTION: LEGO1 0x10052560
// FUNCTION: BETA10 0x100145c6
MxResult LegoAct2::FUN_10052560(