mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-08-02 23:26:16 -04:00
Merge remote-tracking branch 'isle/master'
This commit is contained in:
commit
f2b6188d89
@ -150,18 +150,18 @@ public:
|
||||
return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name);
|
||||
}
|
||||
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
void Add(MxCore* p_object) override; // vtable+0x58
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+0x6c
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
void Add(MxCore* p_object) override; // vtable+0x58
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual void RemoveVehicle(LegoPathActor* p_actor); // vtable+0x6c
|
||||
|
||||
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
|
||||
MxBool HasHelicopter() { return m_helicopter != NULL; }
|
||||
|
||||
void FUN_10033350();
|
||||
void SwitchToInfocenter();
|
||||
|
||||
friend class Act1State;
|
||||
|
||||
@ -175,13 +175,13 @@ protected:
|
||||
MxLong HandleTransitionEnd();
|
||||
void HandleElevatorEndAction();
|
||||
void UpdateGlobe();
|
||||
void FUN_10032620();
|
||||
void CheckAreaExiting();
|
||||
void CreateState();
|
||||
void FUN_10032d30(
|
||||
void TransitionToOverlay(
|
||||
IsleScript::Script p_script,
|
||||
JukeboxScript::Script p_music,
|
||||
const char* p_cameraLocation,
|
||||
MxBool p_und
|
||||
MxBool p_setCamera
|
||||
);
|
||||
|
||||
Act1State* m_act1state; // 0xf8
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
void ActivateSceneActions();
|
||||
|
||||
MxS16 GetUnknown0x160() { return m_jetskiDashboardStreamId; }
|
||||
MxS16 GetJetskiDashboardStreamId() { return m_jetskiDashboardStreamId; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1007e5c0
|
||||
// Jetski::`scalar deleting destructor'
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
m_unk0x08 = 1;
|
||||
m_finishTimes = p_finishTimes;
|
||||
m_startTime = INT_MIN;
|
||||
m_unk0x14 = 1;
|
||||
m_counter = 1;
|
||||
m_score = LegoState::e_grey;
|
||||
m_hiScore = LegoState::e_grey;
|
||||
m_actions = p_actions;
|
||||
@ -54,7 +54,7 @@ public:
|
||||
m_unk0x08 = p_mission.m_unk0x08;
|
||||
m_finishTimes = p_mission.m_finishTimes;
|
||||
m_startTime = p_mission.m_startTime;
|
||||
m_unk0x14 = p_mission.m_unk0x14;
|
||||
m_counter = p_mission.m_counter;
|
||||
m_score = p_mission.m_score;
|
||||
m_hiScore = p_mission.m_hiScore;
|
||||
m_actions = p_mission.m_actions;
|
||||
@ -102,12 +102,24 @@ public:
|
||||
undefined m_unk0x08; // 0x08
|
||||
MxLong* m_finishTimes; // 0x0c
|
||||
MxLong m_startTime; // 0x10
|
||||
MxS16 m_unk0x14; // 0x14
|
||||
MxS16 m_counter; // 0x14
|
||||
MxS16 m_score; // 0x16
|
||||
MxS16 m_hiScore; // 0x18
|
||||
IsleScript::Script* m_actions; // 0x1c
|
||||
};
|
||||
|
||||
enum {
|
||||
e_none = 0,
|
||||
e_introduction = 1,
|
||||
e_waitAcceptingQuest = 2,
|
||||
e_started = 3,
|
||||
e_delivering = 4,
|
||||
e_arrivedAtDestination = 5,
|
||||
e_suggestHelicopter = 6,
|
||||
e_transitionToAct2 = 8,
|
||||
e_timeoutAcceptingQuest = 9,
|
||||
};
|
||||
|
||||
PizzaMissionState();
|
||||
|
||||
// FUNCTION: LEGO1 0x10039290
|
||||
@ -142,7 +154,7 @@ public:
|
||||
MxS16 GetActorState();
|
||||
|
||||
PizzeriaState* m_pizzeriaState; // 0x08
|
||||
undefined4 m_unk0x0c; // 0x0c
|
||||
MxU32 m_state; // 0x0c
|
||||
Mission m_missions[5]; // 0x10
|
||||
MxU32 m_playedAction; // 0xb0
|
||||
|
||||
@ -189,8 +201,8 @@ public:
|
||||
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80
|
||||
|
||||
void CreateState();
|
||||
void FUN_10038220(IsleScript::Script p_objectId);
|
||||
void FUN_100382b0();
|
||||
void Start(IsleScript::Script p_objectId);
|
||||
void Reset();
|
||||
void StopActions();
|
||||
void PlayAction(MxU32 p_objectId, MxBool p_param7);
|
||||
|
||||
@ -207,7 +219,7 @@ private:
|
||||
IsleScript::Script m_speechAction; // 0x8c
|
||||
MxLong m_startTime; // 0x90
|
||||
MxLong m_duration; // 0x94
|
||||
MxBool m_unk0x98; // 0x98
|
||||
MxBool m_playedLocationAnimation; // 0x98
|
||||
};
|
||||
|
||||
#endif // PIZZA_H
|
||||
|
@ -49,7 +49,7 @@ MxLong InfoCenterEntity::HandleClick(LegoEventNotificationParam& p_param)
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->FUN_10033350();
|
||||
isle->SwitchToInfocenter();
|
||||
isle->SetDestLocation(LegoGameState::Area::e_infomain);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
@ -137,7 +137,7 @@ Pizza::Pizza()
|
||||
m_skateBoard = NULL;
|
||||
m_act1state = NULL;
|
||||
m_speechAction = IsleScript::c_noneIsle;
|
||||
m_unk0x98 = FALSE;
|
||||
m_playedLocationAnimation = FALSE;
|
||||
m_startTime = INT_MIN;
|
||||
}
|
||||
|
||||
@ -177,11 +177,11 @@ void Pizza::CreateState()
|
||||
|
||||
// FUNCTION: LEGO1 0x10038220
|
||||
// FUNCTION: BETA10 0x100edb81
|
||||
void Pizza::FUN_10038220(IsleScript::Script p_objectId)
|
||||
void Pizza::Start(IsleScript::Script p_objectId)
|
||||
{
|
||||
AnimationManager()->FUN_10064740(NULL);
|
||||
m_mission = m_state->GetMission(GameState()->GetActorId());
|
||||
m_state->m_unk0x0c = 1;
|
||||
m_state->m_state = PizzaMissionState::e_introduction;
|
||||
m_act1state->m_state = Act1State::e_pizza;
|
||||
m_mission->m_startTime = INT_MIN;
|
||||
g_isleFlags &= ~Isle::c_playMusic;
|
||||
@ -193,22 +193,22 @@ void Pizza::FUN_10038220(IsleScript::Script p_objectId)
|
||||
|
||||
// FUNCTION: LEGO1 0x100382b0
|
||||
// FUNCTION: BETA10 0x100edc9b
|
||||
void Pizza::FUN_100382b0()
|
||||
void Pizza::Reset()
|
||||
{
|
||||
if (m_state->m_unk0x0c != 8) {
|
||||
if (m_state->m_state != PizzaMissionState::e_transitionToAct2) {
|
||||
if (m_speechAction != IsleScript::c_noneIsle) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_speechAction, NULL);
|
||||
}
|
||||
|
||||
m_act1state->m_state = Act1State::e_none;
|
||||
m_state->m_unk0x0c = 0;
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
UserActor()->SetActorState(LegoPathActor::c_initial);
|
||||
g_isleFlags |= Isle::c_playMusic;
|
||||
AnimationManager()->EnableCamAnims(TRUE);
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
m_mission->m_startTime = INT_MIN;
|
||||
m_mission = NULL;
|
||||
m_unk0x98 = FALSE;
|
||||
m_playedLocationAnimation = FALSE;
|
||||
m_speechAction = IsleScript::c_noneIsle;
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
TickleManager()->UnregisterClient(this);
|
||||
@ -237,14 +237,14 @@ void Pizza::StopActions()
|
||||
// FUNCTION: BETA10 0x100edd10
|
||||
MxLong Pizza::HandleClick()
|
||||
{
|
||||
if (m_state->m_unk0x0c == 1) {
|
||||
m_state->m_unk0x0c = 2;
|
||||
if (m_state->m_state == PizzaMissionState::e_introduction) {
|
||||
m_state->m_state = PizzaMissionState::e_waitAcceptingQuest;
|
||||
m_mission->m_startTime = Timer()->GetTime();
|
||||
TickleManager()->RegisterClient(this, 200);
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
}
|
||||
|
||||
if (m_state->m_unk0x0c == 2) {
|
||||
if (m_state->m_state == PizzaMissionState::e_waitAcceptingQuest) {
|
||||
m_act1state->m_state = Act1State::e_pizza;
|
||||
|
||||
if (m_skateBoard == NULL) {
|
||||
@ -266,7 +266,7 @@ MxLong Pizza::HandleClick()
|
||||
}
|
||||
|
||||
PlayAction(action, TRUE);
|
||||
m_state->m_unk0x0c = 3;
|
||||
m_state->m_state = PizzaMissionState::e_started;
|
||||
PlayMusic(JukeboxScript::c_PizzaMission_Music);
|
||||
return 1;
|
||||
}
|
||||
@ -278,12 +278,12 @@ MxLong Pizza::HandleClick()
|
||||
// FUNCTION: BETA10 0x100ede53
|
||||
MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
if (m_state->m_unk0x0c == 4) {
|
||||
if (m_state->m_state == PizzaMissionState::e_delivering) {
|
||||
MxLong time = Timer()->GetTime() - m_mission->m_startTime;
|
||||
|
||||
if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x12e &&
|
||||
GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||
m_state->m_unk0x0c = 5;
|
||||
m_state->m_state = PizzaMissionState::e_arrivedAtDestination;
|
||||
m_state->SetPlayedAction(SndanimScript::c_TRS302_OpenJailDoor);
|
||||
|
||||
if (time < m_mission->GetRedFinishTime()) {
|
||||
@ -348,20 +348,20 @@ MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
|
||||
m_state->m_unk0x0c = 5;
|
||||
m_state->m_state = PizzaMissionState::e_arrivedAtDestination;
|
||||
PlayAction(action, TRUE);
|
||||
|
||||
MxTrace("Pizza mission: ending\n");
|
||||
}
|
||||
else if (p_param.GetTrigger() == LegoPathStruct::c_w) {
|
||||
if (p_param.GetData() == 0x15e && GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||
if (!m_unk0x98) {
|
||||
m_unk0x98 = TRUE;
|
||||
if (!m_playedLocationAnimation) {
|
||||
m_playedLocationAnimation = TRUE;
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns050p1_RunAnim, NULL);
|
||||
}
|
||||
}
|
||||
else if (p_param.GetData() == 0x15f && GameState()->GetActorId() == LegoActor::c_papa && !m_unk0x98) {
|
||||
m_unk0x98 = TRUE;
|
||||
else if (p_param.GetData() == 0x15f && GameState()->GetActorId() == LegoActor::c_papa && !m_playedLocationAnimation) {
|
||||
m_playedLocationAnimation = TRUE;
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_wns050p1_RunAnim, NULL);
|
||||
}
|
||||
}
|
||||
@ -384,13 +384,13 @@ MxResult Pizza::Tickle()
|
||||
}
|
||||
|
||||
if (m_mission != NULL && m_mission->m_startTime != INT_MIN) {
|
||||
if (m_state->m_unk0x0c == 4) {
|
||||
if (m_state->m_state == PizzaMissionState::e_delivering) {
|
||||
assert(m_mission);
|
||||
|
||||
if (time > m_mission->m_startTime + m_mission->GetTimeoutTime()) {
|
||||
StopActions();
|
||||
m_mission->UpdateScore(LegoState::e_grey);
|
||||
FUN_100382b0();
|
||||
Reset();
|
||||
BackgroundAudioManager()->LowerVolume();
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_Avo917In_PlayWav, NULL);
|
||||
MxTrace("Pizza mission: timeout, stop\n");
|
||||
@ -421,7 +421,7 @@ MxResult Pizza::Tickle()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_state->m_unk0x0c == 2) {
|
||||
else if (m_state->m_state == PizzaMissionState::e_waitAcceptingQuest) {
|
||||
assert(m_mission);
|
||||
|
||||
if (Timer()->GetTime() > m_mission->m_startTime + 5000) {
|
||||
@ -429,7 +429,7 @@ MxResult Pizza::Tickle()
|
||||
m_skateBoard->EnableScenePresentation(FALSE);
|
||||
TickleManager()->UnregisterClient(this);
|
||||
m_mission->UpdateScore(LegoState::e_grey);
|
||||
m_state->m_unk0x0c = 9;
|
||||
m_state->m_state = PizzaMissionState::e_timeoutAcceptingQuest;
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
PlayAction(m_mission->GetUnknownFinishAction(), TRUE);
|
||||
MxTrace("Pizza mission: timeout, declining\n");
|
||||
@ -452,16 +452,16 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (m_state->m_unk0x0c) {
|
||||
case 1:
|
||||
switch (m_state->m_state) {
|
||||
case PizzaMissionState::e_introduction:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
m_state->m_unk0x0c = 2;
|
||||
m_state->m_state = PizzaMissionState::e_waitAcceptingQuest;
|
||||
m_mission->m_startTime = Timer()->GetTime();
|
||||
TickleManager()->RegisterClient(this, 200);
|
||||
MxTrace("Pizza mission: proposed\n");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case PizzaMissionState::e_started:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
m_mission->m_startTime = Timer()->GetTime();
|
||||
|
||||
@ -470,7 +470,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
InvokeAction(Extra::e_start, *g_isleScript, mission->GetActions()[i], NULL);
|
||||
}
|
||||
|
||||
m_state->m_unk0x0c = 4;
|
||||
m_state->m_state = PizzaMissionState::e_delivering;
|
||||
m_state->SetPlayedAction(IsleScript::c_noneIsle);
|
||||
UserActor()->SetActorState(LegoPathActor::c_initial);
|
||||
m_skateBoard->SetPizzaVisible(TRUE);
|
||||
@ -489,7 +489,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case PizzaMissionState::e_arrivedAtDestination:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
StopActions();
|
||||
|
||||
@ -497,26 +497,26 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
IsleScript::Script action = IsleScript::c_noneIsle;
|
||||
|
||||
if (!((Isle*) CurrentWorld())->HasHelicopter()) {
|
||||
switch (m_mission->m_unk0x14) {
|
||||
switch (m_mission->m_counter) {
|
||||
case 1:
|
||||
action = IsleScript::c_pja126br_RunAnim;
|
||||
m_mission->m_unk0x14++;
|
||||
m_state->m_unk0x0c = 6;
|
||||
m_mission->m_counter++;
|
||||
m_state->m_state = PizzaMissionState::e_suggestHelicopter;
|
||||
MxTrace("Pizza mission: succeeds\n");
|
||||
break;
|
||||
case 2:
|
||||
action = IsleScript::c_pja129br_RunAnim;
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 500;
|
||||
m_mission->m_unk0x14++;
|
||||
m_state->m_unk0x0c = 6;
|
||||
m_mission->m_counter++;
|
||||
m_state->m_state = PizzaMissionState::e_suggestHelicopter;
|
||||
MxTrace("Pizza mission: succeeds\n");
|
||||
break;
|
||||
case 3:
|
||||
action = IsleScript::c_pja131br_RunAnim;
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 500;
|
||||
m_state->m_unk0x0c = 6;
|
||||
m_state->m_state = PizzaMissionState::e_suggestHelicopter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -524,7 +524,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
action = IsleScript::c_pja132br_RunAnim;
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 2300;
|
||||
m_state->m_unk0x0c = 8;
|
||||
m_state->m_state = PizzaMissionState::e_transitionToAct2;
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
MxTrace("Pizza mission: go to Act2\n");
|
||||
@ -533,42 +533,42 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
PlayAction(action, TRUE);
|
||||
}
|
||||
else {
|
||||
FUN_100382b0();
|
||||
m_state->m_unk0x0c = 0;
|
||||
Reset();
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
m_state->SetPlayedAction(IsleScript::c_noneIsle);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
case PizzaMissionState::e_suggestHelicopter:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
if (objectId == IsleScript::c_pja126br_RunAnim) {
|
||||
PlayAction(IsleScript::c_pja127br_RunAnim, TRUE);
|
||||
PlayAction(IsleScript::c_pja127br_RunAnim, TRUE); // build helicopter!
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 700;
|
||||
}
|
||||
else if (objectId == IsleScript::c_pja129br_RunAnim) {
|
||||
PlayAction(IsleScript::c_pja130br_RunAnim, TRUE);
|
||||
PlayAction(IsleScript::c_pja130br_RunAnim, TRUE); // build helicopter!
|
||||
}
|
||||
else {
|
||||
FUN_100382b0();
|
||||
m_state->m_unk0x0c = 0;
|
||||
Reset();
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
m_state->SetPlayedAction(IsleScript::c_noneIsle);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
case PizzaMissionState::e_transitionToAct2:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
m_act1state->m_state = Act1State::e_none;
|
||||
m_state->m_unk0x0c = 0;
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
GameState()->m_currentArea = LegoGameState::e_isle;
|
||||
TickleManager()->UnregisterClient(this);
|
||||
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_act2main);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
case PizzaMissionState::e_timeoutAcceptingQuest:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
FUN_100382b0();
|
||||
Reset();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -594,7 +594,7 @@ void Pizza::PlayAction(MxU32 p_objectId, MxBool p_param7)
|
||||
// FUNCTION: BETA10 0x100eea25
|
||||
PizzaMissionState::PizzaMissionState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_state = PizzaMissionState::e_none;
|
||||
m_missions[0] = Mission(LegoActor::c_pepper, 2, g_pepperFinishTimes, g_pepperActions, 4);
|
||||
m_missions[1] = Mission(LegoActor::c_mama, 2, g_mamaFinishTimes, g_mamaActions, 4);
|
||||
m_missions[2] = Mission(LegoActor::c_papa, 2, g_papaFinishTimes, g_papaActions, 4);
|
||||
@ -613,7 +613,7 @@ MxResult PizzaMissionState::Serialize(LegoStorage* p_storage)
|
||||
if (p_storage->IsReadMode()) {
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
p_storage->ReadS16(m_missions[i].m_unk0x06);
|
||||
p_storage->ReadS16(m_missions[i].m_unk0x14);
|
||||
p_storage->ReadS16(m_missions[i].m_counter);
|
||||
p_storage->ReadS16(m_missions[i].m_score);
|
||||
p_storage->ReadS16(m_missions[i].m_hiScore);
|
||||
}
|
||||
@ -621,7 +621,7 @@ MxResult PizzaMissionState::Serialize(LegoStorage* p_storage)
|
||||
else if (p_storage->IsWriteMode()) {
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
p_storage->WriteS16(m_missions[i].m_unk0x06);
|
||||
p_storage->WriteS16(m_missions[i].m_unk0x14);
|
||||
p_storage->WriteS16(m_missions[i].m_counter);
|
||||
p_storage->WriteS16(m_missions[i].m_score);
|
||||
p_storage->WriteS16(m_missions[i].m_hiScore);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void Pizzeria::CreateState()
|
||||
// FUNCTION: BETA10 0x100efc91
|
||||
MxLong Pizzeria::HandleClick()
|
||||
{
|
||||
if (CanExit() && m_pizzaMissionState->m_unk0x0c == 0) {
|
||||
if (CanExit() && m_pizzaMissionState->m_state == PizzaMissionState::e_none) {
|
||||
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
if (!UserActor()->IsA("SkateBoard")) {
|
||||
((IslePathActor*) UserActor())->Exit();
|
||||
@ -79,7 +79,7 @@ MxLong Pizzeria::HandleClick()
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
|
||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||
pizza->FUN_10038220((IsleScript::Script) m_pizzeriaState->NextAction());
|
||||
pizza->Start((IsleScript::Script) m_pizzeriaState->NextAction());
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -59,7 +59,7 @@ void SkateBoard::Exit()
|
||||
if (m_act1state->m_state == Act1State::e_pizza) {
|
||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||
pizza->StopActions();
|
||||
pizza->FUN_100382b0();
|
||||
pizza->Reset();
|
||||
m_pizzaVisible = FALSE;
|
||||
}
|
||||
|
||||
|
@ -1179,28 +1179,28 @@ void LegoGameState::Init()
|
||||
Helicopter* copter = (Helicopter*) isle->Find(*g_copterScript, CopterScript::c_Helicopter_Actor);
|
||||
if (copter) {
|
||||
isle->RemoveActor(copter);
|
||||
isle->VTable0x6c(copter);
|
||||
isle->RemoveVehicle(copter);
|
||||
delete copter;
|
||||
}
|
||||
|
||||
DuneBuggy* dunebuggy = (DuneBuggy*) isle->Find(*g_dunecarScript, DunecarScript::c_DuneBugy_Actor);
|
||||
if (dunebuggy) {
|
||||
isle->RemoveActor(dunebuggy);
|
||||
isle->VTable0x6c(dunebuggy);
|
||||
isle->RemoveVehicle(dunebuggy);
|
||||
delete dunebuggy;
|
||||
}
|
||||
|
||||
Jetski* jetski = (Jetski*) isle->Find(*g_jetskiScript, JetskiScript::c_Jetski_Actor);
|
||||
if (jetski) {
|
||||
isle->RemoveActor(jetski);
|
||||
isle->VTable0x6c(jetski);
|
||||
isle->RemoveVehicle(jetski);
|
||||
delete jetski;
|
||||
}
|
||||
|
||||
RaceCar* racecar = (RaceCar*) isle->Find(*g_racecarScript, RacecarScript::c_RaceCar_Actor);
|
||||
if (racecar) {
|
||||
isle->RemoveActor(racecar);
|
||||
isle->VTable0x6c(racecar);
|
||||
isle->RemoveVehicle(racecar);
|
||||
delete racecar;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ Isle::~Isle()
|
||||
}
|
||||
|
||||
if (UserActor() != NULL) {
|
||||
VTable0x6c(UserActor());
|
||||
RemoveVehicle(UserActor());
|
||||
}
|
||||
|
||||
NotificationManager()->Unregister(this);
|
||||
@ -275,7 +275,7 @@ void Isle::ReadyWorld()
|
||||
}
|
||||
else if (GameState()->GetLoadedAct() != LegoGameState::e_act1) {
|
||||
EnableAnimations(TRUE);
|
||||
FUN_10032620();
|
||||
CheckAreaExiting();
|
||||
m_act1state->PlaceActors();
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
@ -584,7 +584,7 @@ void Isle::Enable(MxBool p_enable)
|
||||
actor->SetActorState(LegoPathActor::c_initial);
|
||||
}
|
||||
else {
|
||||
FUN_10032620();
|
||||
CheckAreaExiting();
|
||||
}
|
||||
|
||||
switch (GameState()->m_currentArea) {
|
||||
@ -858,7 +858,7 @@ void Isle::Enable(MxBool p_enable)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10032620
|
||||
void Isle::FUN_10032620()
|
||||
void Isle::CheckAreaExiting()
|
||||
{
|
||||
VideoManager()->Get3DManager()->SetFrustrum(90.0, 0.1, 250.0);
|
||||
|
||||
@ -909,17 +909,27 @@ MxLong Isle::HandleTransitionEnd()
|
||||
case LegoGameState::e_elevride:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
VariableTable()->SetVariable("VISIBILITY", "Hide infocen");
|
||||
FUN_10032d30(IsleScript::c_ElevRide_Background_Bitmap, JukeboxScript::c_Elevator_Music, "LCAMZI1,90", FALSE);
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevRide_Background_Bitmap,
|
||||
JukeboxScript::c_Elevator_Music,
|
||||
"LCAMZI1,90",
|
||||
FALSE
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_elevride2:
|
||||
FUN_10032d30(IsleScript::c_ElevRide_Background_Bitmap, JukeboxScript::c_Elevator_Music, "LCAMZI2,90", FALSE);
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevRide_Background_Bitmap,
|
||||
JukeboxScript::c_Elevator_Music,
|
||||
"LCAMZI2,90",
|
||||
FALSE
|
||||
);
|
||||
|
||||
if (m_destLocation == LegoGameState::e_undefined) {
|
||||
((MxStillPresenter*) Find(m_atomId, IsleScript::c_Meter3_Bitmap))->Enable(TRUE);
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_elevopen:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevOpen_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIS,90",
|
||||
@ -927,7 +937,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_seaview:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_SeaView_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIE,90",
|
||||
@ -935,7 +945,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_observe:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_Observe_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIW,90",
|
||||
@ -943,7 +953,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_elevdown:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevDown_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIN,90",
|
||||
@ -953,7 +963,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
case LegoGameState::e_garadoor:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
VariableTable()->SetVariable("VISIBILITY", "Hide Gas");
|
||||
FUN_10032d30(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE);
|
||||
TransitionToOverlay(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE);
|
||||
break;
|
||||
case LegoGameState::e_garageExited:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@ -978,7 +988,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
case LegoGameState::e_polidoor:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
VariableTable()->SetVariable("VISIBILITY", "Hide Policsta");
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_PoliDoor_Background_Bitmap,
|
||||
JukeboxScript::c_PoliceStation_Music,
|
||||
"LCAMZP1,90",
|
||||
@ -987,7 +997,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
break;
|
||||
case LegoGameState::e_bike:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_bike->ActivateSceneActions();
|
||||
@ -995,7 +1005,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
break;
|
||||
case LegoGameState::e_dunecar:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_dunebuggy->ActivateSceneActions();
|
||||
@ -1003,7 +1013,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
break;
|
||||
case LegoGameState::e_motocycle:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_motocycle->ActivateSceneActions();
|
||||
@ -1011,11 +1021,11 @@ MxLong Isle::HandleTransitionEnd()
|
||||
break;
|
||||
case LegoGameState::e_copter:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
break;
|
||||
case LegoGameState::e_skateboard:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_skateboard->ActivateSceneActions();
|
||||
@ -1024,7 +1034,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
case LegoGameState::e_ambulance:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_state = Act1State::e_ambulance;
|
||||
FUN_10032d30(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_ambulance->ActivateSceneActions();
|
||||
@ -1033,7 +1043,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
case LegoGameState::e_towtrack:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_state = Act1State::e_towtrack;
|
||||
FUN_10032d30(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_towtrack->ActivateSceneActions();
|
||||
@ -1041,7 +1051,12 @@ MxLong Isle::HandleTransitionEnd()
|
||||
break;
|
||||
case LegoGameState::e_jetski:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30((IsleScript::Script) m_jetski->GetUnknown0x160(), JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(
|
||||
(IsleScript::Script) m_jetski->GetJetskiDashboardStreamId(),
|
||||
JukeboxScript::c_MusicTheme1,
|
||||
NULL,
|
||||
TRUE
|
||||
);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_jetski->ActivateSceneActions();
|
||||
@ -1056,11 +1071,11 @@ MxLong Isle::HandleTransitionEnd()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10032d30
|
||||
void Isle::FUN_10032d30(
|
||||
void Isle::TransitionToOverlay(
|
||||
IsleScript::Script p_script,
|
||||
JukeboxScript::Script p_music,
|
||||
const char* p_cameraLocation,
|
||||
MxBool p_und
|
||||
MxBool p_setCamera
|
||||
)
|
||||
{
|
||||
if (m_act1state->m_unk0x01f) {
|
||||
@ -1071,7 +1086,7 @@ void Isle::FUN_10032d30(
|
||||
PlayMusic(p_music);
|
||||
}
|
||||
|
||||
if (p_und) {
|
||||
if (p_setCamera) {
|
||||
InputManager()->SetCamera(m_cameraController);
|
||||
}
|
||||
else {
|
||||
@ -1143,7 +1158,7 @@ void Isle::Add(MxCore* p_object)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10033050
|
||||
void Isle::VTable0x6c(LegoPathActor* p_actor)
|
||||
void Isle::RemoveVehicle(LegoPathActor* p_actor)
|
||||
{
|
||||
LegoWorld::Remove(p_actor);
|
||||
|
||||
@ -1197,7 +1212,7 @@ MxBool Isle::Escape()
|
||||
case Act1State::e_pizza:
|
||||
if (UserActor() != NULL) {
|
||||
m_pizza->StopActions();
|
||||
m_pizza->FUN_100382b0();
|
||||
m_pizza->Reset();
|
||||
}
|
||||
break;
|
||||
case Act1State::e_towtrack:
|
||||
@ -1245,7 +1260,7 @@ MxBool Isle::Escape()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10033350
|
||||
void Isle::FUN_10033350()
|
||||
void Isle::SwitchToInfocenter()
|
||||
{
|
||||
if (m_act1state->m_state == Act1State::e_ambulance) {
|
||||
if (UserActor() != NULL && !UserActor()->IsA("Ambulance")) {
|
||||
@ -1264,7 +1279,7 @@ void Isle::FUN_10033350()
|
||||
if (m_act1state->m_state == Act1State::e_pizza) {
|
||||
if (UserActor() != NULL) {
|
||||
m_pizza->StopActions();
|
||||
m_pizza->FUN_100382b0();
|
||||
m_pizza->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1572,7 +1587,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_helicopter->UpdatePlane(m_helicopterPlane);
|
||||
m_helicopter = isle->m_helicopter;
|
||||
isle->RemoveActor(m_helicopter);
|
||||
isle->VTable0x6c(m_helicopter);
|
||||
isle->RemoveVehicle(m_helicopter);
|
||||
m_helicopter->SetBoundary(NULL);
|
||||
m_helicopter->SetController(NULL);
|
||||
}
|
||||
@ -1581,7 +1596,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_jetski->UpdatePlane(m_jetskiPlane);
|
||||
m_jetski = isle->m_jetski;
|
||||
isle->RemoveActor(m_jetski);
|
||||
isle->VTable0x6c(m_jetski);
|
||||
isle->RemoveVehicle(m_jetski);
|
||||
m_jetski->SetBoundary(NULL);
|
||||
m_jetski->SetController(NULL);
|
||||
}
|
||||
@ -1590,7 +1605,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_dunebuggy->UpdatePlane(m_dunebuggyPlane);
|
||||
m_dunebuggy = isle->m_dunebuggy;
|
||||
isle->RemoveActor(m_dunebuggy);
|
||||
isle->VTable0x6c(m_dunebuggy);
|
||||
isle->RemoveVehicle(m_dunebuggy);
|
||||
m_dunebuggy->SetBoundary(NULL);
|
||||
m_dunebuggy->SetController(NULL);
|
||||
}
|
||||
@ -1599,7 +1614,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_racecar->UpdatePlane(m_racecarPlane);
|
||||
m_racecar = isle->m_racecar;
|
||||
isle->RemoveActor(m_racecar);
|
||||
isle->VTable0x6c(m_racecar);
|
||||
isle->RemoveVehicle(m_racecar);
|
||||
m_racecar->SetBoundary(NULL);
|
||||
m_racecar->SetController(NULL);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user