Implement/match Isle::HandleTransitionEnd

This commit is contained in:
Christian Semmler 2024-03-17 12:21:45 -04:00
parent 4197e3c326
commit 77c6f6799b
40 changed files with 323 additions and 43 deletions

View File

@ -2435,6 +2435,8 @@ enum Script {
c_hho141cl_Pho_684 = 2427, c_hho141cl_Pho_684 = 2427,
c_hho142cl_0_sfx = 2428, c_hho142cl_0_sfx = 2428,
c_hho142cl_1_sfx = 2429, c_hho142cl_1_sfx = 2429,
};
enum Script2 {
c_hho142cl_2_sfx = 2430, c_hho142cl_2_sfx = 2430,
c_hho142cl_3_sfx = 2431, c_hho142cl_3_sfx = 2431,
c_hho142cl_4_sfx = 2432, c_hho142cl_4_sfx = 2432,
@ -3671,7 +3673,7 @@ enum Script {
c_srt004in_Anim = 3663, c_srt004in_Anim = 3663,
c_IRTX08RA_Wav_868 = 3664, c_IRTX08RA_Wav_868 = 3664,
c_nrtflag0_Anim = 3665, c_nrtflag0_Anim = 3665,
c_WNS050P1_Wav = 3666, c_WNS050P1_Wav_X = 3666,
c_wns050p1_0_sfx = 3667, c_wns050p1_0_sfx = 3667,
c_wns050p1_1_sfx = 3668, c_wns050p1_1_sfx = 3668,
c_wns050p1_Anim = 3669, c_wns050p1_Anim = 3669,

View File

@ -34,6 +34,7 @@ class Ambulance : public IslePathActor {
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_10036e60(); void FUN_10036e60();
void FUN_10037060();
// SYNTHETIC: LEGO1 0x10036130 // SYNTHETIC: LEGO1 0x10036130
// Ambulance::`scalar deleting destructor' // Ambulance::`scalar deleting destructor'

View File

@ -28,6 +28,8 @@ class Bike : public IslePathActor {
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_10076b60();
// SYNTHETIC: LEGO1 0x10076880 // SYNTHETIC: LEGO1 0x10076880
// Bike::`scalar deleting destructor' // Bike::`scalar deleting destructor'

View File

@ -30,6 +30,8 @@ class DuneBuggy : public IslePathActor {
MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_10068350();
// SYNTHETIC: LEGO1 0x10067dc0 // SYNTHETIC: LEGO1 0x10067dc0
// DuneBuggy::`scalar deleting destructor' // DuneBuggy::`scalar deleting destructor'

View File

@ -8,6 +8,11 @@
#include "mxstillpresenter.h" #include "mxstillpresenter.h"
#include "radio.h" #include "radio.h"
namespace HospitalScript
{
enum Script;
}
// VTABLE: LEGO1 0x100d9730 // VTABLE: LEGO1 0x100d9730
// SIZE 0x12c // SIZE 0x12c
class Hospital : public LegoWorld { class Hospital : public LegoWorld {

View File

@ -2,7 +2,6 @@
#define HOSPITALSTATE_H #define HOSPITALSTATE_H
#include "decomp.h" #include "decomp.h"
#include "hospital_actions.h"
#include "legostate.h" #include "legostate.h"
// VTABLE: LEGO1 0x100d97a0 // VTABLE: LEGO1 0x100d97a0

View File

@ -1,7 +1,6 @@
#ifndef INFOCENTER_H #ifndef INFOCENTER_H
#define INFOCENTER_H #define INFOCENTER_H
#include "infomain_actions.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoworld.h" #include "legoworld.h"
#include "mxrect32.h" #include "mxrect32.h"
@ -11,6 +10,11 @@ class InfocenterState;
class MxStillPresenter; class MxStillPresenter;
class LegoControlManagerEvent; class LegoControlManagerEvent;
namespace InfomainScript
{
enum Script;
}
// SIZE 0x18 // SIZE 0x18
struct InfocenterMapEntry { struct InfocenterMapEntry {
// FUNCTION: LEGO1 0x1006ec80 // FUNCTION: LEGO1 0x1006ec80
@ -93,7 +97,7 @@ class Infocenter : public LegoWorld {
void StartCredits(); void StartCredits();
void StopCredits(); void StopCredits();
void PlayAction(InfomainScript::Script p_objectId); void PlayAction(InfomainScript::Script p_script);
void StopCurrentAction(); void StopCurrentAction();
void PlayBookAnimation(); void PlayBookAnimation();

View File

@ -19,6 +19,16 @@ class RaceCar;
class Jetski; class Jetski;
class Act1State; class Act1State;
namespace IsleScript
{
enum Script;
}
namespace JukeboxScript
{
enum Script;
}
// VTABLE: LEGO1 0x100d6fb8 // VTABLE: LEGO1 0x100d6fb8
// SIZE 0x140 // SIZE 0x140
class Isle : public LegoWorld { class Isle : public LegoWorld {
@ -66,28 +76,34 @@ class Isle : public LegoWorld {
MxLong HandleTransitionEnd(); MxLong HandleTransitionEnd();
void FUN_10032620(); void FUN_10032620();
void FUN_100330e0(); void FUN_100330e0();
void FUN_10032d30(
IsleScript::Script p_script,
JukeboxScript::Script p_music,
const char* p_cameraLocation,
MxBool p_und
);
inline void SetUnknown13c(LegoGameState::Area p_unk0x13c) { m_unk0x13c = p_unk0x13c; } inline void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
// SYNTHETIC: LEGO1 0x10030a30 // SYNTHETIC: LEGO1 0x10030a30
// Isle::`scalar deleting destructor' // Isle::`scalar deleting destructor'
protected: protected:
Act1State* m_act1state; // 0xf8 Act1State* m_act1state; // 0xf8
Pizza* m_pizza; // 0xfc Pizza* m_pizza; // 0xfc
Pizzeria* m_pizzeria; // 0x100 Pizzeria* m_pizzeria; // 0x100
TowTrack* m_towtrack; // 0x104 TowTrack* m_towtrack; // 0x104
Ambulance* m_ambulance; // 0x108 Ambulance* m_ambulance; // 0x108
JukeBoxEntity* m_jukebox; // 0x10c JukeBoxEntity* m_jukebox; // 0x10c
Helicopter* m_helicopter; // 0x110 Helicopter* m_helicopter; // 0x110
Bike* m_bike; // 0x114 Bike* m_bike; // 0x114
DuneBuggy* m_dunebuggy; // 0x118 DuneBuggy* m_dunebuggy; // 0x118
Motocycle* m_motocycle; // 0x11c Motocycle* m_motocycle; // 0x11c
SkateBoard* m_skateboard; // 0x120 SkateBoard* m_skateboard; // 0x120
RaceCar* m_racecar; // 0x124 RaceCar* m_racecar; // 0x124
Jetski* m_jetski; // 0x128 Jetski* m_jetski; // 0x128
Radio m_radio; // 0x12c Radio m_radio; // 0x12c
LegoGameState::Area m_unk0x13c; // 0x13c LegoGameState::Area m_destLocation; // 0x13c
}; };
#endif // ISLE_H #endif // ISLE_H

View File

@ -30,12 +30,17 @@ class Jetski : public IslePathActor {
MxU32 VTable0xd4(LegoControlManagerEvent&) override; // vtable+0xd4 MxU32 VTable0xd4(LegoControlManagerEvent&) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_1007e990();
inline MxS16 GetUnknown0x160() { return m_unk0x160; }
// SYNTHETIC: LEGO1 0x1007e5c0 // SYNTHETIC: LEGO1 0x1007e5c0
// Jetski::`scalar deleting destructor' // Jetski::`scalar deleting destructor'
private: private:
// TODO: Jetski fields // TODO: Jetski fields
undefined m_unk0x160[4]; MxS16 m_unk0x160; // 0x160
undefined m_unk0x162[2]; // 0x162
}; };
#endif // JETSKI_H #endif // JETSKI_H

View File

@ -2,9 +2,7 @@
#define JUKEBOX_H #define JUKEBOX_H
#include "decomp.h" #include "decomp.h"
#include "jukebox_actions.h"
#include "jukeboxstate.h" #include "jukeboxstate.h"
#include "jukeboxw_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoworld.h" #include "legoworld.h"

View File

@ -81,8 +81,9 @@ class LegoGameState {
e_unk59, e_unk59,
e_unk60, e_unk60,
e_unk61, e_unk61,
e_unk62,
e_unk64 = 64, e_unk63,
e_unk64,
e_unk66 = 66 e_unk66 = 66
}; };

View File

@ -26,6 +26,11 @@ class MxTransitionManager;
class ViewLODListManager; class ViewLODListManager;
class ViewManager; class ViewManager;
namespace JukeboxScript
{
enum Script;
}
extern MxBool g_isWorldActive; extern MxBool g_isWorldActive;
LegoOmni* Lego(); LegoOmni* Lego();
@ -49,7 +54,7 @@ ViewLODListManager* GetViewLODListManager();
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid); LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
LegoROI* FindROI(const char* p_name); LegoROI* FindROI(const char* p_name);
MxDSAction& GetCurrentAction(); MxDSAction& GetCurrentAction();
void PlayMusic(MxU32 p_index); void PlayMusic(JukeboxScript::Script p_script);
void SetIsWorldActive(MxBool p_isWorldActive); void SetIsWorldActive(MxBool p_isWorldActive);
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last); void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
void SetCurrentWorld(LegoWorld* p_world); void SetCurrentWorld(LegoWorld* p_world);

View File

@ -30,6 +30,8 @@ class Motocycle : public IslePathActor {
MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_10035e10();
// SYNTHETIC: LEGO1 0x100359d0 // SYNTHETIC: LEGO1 0x100359d0
// Motocycle::`scalar deleting destructor' // Motocycle::`scalar deleting destructor'

View File

@ -6,7 +6,6 @@
#include "legogamestate.h" #include "legogamestate.h"
#include "legoworld.h" #include "legoworld.h"
#include "mxdsaction.h" #include "mxdsaction.h"
#include "police_actions.h"
#include "radio.h" #include "radio.h"
class PoliceState; class PoliceState;

View File

@ -5,6 +5,11 @@
#include "legostate.h" #include "legostate.h"
#include "police.h" #include "police.h"
namespace PoliceScript
{
enum Script;
}
// VTABLE: LEGO1 0x100d8af0 // VTABLE: LEGO1 0x100d8af0
// SIZE 0x10 // SIZE 0x10
class PoliceState : public LegoState { class PoliceState : public LegoState {

View File

@ -29,6 +29,8 @@ class SkateBoard : public IslePathActor {
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_10010510();
// SYNTHETIC: LEGO1 0x1000ff60 // SYNTHETIC: LEGO1 0x1000ff60
// SkateBoard::`scalar deleting destructor' // SkateBoard::`scalar deleting destructor'

View File

@ -33,6 +33,7 @@ class TowTrack : public IslePathActor {
void VTable0xe4() override; // vtable+0xe4 void VTable0xe4() override; // vtable+0xe4
void FUN_1004dab0(); void FUN_1004dab0();
void FUN_1004dad0();
// SYNTHETIC: LEGO1 0x1004c950 // SYNTHETIC: LEGO1 0x1004c950
// TowTrack::`scalar deleting destructor' // TowTrack::`scalar deleting destructor'

View File

@ -79,6 +79,12 @@ MxU32 Ambulance::VTable0xd4(LegoControlManagerEvent& p_param)
return 0; return 0;
} }
// STUB: LEGO1 0x10037060
void Ambulance::FUN_10037060()
{
// TODO
}
// STUB: LEGO1 0x10037160 // STUB: LEGO1 0x10037160
MxResult Ambulance::Tickle() MxResult Ambulance::Tickle()
{ {

View File

@ -56,3 +56,9 @@ MxU32 Bike::VTable0xd4(LegoControlManagerEvent& p_param)
// TODO // TODO
return 0; return 0;
} }
// STUB: LEGO1 0x10076b60
void Bike::FUN_10076b60()
{
// TODO
}

View File

@ -50,3 +50,9 @@ MxU32 DuneBuggy::VTable0xdc(MxType19NotificationParam& p_param)
// TODO // TODO
return 0; return 0;
} }
// STUB: LEGO1 0x10068350
void DuneBuggy::FUN_10068350()
{
// TODO
}

View File

@ -4,6 +4,7 @@
#include "act3.h" #include "act3.h"
#include "isle.h" #include "isle.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
@ -114,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())->SetUnknown13c(LegoGameState::e_unk60); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_unk60);
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);
@ -229,7 +230,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
break; break;
case 0x1c: case 0x1c:
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
((Isle*) CurrentWorld())->SetUnknown13c(LegoGameState::e_infomain); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
VTable0xe4(); VTable0xe4();
} }

View File

@ -42,3 +42,9 @@ MxU32 Jetski::VTable0xd4(LegoControlManagerEvent& p_param)
// TODO // TODO
return 0; return 0;
} }
// STUB: LEGO1 0x1007e990
void Jetski::FUN_1007e990()
{
// TODO
}

View File

@ -36,7 +36,7 @@ MxLong JukeBoxEntity::Notify(MxParam& p_param)
CurrentActor()->VTable0xe4(); CurrentActor()->VTable0xe4();
} }
((Isle*) FindWorld(*g_isleScript, 0))->SetUnknown13c(LegoGameState::e_jukeboxw); ((Isle*) FindWorld(*g_isleScript, 0))->SetDestLocation(LegoGameState::e_jukeboxw);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
return 1; return 1;
} }

