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
66 changed files with 494 additions and 81 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,11 @@
namespace IsleScript
{
#ifdef COMPAT_MODE
enum Script : int {
#else
enum Script {
#endif
c_noneIsle = -1,
c__Isle = 0,
@@ -2435,6 +2439,12 @@ enum Script {
c_hho141cl_Pho_684 = 2427,
c_hho142cl_0_sfx = 2428,
c_hho142cl_1_sfx = 2429,
};
#ifdef COMPAT_MODE
enum Script2 : int {
#else
enum Script2 {
#endif
c_hho142cl_2_sfx = 2430,
c_hho142cl_3_sfx = 2431,
c_hho142cl_4_sfx = 2432,
@@ -3671,7 +3681,7 @@ enum Script {
c_srt004in_Anim = 3663,
c_IRTX08RA_Wav_868 = 3664,
c_nrtflag0_Anim = 3665,
c_WNS050P1_Wav = 3666,
c_WNS050P1_Wav_X = 3666,
c_wns050p1_0_sfx = 3667,
c_wns050p1_1_sfx = 3668,
c_wns050p1_Anim = 3669,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -19,6 +19,24 @@ class RaceCar;
class Jetski;
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
// SIZE 0x140
class Isle : public LegoWorld {
@@ -66,28 +84,34 @@ public:
MxLong HandleTransitionEnd();
void FUN_10032620();
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
// Isle::`scalar deleting destructor'
protected:
Act1State* m_act1state; // 0xf8
Pizza* m_pizza; // 0xfc
Pizzeria* m_pizzeria; // 0x100
TowTrack* m_towtrack; // 0x104
Ambulance* m_ambulance; // 0x108
JukeBoxEntity* m_jukebox; // 0x10c
Helicopter* m_helicopter; // 0x110
Bike* m_bike; // 0x114
DuneBuggy* m_dunebuggy; // 0x118
Motocycle* m_motocycle; // 0x11c
SkateBoard* m_skateboard; // 0x120
RaceCar* m_racecar; // 0x124
Jetski* m_jetski; // 0x128
Radio m_radio; // 0x12c
LegoGameState::Area m_unk0x13c; // 0x13c
Act1State* m_act1state; // 0xf8
Pizza* m_pizza; // 0xfc
Pizzeria* m_pizzeria; // 0x100
TowTrack* m_towtrack; // 0x104
Ambulance* m_ambulance; // 0x108
JukeBoxEntity* m_jukebox; // 0x10c
Helicopter* m_helicopter; // 0x110
Bike* m_bike; // 0x114
DuneBuggy* m_dunebuggy; // 0x118
Motocycle* m_motocycle; // 0x11c
SkateBoard* m_skateboard; // 0x120
RaceCar* m_racecar; // 0x124
Jetski* m_jetski; // 0x128
Radio m_radio; // 0x12c
LegoGameState::Area m_destLocation; // 0x13c
};
#endif // ISLE_H

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,7 @@
#ifndef MISC_H
#define MISC_H
#include "compat.h"
#include "decomp.h"
#include "mxtypes.h"
@@ -26,6 +27,15 @@ class MxTransitionManager;
class ViewLODListManager;
class ViewManager;
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
extern MxBool g_isWorldActive;
LegoOmni* Lego();
@@ -49,7 +59,7 @@ ViewLODListManager* GetViewLODListManager();
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
LegoROI* FindROI(const char* p_name);
MxDSAction& GetCurrentAction();
void PlayMusic(MxU32 p_index);
void PlayMusic(JukeboxScript::Script p_script);
void SetIsWorldActive(MxBool p_isWorldActive);
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
void SetCurrentWorld(LegoWorld* p_world);

View File

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

View File

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

View File

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

View File

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

View File

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