2023-04-27 22:19:39 -04:00
|
|
|
#ifndef LEGOOMNI_H
|
|
|
|
#define LEGOOMNI_H
|
|
|
|
|
2023-07-02 02:53:54 -04:00
|
|
|
#include "compat.h"
|
2023-10-07 11:30:04 -04:00
|
|
|
#include "mxdsaction.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxomni.h"
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2023-10-23 07:16:21 -04:00
|
|
|
class GifManager;
|
2023-10-07 11:30:04 -04:00
|
|
|
class Isle;
|
2023-12-14 11:50:29 -05:00
|
|
|
class IslePathActor;
|
2023-10-09 06:33:06 -04:00
|
|
|
class LegoAnimationManager;
|
2023-10-07 11:30:04 -04:00
|
|
|
class LegoBuildingManager;
|
2023-10-23 07:16:21 -04:00
|
|
|
class LegoControlManager;
|
2023-10-07 11:30:04 -04:00
|
|
|
class LegoEntity;
|
|
|
|
class LegoGameState;
|
|
|
|
class LegoInputManager;
|
|
|
|
class LegoNavController;
|
|
|
|
class LegoPathBoundary;
|
|
|
|
class LegoPlantManager;
|
|
|
|
class LegoROI;
|
2023-06-11 21:03:54 -04:00
|
|
|
class LegoSoundManager;
|
2023-10-12 12:18:24 -04:00
|
|
|
class LegoUnkSaveDataWriter;
|
2023-10-07 11:30:04 -04:00
|
|
|
class LegoVideoManager;
|
|
|
|
class LegoWorld;
|
2023-12-07 14:14:49 -05:00
|
|
|
class LegoWorldList;
|
2023-10-07 11:30:04 -04:00
|
|
|
class MxAtomId;
|
|
|
|
class MxBackgroundAudioManager;
|
|
|
|
class MxDSFile;
|
2023-09-29 12:09:46 -04:00
|
|
|
class MxTransitionManager;
|
2024-01-01 19:17:38 -05:00
|
|
|
class ViewLODListManager;
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2023-11-05 10:20:00 -05:00
|
|
|
extern MxAtomId* g_copterScript;
|
|
|
|
extern MxAtomId* g_dunecarScript;
|
|
|
|
extern MxAtomId* g_jetskiScript;
|
|
|
|
extern MxAtomId* g_racecarScript;
|
|
|
|
extern MxAtomId* g_carraceScript;
|
|
|
|
extern MxAtomId* g_carracerScript;
|
|
|
|
extern MxAtomId* g_jetraceScript;
|
|
|
|
extern MxAtomId* g_jetracerScript;
|
|
|
|
extern MxAtomId* g_isleScript;
|
|
|
|
extern MxAtomId* g_elevbottScript;
|
|
|
|
extern MxAtomId* g_infodoorScript;
|
|
|
|
extern MxAtomId* g_infomainScript;
|
|
|
|
extern MxAtomId* g_infoscorScript;
|
|
|
|
extern MxAtomId* g_regbookScript;
|
|
|
|
extern MxAtomId* g_histbookScript;
|
|
|
|
extern MxAtomId* g_hospitalScript;
|
|
|
|
extern MxAtomId* g_policeScript;
|
|
|
|
extern MxAtomId* g_garageScript;
|
|
|
|
extern MxAtomId* g_act2mainScript;
|
|
|
|
extern MxAtomId* g_act3Script;
|
|
|
|
extern MxAtomId* g_jukeboxScript;
|
|
|
|
extern MxAtomId* g_pz5Script;
|
|
|
|
extern MxAtomId* g_introScript;
|
|
|
|
extern MxAtomId* g_testScript;
|
|
|
|
extern MxAtomId* g_jukeboxwScript;
|
|
|
|
extern MxAtomId* g_sndAnimScript;
|
|
|
|
extern MxAtomId* g_creditsScript;
|
|
|
|
extern MxAtomId* g_nocdSourceName;
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d8638
|
2023-12-28 11:56:54 -05:00
|
|
|
// SIZE 0x140
|
2023-10-24 19:38:27 -04:00
|
|
|
class LegoOmni : public MxOmni {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2024-01-17 15:48:48 -05:00
|
|
|
enum {
|
|
|
|
c_disableInput = 0x01,
|
|
|
|
c_disable3d = 0x02,
|
|
|
|
c_clearScreen = 0x04
|
|
|
|
};
|
|
|
|
|
2024-01-24 21:16:29 -05:00
|
|
|
void CreateBackgroundAudio();
|
|
|
|
void RemoveWorld(const MxAtomId&, MxLong);
|
|
|
|
static int GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
|
|
|
static void CreateInstance();
|
|
|
|
static LegoOmni* GetInstance();
|
2023-10-24 19:38:27 -04:00
|
|
|
|
|
|
|
LegoOmni();
|
2024-02-01 15:42:10 -05:00
|
|
|
~LegoOmni() override; // vtable+00
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
MxLong Notify(MxParam& p_param) override; // vtable+04
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10058aa0
|
2024-02-01 15:42:10 -05:00
|
|
|
inline const char* ClassName() const override // vtable+0c
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-27 15:59:42 -05:00
|
|
|
// STRING: LEGO1 0x100f671c
|
2023-10-24 19:38:27 -04:00
|
|
|
return "LegoOmni";
|
|
|
|
}
|
2023-06-25 21:34:13 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10058ab0
|
2024-02-01 15:42:10 -05:00
|
|
|
inline MxBool IsA(const char* p_name) const override // vtable+10
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-13 05:48:14 -05:00
|
|
|
return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name);
|
2023-10-24 19:38:27 -04:00
|
|
|
}
|
2023-06-25 21:34:13 -04:00
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
void Init() override; // vtable+14
|
|
|
|
MxResult Create(MxOmniCreateParam& p_param) override; // vtable+18
|
|
|
|
void Destroy() override; // vtable+1c
|
|
|
|
MxResult Start(MxDSAction* p_dsAction) override; // vtable+20
|
|
|
|
void DeleteObject(MxDSAction& p_dsAction) override; // vtable+24
|
|
|
|
MxBool DoesEntityExist(MxDSAction& p_dsAction) override; // vtable+28
|
|
|
|
MxEntity* AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter) override; // vtable+30
|
|
|
|
void NotifyCurrentEntity(MxNotificationParam* p_param) override; // vtable+34
|
|
|
|
void StartTimer() override; // vtable+38
|
|
|
|
void StopTimer() override; // vtable+3c
|
2024-01-26 16:00:02 -05:00
|
|
|
|
|
|
|
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
2023-12-26 19:45:48 -05:00
|
|
|
void AddWorld(LegoWorld* p_world);
|
2024-01-28 17:10:04 -05:00
|
|
|
void DeleteWorld(LegoWorld* p_world);
|
2024-01-17 15:48:48 -05:00
|
|
|
void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags);
|
2023-06-25 21:34:13 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
|
|
|
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
|
|
|
LegoInputManager* GetInputManager() { return m_inputMgr; }
|
|
|
|
GifManager* GetGifManager() { return m_gifManager; }
|
2024-01-26 16:00:02 -05:00
|
|
|
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoNavController* GetNavController() { return m_navController; }
|
2023-12-14 11:50:29 -05:00
|
|
|
IslePathActor* GetCurrentVehicle() { return m_currentVehicle; }
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
|
|
|
|
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
|
|
|
|
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
|
|
|
|
LegoGameState* GetGameState() { return m_gameState; }
|
|
|
|
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
|
|
|
|
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
2023-11-05 10:07:28 -05:00
|
|
|
MxDSAction& GetCurrentAction() { return m_action; }
|
2024-01-16 14:33:03 -05:00
|
|
|
LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; }
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2024-01-09 04:43:21 -05:00
|
|
|
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
2024-01-13 15:00:11 -05:00
|
|
|
inline void SetWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
2024-01-29 17:30:20 -05:00
|
|
|
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
2023-12-29 10:22:18 -05:00
|
|
|
|
2024-01-17 11:53:53 -05:00
|
|
|
inline void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); }
|
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x10058b30
|
|
|
|
// LegoOmni::`scalar deleting destructor'
|
|
|
|
|
2023-04-27 22:19:39 -04:00
|
|
|
private:
|
2023-12-16 13:14:01 -05:00
|
|
|
undefined4* m_unk0x68; // 0x68
|
2024-01-01 19:17:38 -05:00
|
|
|
ViewLODListManager* m_viewLODListManager; // 0x6c
|
2023-12-16 13:14:01 -05:00
|
|
|
LegoInputManager* m_inputMgr; // 0x70
|
|
|
|
GifManager* m_gifManager; // 0x74
|
|
|
|
LegoWorldList* m_worldList; // 0x78
|
|
|
|
LegoWorld* m_currentWorld; // 0x7c
|
2023-12-29 10:22:18 -05:00
|
|
|
MxBool m_exit; // 0x80
|
2023-12-16 13:14:01 -05:00
|
|
|
LegoNavController* m_navController; // 0x84
|
|
|
|
IslePathActor* m_currentVehicle; // 0x88
|
|
|
|
LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c
|
|
|
|
LegoPlantManager* m_plantManager; // 0x90
|
|
|
|
LegoAnimationManager* m_animationManager; // 0x94
|
|
|
|
LegoBuildingManager* m_buildingManager; // 0x98
|
|
|
|
LegoGameState* m_gameState; // 0x9c
|
|
|
|
MxDSAction m_action; // 0xa0
|
2023-10-24 19:38:27 -04:00
|
|
|
MxBackgroundAudioManager* m_bkgAudioManager; // 0x134
|
|
|
|
MxTransitionManager* m_transitionManager; // 0x138
|
2023-12-16 13:14:01 -05:00
|
|
|
MxBool m_unk0x13c; // 0x13c
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
2024-01-24 21:16:29 -05:00
|
|
|
MxBackgroundAudioManager* BackgroundAudioManager();
|
|
|
|
LegoGameState* GameState();
|
|
|
|
const char* GetNoCD_SourceName();
|
|
|
|
LegoInputManager* InputManager();
|
|
|
|
LegoOmni* Lego();
|
|
|
|
LegoEntity* PickEntity(MxLong, MxLong);
|
|
|
|
LegoROI* PickROI(MxLong, MxLong);
|
|
|
|
LegoSoundManager* SoundManager();
|
|
|
|
MxTransitionManager* TransitionManager();
|
|
|
|
LegoVideoManager* VideoManager();
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoAnimationManager* AnimationManager();
|
|
|
|
LegoBuildingManager* BuildingManager();
|
|
|
|
LegoControlManager* ControlManager();
|
2023-12-14 11:50:29 -05:00
|
|
|
IslePathActor* GetCurrentVehicle();
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoPlantManager* PlantManager();
|
|
|
|
LegoWorld* GetCurrentWorld();
|
2024-01-16 14:33:03 -05:00
|
|
|
LegoUnkSaveDataWriter* GetUnkSaveDataWriter();
|
2023-10-24 19:38:27 -04:00
|
|
|
GifManager* GetGifManager();
|
2024-01-17 15:48:48 -05:00
|
|
|
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
2024-01-17 11:53:53 -05:00
|
|
|
void FUN_10015860(const char*, MxU8);
|
2024-01-26 16:00:02 -05:00
|
|
|
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
2023-11-05 10:07:28 -05:00
|
|
|
MxDSAction& GetCurrentAction();
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-17 12:28:11 -05:00
|
|
|
void PlayMusic(MxU32 p_index);
|
|
|
|
void SetIsWorldActive(MxBool p_isWorldActive);
|
2024-01-11 10:02:55 -05:00
|
|
|
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
|
2023-11-05 10:20:00 -05:00
|
|
|
void RegisterScripts();
|
|
|
|
void UnregisterScripts();
|
2024-01-13 15:00:11 -05:00
|
|
|
void SetCurrentWorld(LegoWorld* p_world);
|
2023-11-05 10:20:00 -05:00
|
|
|
|
2023-04-27 22:19:39 -04:00
|
|
|
#endif // LEGOOMNI_H
|