Implement/match Isle::HandleTransitionEnd (#683)

* Implement/match Isle::HandleTransitionEnd

* Rename enums

* Forward declare enum for C++11+

* Add underlying storage to action headers

* Fix missing define
This commit is contained in:
Christian Semmler 2024-03-17 13:01:47 -04:00 committed by GitHub
parent 4197e3c326
commit 5b8f515968
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 494 additions and 81 deletions

View file

@ -5,7 +5,11 @@
namespace Act2mainScript namespace Act2mainScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneAct2main = -1, c_noneAct2main = -1,
c__Act2Main = 0, c__Act2Main = 0,

View file

@ -5,7 +5,11 @@
namespace Act3Script namespace Act3Script
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneAct3 = -1, c_noneAct3 = -1,
c__Act3 = 0, c__Act3 = 0,

View file

@ -5,7 +5,11 @@
namespace CarraceScript namespace CarraceScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneCarrace = -1, c_noneCarrace = -1,
c__CarRace_World = 0, c__CarRace_World = 0,

View file

@ -5,7 +5,11 @@
namespace CarracerScript namespace CarracerScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneCarracer = -1, c_noneCarracer = -1,
c_nrt002pz_Anim = 0, c_nrt002pz_Anim = 0,

View file

@ -5,7 +5,11 @@
namespace CopterScript namespace CopterScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneCopter = -1, c_noneCopter = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace CreditsScript namespace CreditsScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneCredits = -1, c_noneCredits = -1,
c_Credits_Wav = 0, c_Credits_Wav = 0,

View file

@ -5,7 +5,11 @@
namespace DunecarScript namespace DunecarScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneDunecar = -1, c_noneDunecar = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace ElevbottScript namespace ElevbottScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneElevbott = -1, c_noneElevbott = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace GarageScript namespace GarageScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneGarage = -1, c_noneGarage = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace HistbookScript namespace HistbookScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneHistbook = -1, c_noneHistbook = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace HospitalScript namespace HospitalScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneHospital = -1, c_noneHospital = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace InfodoorScript namespace InfodoorScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneInfodoor = -1, c_noneInfodoor = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace InfomainScript namespace InfomainScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneInfomain = -1, c_noneInfomain = -1,
c__InfoMain = 0, c__InfoMain = 0,

View file

@ -5,7 +5,11 @@
namespace InfoscorScript namespace InfoscorScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneInfoscor = -1, c_noneInfoscor = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace IntroScript namespace IntroScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneIntro = -1, c_noneIntro = -1,
c_Lego_Movie = 0, c_Lego_Movie = 0,

View file

@ -5,7 +5,11 @@
namespace IsleScript namespace IsleScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneIsle = -1, c_noneIsle = -1,
c__Isle = 0, c__Isle = 0,
@ -2435,6 +2439,12 @@ 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,
};
#ifdef COMPAT_MODE
enum Script2 : int {
#else
enum Script2 {
#endif
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 +3681,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

@ -5,7 +5,11 @@
namespace JetraceScript namespace JetraceScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneJetrace = -1, c_noneJetrace = -1,
c__JetRace_World = 0, c__JetRace_World = 0,

View file

@ -5,7 +5,11 @@
namespace JetracerScript namespace JetracerScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneJetracer = -1, c_noneJetracer = -1,
c_Trigger200_Drown = 200, c_Trigger200_Drown = 200,

View file

@ -5,7 +5,11 @@
namespace JetskiScript namespace JetskiScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneJetski = -1, c_noneJetski = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace JukeboxScript namespace JukeboxScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneJukebox = -1, c_noneJukebox = -1,
c_MusicTheme1 = 0, c_MusicTheme1 = 0,

View file

@ -5,7 +5,11 @@
namespace JukeboxwScript namespace JukeboxwScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneJukeboxw = -1, c_noneJukeboxw = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace NocdScript namespace NocdScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneNocd = -1, c_noneNocd = -1,
c_NoCD_Movie = 0, c_NoCD_Movie = 0,

View file

@ -5,7 +5,11 @@
namespace PoliceScript namespace PoliceScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_nonePolice = -1, c_nonePolice = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace RacecarScript namespace RacecarScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneRacecar = -1, c_noneRacecar = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace RegbookScript namespace RegbookScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneRegbook = -1, c_noneRegbook = -1,
c__StartUp = 0, c__StartUp = 0,

View file

@ -5,7 +5,11 @@
namespace SndanimScript namespace SndanimScript
{ {
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script { enum Script {
#endif
c_noneSndanim = -1, c_noneSndanim = -1,
c_SoundAndAnim_Action = 0, c_SoundAndAnim_Action = 0,

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,15 @@
#include "mxstillpresenter.h" #include "mxstillpresenter.h"
#include "radio.h" #include "radio.h"
namespace HospitalScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace HospitalScript
// 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,15 @@ class InfocenterState;
class MxStillPresenter; class MxStillPresenter;
class LegoControlManagerEvent; class LegoControlManagerEvent;
namespace InfomainScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace InfomainScript
// SIZE 0x18 // SIZE 0x18
struct InfocenterMapEntry { struct InfocenterMapEntry {
// FUNCTION: LEGO1 0x1006ec80 // FUNCTION: LEGO1 0x1006ec80
@ -93,7 +101,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,24 @@ class RaceCar;
class Jetski; class Jetski;
class Act1State; class Act1State;
namespace IsleScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace IsleScript
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
// VTABLE: LEGO1 0x100d6fb8 // VTABLE: LEGO1 0x100d6fb8
// SIZE 0x140 // SIZE 0x140
class Isle : public LegoWorld { class Isle : public LegoWorld {
@ -66,8 +84,14 @@ 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'
@ -87,7 +111,7 @@ class Isle : public LegoWorld {
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

@ -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,13 +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_ambulance,
e_unk64 = 64, e_towtrack,
e_jetski,
e_unk66 = 66 e_unk66 = 66
}; };

View file

@ -1,6 +1,7 @@
#ifndef MISC_H #ifndef MISC_H
#define MISC_H #define MISC_H
#include "compat.h"
#include "decomp.h" #include "decomp.h"
#include "mxtypes.h" #include "mxtypes.h"
@ -26,6 +27,15 @@ class MxTransitionManager;
class ViewLODListManager; class ViewLODListManager;
class ViewManager; class ViewManager;
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
extern MxBool g_isWorldActive; extern MxBool g_isWorldActive;
LegoOmni* Lego(); LegoOmni* Lego();
@ -49,7 +59,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,15 @@
#include "legostate.h" #include "legostate.h"
#include "police.h" #include "police.h"
namespace PoliceScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace PoliceScript
// 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

@ -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);
@ -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"
@ -67,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);
@ -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_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);
@ -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

@ -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

@ -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
{ {
@ -315,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);
@ -328,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);
@ -341,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);
@ -354,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);
@ -367,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);
@ -380,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);
@ -511,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);
} }
@ -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_skateboard) {
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_bike:
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_dunecar:
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_motocycle:
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_copter:
m_act1state->m_unk0x01f = 1;
FUN_10032d30(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
break;
case LegoGameState::e_skateboard:
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_ambulance:
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_towtrack:
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_jetski:
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)
@ -128,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:

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"