Isle
Loading...
Searching...
No Matches
mxomni.h
Go to the documentation of this file.
1#ifndef MXOMNI_H
2#define MXOMNI_H
3
4#include "mxcore.h"
5#include "mxcriticalsection.h"
6#include "mxstring.h"
7
8class MxAtomSet;
9class MxDSAction;
10class MxEntity;
11class MxEventManager;
12class MxMusicManager;
15class MxObjectFactory;
17class MxPresenter;
18class MxSoundManager;
19class MxStreamer;
21class MxTickleManager;
22class MxTimer;
23class MxVariableTable;
24class MxVideoManager;
25
26// VTABLE: LEGO1 0x100dc168
27// SIZE 0x68
32class MxOmni : public MxCore {
33public:
37 static void DestroyInstance();
38
43 static const char* GetCD();
44
49 static const char* GetHD();
50
55 static MxOmni* GetInstance();
56
61 static MxBool IsSound3D();
62
67 static void SetCD(const char* p_cd);
68
73 static void SetHD(const char* p_hd);
74
79 static void SetSound3D(MxBool p_use3dSound);
80
84 MxOmni();
85
89 ~MxOmni() override;
90
96 MxLong Notify(MxParam& p_param) override;
97
101 virtual void Init();
102
108 virtual MxResult Create(MxOmniCreateParam& p_param);
109
113 virtual void Destroy();
114
120 virtual MxResult Start(MxDSAction* p_dsAction);
121
126 virtual void DeleteObject(MxDSAction& p_dsAction);
127
133 virtual MxBool DoesEntityExist(MxDSAction& p_dsAction);
134
141 virtual MxResult CreatePresenter(MxStreamController* p_controller, MxDSAction& p_action);
142
150 virtual MxEntity* AddToWorld(const char*, MxS32, MxPresenter*);
151
156 virtual void NotifyCurrentEntity(const MxNotificationParam& p_param);
157
161 virtual void Pause();
162
166 virtual void Resume();
167
172 virtual MxBool IsPaused() { return m_paused; }
173
178 static void SetInstance(MxOmni* p_instance);
179
186 static MxBool ActionSourceEquals(MxDSAction* p_action, const char* p_name);
187
192 HWND GetWindowHandle() const { return this->m_windowHandle; }
193
199
205
211
216 MxTimer* GetTimer() const { return this->m_timer; }
217
222 MxStreamer* GetStreamer() const { return this->m_streamer; }
223
229
235
241
247
253
258 MxAtomSet* GetAtomSet() const { return this->m_atomSet; }
259
266
267 // SYNTHETIC: LEGO1 0x100aefd0
268 // MxOmni::`scalar deleting destructor'
269
270protected:
275
280
284 HWND m_windowHandle; // 0x18
285
290
295
300
305
310
315
320
325
329 MxTimer* m_timer; // 0x3c
330
335
340
345
350};
351
352#endif // MXOMNI_H
[AI] Set of unique atom pointers, managed with custom comparison for atomization and fast lookup.
Definition: mxatom.h:98
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
[AI] Provides a critical section object for mutual exclusion with optional use of OS mutex.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
MxEntity is a base class for game entities which are uniquely identified by an integer ID and an Atom...
Definition: mxentity.h:22
MxEventManager is a subclass of MxMediaManager responsible for managing timed event delivery,...
Manages MIDI music playback with Win32 MIDI streaming for the LEGO Island engine.
[AI] Central registry and dispatcher of asynchronous notifications between MxCore objects.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
[AI] Forward declaration for the factory responsible for constructing core objects from atom or type ...
[AI] Encapsulates parameters required to initialize the core Omni engine.
[AI] Central subsystem coordinator and singleton of the LEGO Island engine.
Definition: mxomni.h:32
MxBool m_paused
[AI] Indicates if the engine/systems are currently paused.
Definition: mxomni.h:349
static const char * GetCD()
[AI] Retrieves the configured CD-ROM media path string used for resource location.
Definition: mxomni.cpp:375
~MxOmni() override
[AI] Destroys all subsystems and releases memory/resources.
Definition: mxomni.cpp:51
MxStreamer * GetStreamer() const
[AI] Returns the engine's global streamer object for media/data access.
Definition: mxomni.h:222
MxString m_mediaPath
[AI] Path to media assets (SI files, resources) used for loading content.
Definition: mxomni.h:279
MxEventManager * GetEventManager() const
[AI] Get the event manager responsible for handling event queueing/dispatching.
Definition: mxomni.h:252
virtual void Destroy()
[AI] Tears down all engine subsystems, deletes and frees all managed memory.
Definition: mxomni.cpp:182
MxLong HandleEndAction(MxParam &p_param)
[AI] Handles the engine's response to action end notifications (c_notificationEndAction),...
Definition: mxomni.cpp:337
MxTimer * m_timer
[AI] Master timer for time-keeping and scheduling.
Definition: mxomni.h:329
HWND m_windowHandle
[AI] Associated window handle for DirectX/Win32 operations.
Definition: mxomni.h:284
static void SetCD(const char *p_cd)
[AI] Sets the global CD media path used for source file lookup.
Definition: mxomni.cpp:381
MxSoundManager * m_soundManager
[AI] Manages sound (WAV, MIDI) output and channels.
Definition: mxomni.h:314
virtual MxResult Create(MxOmniCreateParam &p_param)
[AI] Allocates and configures engine subsystems, depending on the provided flags in MxOmniCreateParam...
Definition: mxomni.cpp:82
MxTickleManager * GetTickleManager() const
[AI] Returns the tickle manager which manages the tickle update loop for registered clients.
Definition: mxomni.h:210
MxVideoManager * m_videoManager
[AI] Manager for decoding and rendering video resources (FLC, etc.).
Definition: mxomni.h:309
static void DestroyInstance()
[AI] Destroys the singleton MxOmni instance and performs memory cleanup.
Definition: mxomni.cpp:295
MxVariableTable * GetVariableTable() const
[AI] Gets the global variable table for scripting/logic purposes.
Definition: mxomni.h:240
MxLong Notify(MxParam &p_param) override
[AI] Handles global notifications.
Definition: mxomni.cpp:325
MxStreamer * m_streamer
[AI] Main streamer for handling open files and distributed streaming.
Definition: mxomni.h:334
MxEventManager * m_eventManager
[AI] Centralized event manager for engine events (scripted/game logic).
Definition: mxomni.h:324
MxObjectFactory * GetObjectFactory() const
[AI] Retrieves the currently used object factory for presenter/entity instantiation (ownership not tr...
Definition: mxomni.h:198
MxNotificationManager * m_notificationManager
[AI] Manages notifications and their distribution to interested clients.
Definition: mxomni.h:304
virtual MxResult Start(MxDSAction *p_dsAction)
[AI] Requests the start of a top-level scripted action (from SI).
Definition: mxomni.cpp:226
static MxBool ActionSourceEquals(MxDSAction *p_action, const char *p_name)
[AI] Recursive walk to check if the given action, or any child multi-action, was sourced from the pro...
Definition: mxomni.cpp:304
MxVideoManager * GetVideoManager() const
[AI] Returns the video media manager (for handling FLC/SMK/etc.), if present.
Definition: mxomni.h:234
MxVariableTable * m_variableTable
[AI] Variable table for scripting/in-engine variable storage.
Definition: mxomni.h:294
static MxOmni * GetInstance()
[AI] Returns the singleton instance of the MxOmni subsystem coordinator.
Definition: mxomni.cpp:289
static const char * GetHD()
[AI] Retrieves the configured hard disk media path string used for resource location.
Definition: mxomni.cpp:363
MxObjectFactory * m_objectFactory
[AI] Factory object used to instantiate engine objects (presenters, entities) by class name.
Definition: mxomni.h:289
virtual MxEntity * AddToWorld(const char *, MxS32, MxPresenter *)
[AI] [VIRTUAL BASE] Placeholder virtual for derived engines to instantiate an entity and add to the 3...
Definition: mxomni.cpp:40
virtual void NotifyCurrentEntity(const MxNotificationParam &p_param)
[AI] [VIRTUAL BASE] Placeholder for derived implementations—sends a notification to the currently act...
Definition: mxomni.cpp:46
static MxBool IsSound3D()
[AI] Returns current state of 3D sound configuration.
Definition: mxomni.cpp:387
virtual MxResult CreatePresenter(MxStreamController *p_controller, MxDSAction &p_action)
[AI] Instantiates and starts a Presenter (e.g., video, sound, animation) to handle the specified acti...
Definition: mxomni.cpp:245
MxAtomSet * GetAtomSet() const
[AI] Gets the atom set used for mapping strings/IDs to atom objects.
Definition: mxomni.h:258
MxMusicManager * m_musicManager
[AI] Manages background and event-triggered music.
Definition: mxomni.h:319
static void SetSound3D(MxBool p_use3dSound)
[AI] Enables or disables use of 3D sound processing.
Definition: mxomni.cpp:393
static MxOmni * g_instance
[AI] The singleton instance pointer of the MxOmni engine.
Definition: mxomni.h:274
virtual void Resume()
[AI] Resumes paused subsystems (timer, sound manager) and clears paused state.
Definition: mxomni.cpp:422
MxMusicManager * GetMusicManager() const
[AI] Returns the current music manager, responsible for background/interactive music.
Definition: mxomni.h:246
virtual void Init()
[AI] Resets all internal pointers to defaults.
Definition: mxomni.cpp:57
virtual void DeleteObject(MxDSAction &p_dsAction)
[AI] Deletes a world or subsystem object corresponding to an action.
Definition: mxomni.cpp:237
MxNotificationManager * GetNotificationManager() const
[AI] Returns the notification manager responsible for enqueuing and dispatching notifications/events.
Definition: mxomni.h:204
MxSoundManager * GetSoundManager() const
[AI] Gets the engine's sound manager used for playing/controlling sounds.
Definition: mxomni.h:228
MxTimer * GetTimer() const
[AI] Gets the main frame-timer object (if any).
Definition: mxomni.h:216
static void SetInstance(MxOmni *p_instance)
[AI] Manually set the static instance of the global engine object.
Definition: mxomni.cpp:75
virtual MxBool DoesEntityExist(MxDSAction &p_dsAction)
[AI] Checks whether an entity (gameplay object) exists by querying the streamer and notification mana...
Definition: mxomni.cpp:399
MxOmni()
[AI] Initializes default state.
Definition: mxomni.cpp:34
MxCriticalSection m_criticalSection
[AI] Critical section used for thread-safe engine operations.
Definition: mxomni.h:344
virtual void Pause()
[AI] Pauses subsystems that support pausing (timer, sound manager) and sets paused state.
Definition: mxomni.cpp:412
MxTickleManager * m_tickleManager
[AI] Manages list of objects requiring tickle updates each frame/step.
Definition: mxomni.h:299
MxAtomSet * m_atomSet
[AI] Global set of strings mapped to atom objects (for fast lookup/id assignment).
Definition: mxomni.h:339
virtual MxBool IsPaused()
[AI] Returns paused state of the engine.
Definition: mxomni.h:172
HWND GetWindowHandle() const
[AI] Gets the window handle (HWND) associated with the engine (ownership not transferred).
Definition: mxomni.h:192
static void SetHD(const char *p_hd)
[AI] Sets the global hard disk media path used for resource lookup.
Definition: mxomni.cpp:369
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
Definition: mxpresenter.h:20
[AI] Manages DirectSound-based sound playback, implementing volume, resource, and device management.
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
Streams and manages media data, handles memory pools for RAM/disk streaming [AI].
Definition: mxstreamer.h:65
Mindscape custom string class for managing dynamic C-strings within the game engine.
Definition: mxstring.h:14
[AI] Manages ticking ("tickling") a set of MxCore objects at specified intervals.
Timer class for measuring elapsed time or frame time.
Definition: mxtimer.h:14
MxVariableTable is a specialized hash table for storing key/value string variables used by the LEGO I...
[AI] Video subsystem manager for DirectDraw/Direct3D video rendering and presenter control.
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed int MxS32
[AI]
Definition: mxtypes.h:38