View File

@ -50,3 +50,9 @@ MxU32 Motocycle::VTable0xdc(MxType19NotificationParam& p_param)
// TODO // TODO
return 0; return 0;
} }
// STUB: LEGO1 0x10035e10
void Motocycle::FUN_10035e10()
{
// TODO
}

View File

@ -50,3 +50,9 @@ MxU32 SkateBoard::VTable0xd0()
// TODO // TODO
return 0; return 0;
} }
// STUB: LEGO1 0x10010510
void SkateBoard::FUN_10010510()
{
// TODO
}

View File

@ -75,3 +75,9 @@ void TowTrack::FUN_1004dab0()
{ {
// TODO // TODO
} }
// STUB: LEGO1 0x1004dad0
void TowTrack::FUN_1004dad0()
{
// TODO
}

View File

@ -164,12 +164,11 @@ MxTransitionManager* TransitionManager()
} }
// FUNCTION: LEGO1 0x10015910 // FUNCTION: LEGO1 0x10015910
void PlayMusic(MxU32 p_index) void PlayMusic(JukeboxScript::Script p_script)
{ {
// index is the entityid of the music in jukebox.si
MxDSAction action; MxDSAction action;
action.SetAtomId(*g_jukeboxScript); action.SetAtomId(*g_jukeboxScript);
action.SetObjectId(p_index); action.SetObjectId(p_script);
LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4); LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4);
} }

