Rename enums

This commit is contained in:
Christian Semmler 2024-03-17 12:26:12 -04:00
parent 77c6f6799b
commit c036d27d59
6 changed files with 51 additions and 51 deletions

View File

@ -64,10 +64,10 @@ class LegoGameState {
e_unk33, e_unk33,
e_police, e_police,
e_polidoor, e_polidoor,
e_copter, e_copterbuild,
e_dunecar, e_dunecarbuild,
e_jetski, e_jetskibuild,
e_racecar, e_racecarbuild,
e_act2main = 46, e_act2main = 46,
e_act3script, e_act3script,
@ -76,14 +76,14 @@ class LegoGameState {
e_unk54, e_unk54,
e_histbook = 56, e_histbook = 56,
e_unk57, e_bike,
e_unk58, e_dunecar,
e_unk59, e_motocycle,
e_unk60, e_copter,
e_unk61, e_skateboard,
e_unk62, e_ambulance,
e_unk63, e_towtrack,
e_unk64, e_jetski,
e_unk66 = 66 e_unk66 = 66
}; };

View File

@ -34,7 +34,7 @@ MxResult Bike::Create(MxDSAction& p_dsAction)
void Bike::VTable0xe4() void Bike::VTable0xe4()
{ {
IslePathActor::VTable0xe4(); IslePathActor::VTable0xe4();
GameState()->SetCurrentArea(LegoGameState::Area::e_unk57); GameState()->SetCurrentArea(LegoGameState::Area::e_bike);
FUN_1003ee00(*g_isleScript, 11); FUN_1003ee00(*g_isleScript, 11);
FUN_1003ee00(*g_isleScript, 12); FUN_1003ee00(*g_isleScript, 12);
FUN_1003ee00(*g_isleScript, 15); FUN_1003ee00(*g_isleScript, 15);

View File

@ -68,7 +68,7 @@ void Helicopter::VTable0xe4()
IslePathActor::VTable0xe4(); IslePathActor::VTable0xe4();
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
GameState()->SetCurrentArea(LegoGameState::e_unk60); GameState()->SetCurrentArea(LegoGameState::e_copter);
if (CurrentActor()) { if (CurrentActor()) {
if (CurrentActor()->IsA("IslePathActor")) { if (CurrentActor()->IsA("IslePathActor")) {
((IslePathActor*) CurrentActor())->VTable0xe8(0x37, TRUE, 7); ((IslePathActor*) CurrentActor())->VTable0xe8(0x37, TRUE, 7);
@ -115,7 +115,7 @@ MxU32 Helicopter::VTable0xcc()
m_script = *g_isleScript; m_script = *g_isleScript;
AnimationManager()->FUN_10064670(FALSE); AnimationManager()->FUN_10064670(FALSE);
VTable0xe8(0x29, TRUE, 7); VTable0xe8(0x29, TRUE, 7);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_unk60); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_copter);
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
SetUnknownDC(4); SetUnknownDC(4);

View File

@ -702,22 +702,22 @@ void LegoGameState::StopArea(Area p_area)
RemoveFromWorld(*g_isleScript, 0x481, *g_isleScript, 0); RemoveFromWorld(*g_isleScript, 0x481, *g_isleScript, 0);
RemoveFromWorld(*g_isleScript, 0x482, *g_isleScript, 0); RemoveFromWorld(*g_isleScript, 0x482, *g_isleScript, 0);
break; break;
case e_copter: case e_copterbuild:
InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x2f, NULL); InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x2f, NULL);
InvokeAction(Extra::e_stop, *g_copterScript, 0, NULL); InvokeAction(Extra::e_stop, *g_copterScript, 0, NULL);
InvokeAction(Extra::e_close, *g_copterScript, 0, NULL); InvokeAction(Extra::e_close, *g_copterScript, 0, NULL);
break; break;
case e_dunecar: case e_dunecarbuild:
InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x31, NULL); InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x31, NULL);
InvokeAction(Extra::e_stop, *g_dunecarScript, 0, NULL); InvokeAction(Extra::e_stop, *g_dunecarScript, 0, NULL);
InvokeAction(Extra::e_close, *g_dunecarScript, 0, NULL); InvokeAction(Extra::e_close, *g_dunecarScript, 0, NULL);
break; break;
case e_jetski: case e_jetskibuild:
InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x33, NULL); InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x33, NULL);
InvokeAction(Extra::e_stop, *g_jetskiScript, 0, NULL); InvokeAction(Extra::e_stop, *g_jetskiScript, 0, NULL);
InvokeAction(Extra::e_close, *g_jetskiScript, 0, NULL); InvokeAction(Extra::e_close, *g_jetskiScript, 0, NULL);
break; break;
case e_racecar: case e_racecarbuild:
InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x35, NULL); InvokeAction(Extra::e_stop, *g_jukeboxScript, 0x35, NULL);
InvokeAction(Extra::e_stop, *g_racecarScript, 0, NULL); InvokeAction(Extra::e_stop, *g_racecarScript, 0, NULL);
InvokeAction(Extra::e_close, *g_racecarScript, 0, NULL); InvokeAction(Extra::e_close, *g_racecarScript, 0, NULL);
@ -801,12 +801,12 @@ void LegoGameState::SwitchArea(Area p_area)
case e_hospitalExterior: case e_hospitalExterior:
case e_unk31: case e_unk31:
case e_policeExterior: case e_policeExterior:
case e_unk57: case e_bike:
case e_unk58: case e_dunecar:
case e_unk59: case e_motocycle:
case e_unk60: case e_copter:
case e_unk61: case e_skateboard:
case e_unk64: case e_jetski:
case e_unk66: case e_unk66:
LoadIsle(); LoadIsle();
break; break;
@ -902,19 +902,19 @@ void LegoGameState::SwitchArea(Area p_area)
LoadIsle(); LoadIsle();
InvokeAction(Extra::ActionType::e_start, *g_isleScript, 1150, NULL); InvokeAction(Extra::ActionType::e_start, *g_isleScript, 1150, NULL);
break; break;
case e_copter: case e_copterbuild:
VideoManager()->SetUnk0x554(TRUE); VideoManager()->SetUnk0x554(TRUE);
InvokeAction(Extra::ActionType::e_opendisk, *g_copterScript, 0, NULL); InvokeAction(Extra::ActionType::e_opendisk, *g_copterScript, 0, NULL);
break; break;
case e_dunecar: case e_dunecarbuild:
VideoManager()->SetUnk0x554(TRUE); VideoManager()->SetUnk0x554(TRUE);
InvokeAction(Extra::ActionType::e_opendisk, *g_dunecarScript, 0, NULL); InvokeAction(Extra::ActionType::e_opendisk, *g_dunecarScript, 0, NULL);
break; break;
case e_jetski: case e_jetskibuild:
VideoManager()->SetUnk0x554(TRUE); VideoManager()->SetUnk0x554(TRUE);
InvokeAction(Extra::ActionType::e_opendisk, *g_jetskiScript, 0, NULL); InvokeAction(Extra::ActionType::e_opendisk, *g_jetskiScript, 0, NULL);
break; break;
case e_racecar: case e_racecarbuild:
VideoManager()->SetUnk0x554(TRUE); VideoManager()->SetUnk0x554(TRUE);
InvokeAction(Extra::ActionType::e_opendisk, *g_racecarScript, 0, NULL); InvokeAction(Extra::ActionType::e_opendisk, *g_racecarScript, 0, NULL);
break; break;

