mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 10:24:18 +00:00
Implement/match Act3::GoodEnding (#1218)
This commit is contained in:
committed by
GitHub
parent
de7bc813ca
commit
263d7d1e4f
@@ -23,6 +23,8 @@
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
#include <vec.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act3, 0x4274)
|
||||
DECOMP_SIZE_ASSERT(Act3State, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(Act3ListElement, 0x0c)
|
||||
@@ -584,12 +586,27 @@ void Act3::FUN_10073430()
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10073460
|
||||
// STUB: BETA10 0x10016bc6
|
||||
void Act3::GoodEnding(const Matrix4& p_matrix)
|
||||
// FUNCTION: LEGO1 0x10073460
|
||||
// FUNCTION: BETA10 0x10016bc6
|
||||
void Act3::GoodEnding(const Matrix4& p_destination)
|
||||
{
|
||||
// TODO
|
||||
assert(m_cop1 && m_cop2 && m_brickster && m_state);
|
||||
|
||||
m_cop1->SetState(LegoPathActor::c_disable);
|
||||
m_cop2->SetState(LegoPathActor::c_disable);
|
||||
m_brickster->SetState(LegoPathActor::c_disable);
|
||||
|
||||
m_unk0x4220.Clear();
|
||||
m_copter->FUN_10004640(p_destination);
|
||||
|
||||
DebugPrintf("In Good Ending...");
|
||||
DebugCopter(
|
||||
m_copter->GetROI()->GetLocal2World(),
|
||||
p_destination,
|
||||
m_copter->m_unk0x160,
|
||||
m_copter->m_unk0x1a8,
|
||||
m_copter->m_unk0x1f4
|
||||
);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10073500
|
||||
@@ -598,6 +615,58 @@ void Act3::DebugPrintf(const char* p_format, ...)
|
||||
// empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10073510
|
||||
void Act3::DebugCopter(
|
||||
const Matrix4& p_copter,
|
||||
const Matrix4& p_destination,
|
||||
const Matrix4& p_startPosition,
|
||||
const Matrix4& p_endPosition,
|
||||
const UnknownMx4DPointFloat& p_unk0x1f4
|
||||
)
|
||||
{
|
||||
DebugPrintf("Copter matrix...\n\n");
|
||||
|
||||
// STRING: LEGO1 0x100f78e0
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_copter[0]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_copter[1]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_copter[2]));
|
||||
// STRING: LEGO1 0x100f78cc
|
||||
DebugPrintf("\t%g, %g, %g, %g\n\n", EXPAND4(p_copter[3]));
|
||||
|
||||
DebugPrintf("Destination matrix...");
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_destination[0]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_destination[1]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_destination[2]));
|
||||
DebugPrintf("\t%g, %g, %g, %g\n\n", EXPAND4(p_destination[3]));
|
||||
|
||||
DebugPrintf("Start position...");
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_startPosition[0]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_startPosition[1]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_startPosition[2]));
|
||||
DebugPrintf("\t%g, %g, %g, %g\n\n", EXPAND4(p_startPosition[3]));
|
||||
|
||||
DebugPrintf("End position...");
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_endPosition[0]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_endPosition[1]));
|
||||
DebugPrintf("\t%g, %g, %g, %g", EXPAND4(p_endPosition[2]));
|
||||
DebugPrintf("\t%g, %g, %g, %g\n\n", EXPAND4(p_endPosition[3]));
|
||||
|
||||
Mx4DPointFloat unk0x00, unk0x18;
|
||||
|
||||
if (p_unk0x1f4.GetUnknown0x30() != 0) {
|
||||
// TODO: Match
|
||||
unk0x00 = p_unk0x1f4.GetUnknown0x00();
|
||||
unk0x18 = p_unk0x1f4.GetUnknown0x18();
|
||||
|
||||
DebugPrintf("Source quaternion...");
|
||||
// STRING: LEGO1 0x100f7864
|
||||
DebugPrintf("\t%g, %g, %g, %g\n", EXPAND4(unk0x00));
|
||||
|
||||
DebugPrintf("Destination quaternion...");
|
||||
DebugPrintf("\t%g, %g, %g, %g\n", EXPAND4(unk0x18));
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10073a90
|
||||
void Act3::Enable(MxBool p_enable)
|
||||
{
|
||||
|
||||
@@ -177,7 +177,7 @@ MxResult LegoAct2::Tickle()
|
||||
m_unk0x10c4 = 1;
|
||||
break;
|
||||
case 1:
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_bit3);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_disable);
|
||||
|
||||
switch (rand() % 3) {
|
||||
case 0:
|
||||
@@ -336,7 +336,7 @@ MxLong LegoAct2::Notify(MxParam& p_param)
|
||||
|
||||
m_unk0x10c4 = 14;
|
||||
m_unk0x10d0 = 0;
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_bit3);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_disable);
|
||||
}
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
@@ -417,7 +417,7 @@ MxLong LegoAct2::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
m_unk0x10d0 = 0;
|
||||
|
||||
FUN_10052560(Act2mainScript::c_tra045la_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_bit3);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_disable);
|
||||
AnimationManager()->EnableCamAnims(TRUE);
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
AnimationManager()->FUN_100604f0(g_unk0x100f4428, sizeOfArray(g_unk0x100f4428));
|
||||
@@ -602,7 +602,7 @@ MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
if (m_unk0x10c4 == 5 && p_param.GetData() == 0x32) {
|
||||
LegoPathActor* actor = (LegoPathActor*) m_pepper->GetEntity();
|
||||
actor->SetState(LegoPathActor::c_bit3);
|
||||
actor->SetState(LegoPathActor::c_disable);
|
||||
actor->SetWorldSpeed(0.0f);
|
||||
FUN_10051900();
|
||||
|
||||
@@ -630,7 +630,7 @@ MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
FUN_10051fa0(p_param.GetData());
|
||||
}
|
||||
else if (m_unk0x10c4 == 10 && p_param.GetData() == 0x165) {
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_bit3);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetState(LegoPathActor::c_disable);
|
||||
|
||||
if (FUN_10052560(Act2mainScript::c_VOhide_PlayWav, FALSE, TRUE, NULL, NULL, NULL) == SUCCESS) {
|
||||
m_unk0x1140 = Act2mainScript::c_VOhide_PlayWav;
|
||||
@@ -937,7 +937,7 @@ MxResult LegoAct2::BadEnding()
|
||||
}
|
||||
|
||||
LegoPathActor* actor = m_unk0x1138;
|
||||
actor->SetState(LegoPathActor::c_bit3);
|
||||
actor->SetState(LegoPathActor::c_disable);
|
||||
|
||||
m_gameState->SetUnknown0x08(104);
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
|
||||
Reference in New Issue
Block a user