View File

@ -1,6 +1,7 @@
#include "infocenterstate.h" #include "infocenterstate.h"
#include "infocenter.h" #include "infocenter.h"
#include "infomain_actions.h"
DECOMP_SIZE_ASSERT(InfocenterState, 0x94); DECOMP_SIZE_ASSERT(InfocenterState, 0x94);

View File

@ -1,6 +1,7 @@
#include "radiostate.h" #include "radiostate.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legoomni.h" #include "legoomni.h"
#include "mxmisc.h" #include "mxmisc.h"
#include "mxtimer.h" #include "mxtimer.h"

View File

@ -6,6 +6,7 @@
#include "mxdsaction.h" #include "mxdsaction.h"
#include "mxmisc.h" #include "mxmisc.h"
#include "police.h" #include "police.h"
#include "police_actions.h"
#include <stdlib.h> #include <stdlib.h>

View File

@ -2,6 +2,7 @@
#include "act1state.h" #include "act1state.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"

View File

@ -1,6 +1,7 @@
#include "historybook.h" #include "historybook.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"
#include "misc.h" #include "misc.h"

View File

@ -1,7 +1,9 @@
#include "hospital.h" #include "hospital.h"
#include "hospital_actions.h"
#include "islepathactor.h" #include "islepathactor.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"
#include "legoomni.h" #include "legoomni.h"

View File

@ -4,7 +4,9 @@
#include "credits_actions.h" #include "credits_actions.h"
#include "helicopterstate.h" #include "helicopterstate.h"
#include "infocenterstate.h" #include "infocenterstate.h"
#include "infomain_actions.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legoact2state.h" #include "legoact2state.h"
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
#include "legobuildingmanager.h" #include "legobuildingmanager.h"
@ -1412,14 +1414,14 @@ void Infocenter::StopCredits()
} }
// FUNCTION: LEGO1 0x10071300 // FUNCTION: LEGO1 0x10071300
void Infocenter::PlayAction(InfomainScript::Script p_objectId) void Infocenter::PlayAction(InfomainScript::Script p_script)
{ {
MxDSAction action; MxDSAction action;
action.SetObjectId(p_objectId); action.SetObjectId(p_script);
action.SetAtomId(*g_infomainScript); action.SetAtomId(*g_infomainScript);
StopCurrentAction(); StopCurrentAction();
m_currentInfomainScript = p_objectId; m_currentInfomainScript = p_script;
BackgroundAudioManager()->LowerVolume(); BackgroundAudioManager()->LowerVolume();
Start(&action); Start(&action);
} }

View File

@ -2,6 +2,7 @@
#include "infocenterstate.h" #include "infocenterstate.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"

View File

@ -6,9 +6,11 @@
#include "carracestate.h" #include "carracestate.h"
#include "dunebuggy.h" #include "dunebuggy.h"
#include "helicopter.h" #include "helicopter.h"
#include "isle_actions.h"
#include "islepathactor.h" #include "islepathactor.h"
#include "jetski.h" #include "jetski.h"
#include "jetskiracestate.h" #include "jetskiracestate.h"
#include "jukebox_actions.h"
#include "jukeboxentity.h" #include "jukeboxentity.h"
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
@ -20,6 +22,7 @@
#include "motocycle.h" #include "motocycle.h"
#include "mxmisc.h" #include "mxmisc.h"
#include "mxnotificationmanager.h" #include "mxnotificationmanager.h"
#include "mxstillpresenter.h"
#include "mxtransitionmanager.h" #include "mxtransitionmanager.h"
#include "pizza.h" #include "pizza.h"
#include "skateboard.h" #include "skateboard.h"
@ -48,7 +51,7 @@ Isle::Isle()
m_racecar = NULL; m_racecar = NULL;
m_jetski = NULL; m_jetski = NULL;
m_act1state = 0; m_act1state = 0;
m_unk0x13c = LegoGameState::e_undefined; m_destLocation = LegoGameState::e_undefined;
NotificationManager()->Register(this); NotificationManager()->Register(this);
} }
@ -89,7 +92,7 @@ MxResult Isle::Create(MxDSAction& p_dsAction)
GameState()->StopArea(LegoGameState::e_act2main); // Looks like a bug GameState()->StopArea(LegoGameState::e_act2main); // Looks like a bug
break; break;
case LegoGameState::e_actNotFound: case LegoGameState::e_actNotFound:
m_unk0x13c = LegoGameState::e_infomain; m_destLocation = LegoGameState::e_infomain;
} }
if (GameState()->GetCurrentArea() == LegoGameState::e_isle) { if (GameState()->GetCurrentArea() == LegoGameState::e_isle) {
@ -257,7 +260,7 @@ void Isle::Enable(MxBool p_enable)
switch (GameState()->m_currentArea) { switch (GameState()->m_currentArea) {
case LegoGameState::e_elevride: case LegoGameState::e_elevride:
m_unk0x13c = LegoGameState::e_elevride; m_destLocation = LegoGameState::e_elevride;
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
@ -288,7 +291,7 @@ void Isle::Enable(MxBool p_enable)
#endif #endif
break; break;
case LegoGameState::e_garadoor: case LegoGameState::e_garadoor:
m_unk0x13c = LegoGameState::e_garadoor; m_destLocation = LegoGameState::e_garadoor;
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
@ -302,7 +305,7 @@ void Isle::Enable(MxBool p_enable)
SetIsWorldActive(FALSE); SetIsWorldActive(FALSE);
break; break;
case LegoGameState::e_polidoor: case LegoGameState::e_polidoor:
m_unk0x13c = LegoGameState::e_polidoor; m_destLocation = LegoGameState::e_polidoor;
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
@ -542,10 +545,180 @@ void Isle::FUN_10032620()
// TODO // TODO
} }
// STUB: LEGO1 0x100327a0 // FUNCTION: LEGO1 0x100327a0
MxLong Isle::HandleTransitionEnd() MxLong Isle::HandleTransitionEnd()
{ {
return 0; InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_Avo917In_PlayWav, NULL);
DeleteObjects(&m_atom, IsleScript::c_Avo900Ps_PlayWav, IsleScript::c_Avo907Ps_PlayWav);
if (m_destLocation != LegoGameState::e_unk61) {
m_act1state->m_unk0x018 = 0;
}
switch (m_destLocation) {
case LegoGameState::e_infomain:
((LegoEntity*) Find(*g_isleScript, IsleScript::c_InfoCenter_Entity))->GetROI()->SetUnknown0x0c(1);
GameState()->SwitchArea(m_destLocation);
m_destLocation = LegoGameState::e_undefined;
break;
case LegoGameState::e_elevride:
m_act1state->m_unk0x01f = 1;
VariableTable()->SetVariable("VISIBILITY", "Hide infocen");
FUN_10032d30(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);
if (m_destLocation == LegoGameState::e_undefined) {
((MxStillPresenter*) Find(m_atom, IsleScript::c_Meter3_Bitmap))->Enable(TRUE);
}
break;
case LegoGameState::e_elevopen:
FUN_10032d30(
IsleScript::c_ElevOpen_Background_Bitmap,
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
"LCAMZIS,90",
FALSE
);
break;
case LegoGameState::e_seaview:
FUN_10032d30(
IsleScript::c_SeaView_Background_Bitmap,
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
"LCAMZIE,90",
FALSE
);
break;
case LegoGameState::e_observe:
FUN_10032d30(
IsleScript::c_Observe_Background_Bitmap,
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
"LCAMZIW,90",
FALSE
);
break;
case LegoGameState::e_elevdown:
FUN_10032d30(
IsleScript::c_ElevDown_Background_Bitmap,
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
"LCAMZIN,90",
FALSE
);
break;
case LegoGameState::e_garadoor:
m_act1state->m_unk0x01f = 1;
VariableTable()->SetVariable("VISIBILITY", "Hide Gas");
FUN_10032d30(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE);
break;
case LegoGameState::e_unk28:
GameState()->SwitchArea(m_destLocation);
GameState()->StopArea(LegoGameState::e_previousArea);
m_destLocation = LegoGameState::e_undefined;
VariableTable()->SetVariable("VISIBILITY", "Show Gas");
AnimationManager()->FUN_1005f0b0();
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
SetAppCursor(0);
SetIsWorldActive(TRUE);
break;
case LegoGameState::e_unk33:
GameState()->SwitchArea(m_destLocation);
GameState()->StopArea(LegoGameState::e_previousArea);
m_destLocation = LegoGameState::e_undefined;
VariableTable()->SetVariable("VISIBILITY", "Show Policsta");
AnimationManager()->FUN_1005f0b0();
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
SetAppCursor(0);
SetIsWorldActive(TRUE);
break;
case LegoGameState::e_polidoor:
m_act1state->m_unk0x01f = 1;
VariableTable()->SetVariable("VISIBILITY", "Hide Policsta");
FUN_10032d30(
IsleScript::c_PoliDoor_Background_Bitmap,
JukeboxScript::c_PoliceStation_Music,
"LCAMZP1,90",
FALSE
);
break;
case LegoGameState::e_unk57:
m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_bike->FUN_10076b60();
}
break;
case LegoGameState::e_unk58:
m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_dunebuggy->FUN_10068350();
}
break;
case LegoGameState::e_unk59:
m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_motocycle->FUN_10035e10();
}
break;
case LegoGameState::e_unk60:
m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
break;
case LegoGameState::e_unk61:
m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_skateboard->FUN_10010510();
}
break;
case LegoGameState::e_unk62:
m_act1state->m_unk0x01f = 1;
m_act1state->m_unk0x018 = 10;
FUN_10032d30(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_ambulance->FUN_10037060();
}
break;
case LegoGameState::e_unk63:
m_act1state->m_unk0x01f = 1;
m_act1state->m_unk0x018 = 8;
FUN_10032d30(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_towtrack->FUN_1004dad0();
}
break;
case LegoGameState::e_unk64:
m_act1state->m_unk0x01f = 1;
FUN_10032d30((IsleScript::Script) m_jetski->GetUnknown0x160(), JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (m_act1state->m_unk0x01f == 0) {
m_jetski->FUN_1007e990();
}
break;
default:
GameState()->SwitchArea(m_destLocation);
m_destLocation = LegoGameState::e_undefined;
}
return 1;
}
// STUB: LEGO1 0x10032d30
void Isle::FUN_10032d30(
IsleScript::Script p_script,
JukeboxScript::Script p_music,
const char* p_cameraLocation,
MxBool p_und
)
{
// TODO
} }
// FUNCTION: LEGO1 0x10032f10 // FUNCTION: LEGO1 0x10032f10

View File

@ -1,7 +1,9 @@
#include "jukebox.h" #include "jukebox.h"
#include "act1state.h" #include "act1state.h"
#include "jukebox_actions.h"
#include "jukeboxstate.h" #include "jukeboxstate.h"
#include "jukeboxw_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"

View File

@ -1,6 +1,7 @@
#include "police.h" #include "police.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"
@ -10,6 +11,7 @@
#include "mxmisc.h" #include "mxmisc.h"
#include "mxnotificationmanager.h" #include "mxnotificationmanager.h"
#include "mxtransitionmanager.h" #include "mxtransitionmanager.h"
#include "police_actions.h"
#include "policestate.h" #include "policestate.h"
DECOMP_SIZE_ASSERT(Police, 0x110) DECOMP_SIZE_ASSERT(Police, 0x110)

View File

@ -1,6 +1,7 @@
#include "registrationbook.h" #include "registrationbook.h"
#include "infocenterstate.h" #include "infocenterstate.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"

View File

@ -2,6 +2,7 @@
#include "ambulancemissionstate.h" #include "ambulancemissionstate.h"
#include "jukebox.h" #include "jukebox.h"
#include "jukebox_actions.h"
#include "legocontrolmanager.h" #include "legocontrolmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"