View File

@ -318,7 +318,7 @@ void Isle::Enable(MxBool p_enable)
SetIsWorldActive(FALSE); SetIsWorldActive(FALSE);
break; break;
case LegoGameState::e_unk57: case LegoGameState::e_bike:
FUN_1001fa70(CurrentActor()); FUN_1001fa70(CurrentActor());
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
@ -331,7 +331,7 @@ void Isle::Enable(MxBool p_enable)
m_bike->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0)); m_bike->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
#endif #endif
break; break;
case LegoGameState::e_unk58: case LegoGameState::e_dunecar:
FUN_1001fa70(CurrentActor()); FUN_1001fa70(CurrentActor());
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
@ -344,7 +344,7 @@ void Isle::Enable(MxBool p_enable)
m_dunebuggy->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0)); m_dunebuggy->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
#endif #endif
break; break;
case LegoGameState::e_unk59: case LegoGameState::e_motocycle:
FUN_1001fa70(CurrentActor()); FUN_1001fa70(CurrentActor());
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
@ -357,7 +357,7 @@ void Isle::Enable(MxBool p_enable)
m_motocycle->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0)); m_motocycle->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
#endif #endif
break; break;
case LegoGameState::e_unk60: case LegoGameState::e_copter:
FUN_1001fa70(CurrentActor()); FUN_1001fa70(CurrentActor());
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
@ -370,7 +370,7 @@ void Isle::Enable(MxBool p_enable)
m_helicopter->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0)); m_helicopter->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
#endif #endif
break; break;
case LegoGameState::e_unk61: case LegoGameState::e_skateboard:
FUN_1001fa70(CurrentActor()); FUN_1001fa70(CurrentActor());
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
@ -383,7 +383,7 @@ void Isle::Enable(MxBool p_enable)
m_skateboard->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0)); m_skateboard->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
#endif #endif
break; break;
case LegoGameState::e_unk64: case LegoGameState::e_jetski:
FUN_1001fa70(CurrentActor()); FUN_1001fa70(CurrentActor());
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
@ -514,12 +514,12 @@ void Isle::Enable(MxBool p_enable)
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_elevride) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_elevride) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_polidoor) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_polidoor) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_garadoor) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_garadoor) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_unk57) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_bike) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_unk58) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_dunecar) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_unk59) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_motocycle) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_unk60) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_copter) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_unk64) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_jetski) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_unk61) && (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_skateboard) &&
(m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_jetrace2)) { (m_act1state->m_unk0x018 != 0 || GameState()->m_currentArea != LegoGameState::e_jetrace2)) {
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
} }
@ -551,7 +551,7 @@ MxLong Isle::HandleTransitionEnd()
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_Avo917In_PlayWav, NULL); InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_Avo917In_PlayWav, NULL);
DeleteObjects(&m_atom, IsleScript::c_Avo900Ps_PlayWav, IsleScript::c_Avo907Ps_PlayWav); DeleteObjects(&m_atom, IsleScript::c_Avo900Ps_PlayWav, IsleScript::c_Avo907Ps_PlayWav);
if (m_destLocation != LegoGameState::e_unk61) { if (m_destLocation != LegoGameState::e_skateboard) {
m_act1state->m_unk0x018 = 0; m_act1state->m_unk0x018 = 0;
} }
@ -640,7 +640,7 @@ MxLong Isle::HandleTransitionEnd()
FALSE FALSE
); );
break; break;
case LegoGameState::e_unk57: case LegoGameState::e_bike:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
@ -648,7 +648,7 @@ MxLong Isle::HandleTransitionEnd()
m_bike->FUN_10076b60(); m_bike->FUN_10076b60();
} }
break; break;
case LegoGameState::e_unk58: case LegoGameState::e_dunecar:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
@ -656,7 +656,7 @@ MxLong Isle::HandleTransitionEnd()
m_dunebuggy->FUN_10068350(); m_dunebuggy->FUN_10068350();
} }
break; break;
case LegoGameState::e_unk59: case LegoGameState::e_motocycle:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
@ -664,11 +664,11 @@ MxLong Isle::HandleTransitionEnd()
m_motocycle->FUN_10035e10(); m_motocycle->FUN_10035e10();
} }
break; break;
case LegoGameState::e_unk60: case LegoGameState::e_copter:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
break; break;
case LegoGameState::e_unk61: case LegoGameState::e_skateboard:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
@ -676,7 +676,7 @@ MxLong Isle::HandleTransitionEnd()
m_skateboard->FUN_10010510(); m_skateboard->FUN_10010510();
} }
break; break;
case LegoGameState::e_unk62: case LegoGameState::e_ambulance:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
m_act1state->m_unk0x018 = 10; m_act1state->m_unk0x018 = 10;
FUN_10032d30(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
@ -685,7 +685,7 @@ MxLong Isle::HandleTransitionEnd()
m_ambulance->FUN_10037060(); m_ambulance->FUN_10037060();
} }
break; break;
case LegoGameState::e_unk63: case LegoGameState::e_towtrack:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
m_act1state->m_unk0x018 = 8; m_act1state->m_unk0x018 = 8;
FUN_10032d30(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
@ -694,7 +694,7 @@ MxLong Isle::HandleTransitionEnd()
m_towtrack->FUN_1004dad0(); m_towtrack->FUN_1004dad0();
} }
break; break;
case LegoGameState::e_unk64: case LegoGameState::e_jetski:
m_act1state->m_unk0x01f = 1; m_act1state->m_unk0x01f = 1;
FUN_10032d30((IsleScript::Script) m_jetski->GetUnknown0x160(), JukeboxScript::c_MusicTheme1, NULL, TRUE); FUN_10032d30((IsleScript::Script) m_jetski->GetUnknown0x160(), JukeboxScript::c_MusicTheme1, NULL, TRUE);

View File

@ -130,7 +130,7 @@ MxLong Police::HandleClick(LegoControlManagerEvent& p_param)
} }
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
m_destLocation = LegoGameState::Area::e_copter; m_destLocation = LegoGameState::Area::e_copterbuild;
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
break; break;
case PoliceScript::c_Donut_Ctl: case PoliceScript::c_Donut_Ctl: