Implement/match LegoPathActor::ParseAction (#946)

* Implement/match LegoPathActor::ParseAction

* Fix naming

* Space
This commit is contained in:
Christian Semmler
2024-05-24 13:07:45 -04:00
committed by GitHub
parent 6774784b37
commit db90807d53
25 changed files with 137 additions and 75 deletions

View File

@@ -503,7 +503,7 @@ void Isle::Enable(MxBool p_enable)
}
if (CurrentActor() != NULL && CurrentActor()->IsA("Jetski")) {
IslePathActor* actor = CurrentActor();
IslePathActor* actor = (IslePathActor*) CurrentActor();
actor->SpawnPlayer(
LegoGameState::e_unk45,
FALSE,
@@ -657,11 +657,12 @@ void Isle::Enable(MxBool p_enable)
}
break;
case 5: {
CurrentActor()->SpawnPlayer(
LegoGameState::e_jetrace2,
FALSE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
((IslePathActor*) CurrentActor())
->SpawnPlayer(
LegoGameState::e_jetrace2,
FALSE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
JetskiRaceState* raceState = (JetskiRaceState*) GameState()->GetState("JetskiRaceState");
if (raceState->GetUnknown0x28() == 2) {
@@ -689,11 +690,12 @@ void Isle::Enable(MxBool p_enable)
}
case 6: {
GameState()->m_currentArea = LegoGameState::e_carraceExterior;
CurrentActor()->SpawnPlayer(
LegoGameState::e_unk21,
FALSE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
((IslePathActor*) CurrentActor())
->SpawnPlayer(
LegoGameState::e_unk21,
FALSE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
CarRaceState* raceState = (CarRaceState*) GameState()->GetState("CarRaceState");
if (raceState->GetUnknown0x28() == 2) {
@@ -738,11 +740,12 @@ void Isle::Enable(MxBool p_enable)
break;
case 11:
m_act1state->m_unk0x018 = 0;
CurrentActor()->SpawnPlayer(
LegoGameState::e_unk54,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
((IslePathActor*) CurrentActor())
->SpawnPlayer(
LegoGameState::e_unk54,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
GameState()->m_currentArea = LegoGameState::e_unk66;
FUN_1003ef00(TRUE);
m_jukebox->StartAction();
@@ -789,7 +792,7 @@ void Isle::FUN_10032620()
case LegoGameState::e_unk66: {
MxMatrix mat(CurrentActor()->GetROI()->GetLocal2World());
LegoPathBoundary* boundary = CurrentActor()->GetBoundary();
CurrentActor()->VTable0xec(mat, boundary, TRUE);
((IslePathActor*) CurrentActor())->VTable0xec(mat, boundary, TRUE);
break;
}
case LegoGameState::e_unk4:
@@ -802,11 +805,12 @@ void Isle::FUN_10032620()
case LegoGameState::e_hospitalExterior:
case LegoGameState::e_unk31:
case LegoGameState::e_policeExterior:
CurrentActor()->SpawnPlayer(
GameState()->m_currentArea,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
((IslePathActor*) CurrentActor())
->SpawnPlayer(
GameState()->m_currentArea,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
GameState()->m_currentArea = LegoGameState::e_unk66;
break;
}
@@ -1065,7 +1069,7 @@ void Isle::Add(MxCore* p_object)
}
// FUNCTION: LEGO1 0x10033050
void Isle::VTable0x6c(IslePathActor* p_actor)
void Isle::VTable0x6c(LegoPathActor* p_actor)
{
LegoWorld::Remove(p_actor);