Isle
Loading...
Searching...
No Matches
MxOmni Class Reference

[AI] Central subsystem coordinator and singleton of the LEGO Island engine. More...

#include <mxomni.h>

Inheritance diagram for MxOmni:
Collaboration diagram for MxOmni:

Public Member Functions

 MxOmni ()
 [AI] Initializes default state. More...
 
 ~MxOmni () override
 [AI] Destroys all subsystems and releases memory/resources. More...
 
MxLong Notify (MxParam &p_param) override
 [AI] Handles global notifications. More...
 
virtual void Init ()
 [AI] Resets all internal pointers to defaults. More...
 
virtual MxResult Create (MxOmniCreateParam &p_param)
 [AI] Allocates and configures engine subsystems, depending on the provided flags in MxOmniCreateParam. More...
 
virtual void Destroy ()
 [AI] Tears down all engine subsystems, deletes and frees all managed memory. More...
 
virtual MxResult Start (MxDSAction *p_dsAction)
 [AI] Requests the start of a top-level scripted action (from SI). More...
 
virtual void DeleteObject (MxDSAction &p_dsAction)
 [AI] Deletes a world or subsystem object corresponding to an action. More...
 
virtual MxBool DoesEntityExist (MxDSAction &p_dsAction)
 [AI] Checks whether an entity (gameplay object) exists by querying the streamer and notification manager. More...
 
virtual MxResult CreatePresenter (MxStreamController *p_controller, MxDSAction &p_action)
 [AI] Instantiates and starts a Presenter (e.g., video, sound, animation) to handle the specified action on the given stream controller. More...
 
virtual MxEntityAddToWorld (const char *, MxS32, MxPresenter *)
 [AI] [VIRTUAL BASE] Placeholder virtual for derived engines to instantiate an entity and add to the 3D world. More...
 
virtual void NotifyCurrentEntity (const MxNotificationParam &p_param)
 [AI] [VIRTUAL BASE] Placeholder for derived implementations—sends a notification to the currently active entity. More...
 
virtual void Pause ()
 [AI] Pauses subsystems that support pausing (timer, sound manager) and sets paused state. More...
 
virtual void Resume ()
 [AI] Resumes paused subsystems (timer, sound manager) and clears paused state. More...
 
virtual MxBool IsPaused ()
 [AI] Returns paused state of the engine. More...
 
HWND GetWindowHandle () const
 [AI] Gets the window handle (HWND) associated with the engine (ownership not transferred). More...
 
MxObjectFactoryGetObjectFactory () const
 [AI] Retrieves the currently used object factory for presenter/entity instantiation (ownership not transferred). More...
 
MxNotificationManagerGetNotificationManager () const
 [AI] Returns the notification manager responsible for enqueuing and dispatching notifications/events. More...
 
MxTickleManagerGetTickleManager () const
 [AI] Returns the tickle manager which manages the tickle update loop for registered clients. More...
 
MxTimerGetTimer () const
 [AI] Gets the main frame-timer object (if any). More...
 
MxStreamerGetStreamer () const
 [AI] Returns the engine's global streamer object for media/data access. More...
 
MxSoundManagerGetSoundManager () const
 [AI] Gets the engine's sound manager used for playing/controlling sounds. More...
 
MxVideoManagerGetVideoManager () const
 [AI] Returns the video media manager (for handling FLC/SMK/etc.), if present. More...
 
MxVariableTableGetVariableTable () const
 [AI] Gets the global variable table for scripting/logic purposes. More...
 
MxMusicManagerGetMusicManager () const
 [AI] Returns the current music manager, responsible for background/interactive music. More...
 
MxEventManagerGetEventManager () const
 [AI] Get the event manager responsible for handling event queueing/dispatching. More...
 
MxAtomSetGetAtomSet () const
 [AI] Gets the atom set used for mapping strings/IDs to atom objects. More...
 
MxLong HandleEndAction (MxParam &p_param)
 [AI] Handles the engine's response to action end notifications (c_notificationEndAction), deletes action objects as necessary and manages streamer state. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Static Public Member Functions

static void DestroyInstance ()
 [AI] Destroys the singleton MxOmni instance and performs memory cleanup. More...
 
static const char * GetCD ()
 [AI] Retrieves the configured CD-ROM media path string used for resource location. More...
 
static const char * GetHD ()
 [AI] Retrieves the configured hard disk media path string used for resource location. More...
 
static MxOmniGetInstance ()
 [AI] Returns the singleton instance of the MxOmni subsystem coordinator. More...
 
static MxBool IsSound3D ()
 [AI] Returns current state of 3D sound configuration. More...
 
static void SetCD (const char *p_cd)
 [AI] Sets the global CD media path used for source file lookup. More...
 
static void SetHD (const char *p_hd)
 [AI] Sets the global hard disk media path used for resource lookup. More...
 
static void SetSound3D (MxBool p_use3dSound)
 [AI] Enables or disables use of 3D sound processing. More...
 
static void SetInstance (MxOmni *p_instance)
 [AI] Manually set the static instance of the global engine object. More...
 
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 provided name. More...
 

Protected Attributes

MxString m_mediaPath
 [AI] Path to media assets (SI files, resources) used for loading content. More...
 
HWND m_windowHandle
 [AI] Associated window handle for DirectX/Win32 operations. More...
 
MxObjectFactorym_objectFactory
 [AI] Factory object used to instantiate engine objects (presenters, entities) by class name. More...
 
MxVariableTablem_variableTable
 [AI] Variable table for scripting/in-engine variable storage. More...
 
MxTickleManagerm_tickleManager
 [AI] Manages list of objects requiring tickle updates each frame/step. More...
 
MxNotificationManagerm_notificationManager
 [AI] Manages notifications and their distribution to interested clients. More...
 
MxVideoManagerm_videoManager
 [AI] Manager for decoding and rendering video resources (FLC, etc.). More...
 
MxSoundManagerm_soundManager
 [AI] Manages sound (WAV, MIDI) output and channels. More...
 
MxMusicManagerm_musicManager
 [AI] Manages background and event-triggered music. More...
 
MxEventManagerm_eventManager
 [AI] Centralized event manager for engine events (scripted/game logic). More...
 
MxTimerm_timer
 [AI] Master timer for time-keeping and scheduling. More...
 
MxStreamerm_streamer
 [AI] Main streamer for handling open files and distributed streaming. More...
 
MxAtomSetm_atomSet
 [AI] Global set of strings mapped to atom objects (for fast lookup/id assignment). More...
 
MxCriticalSection m_criticalSection
 [AI] Critical section used for thread-safe engine operations. More...
 
MxBool m_paused
 [AI] Indicates if the engine/systems are currently paused. More...
 

Static Protected Attributes

static MxOmnig_instance = NULL
 [AI] The singleton instance pointer of the MxOmni engine. More...
 

Detailed Description

[AI] Central subsystem coordinator and singleton of the LEGO Island engine.

Instantiated once in the process, this class manages all major subsystems such as resource streaming, variable tables, notification dispatch, media managers (sound/video/music), and event/timer systems. Also used for creation of subsystem objects and engine handling. Provides utility access to hardware paths and configuration (CD, HD, 3D sound).

[AI] Inherits from MxCore and is responsible for all high-level coordinated initialization, startup sequencing of media/actions, and teardown/cleanup of the game application. Patterned as an engine-wide singleton.

Definition at line 32 of file mxomni.h.

Constructor & Destructor Documentation

◆ MxOmni()

MxOmni::MxOmni ( )

[AI] Initializes default state.

Does not create or allocate any subsystems. [AI]

Definition at line 34 of file mxomni.cpp.

◆ ~MxOmni()

MxOmni::~MxOmni ( )
override

[AI] Destroys all subsystems and releases memory/resources.

[AI]

Definition at line 51 of file mxomni.cpp.

Member Function Documentation

◆ ActionSourceEquals()

MxBool MxOmni::ActionSourceEquals ( MxDSAction p_action,
const char *  p_name 
)
static

[AI] Recursive walk to check if the given action, or any child multi-action, was sourced from the provided name.

Parameters
p_actionThe top-level or nested action to check (may be multi-action). [AI]
p_nameThe name/string to compare as action source. [AI]
Returns
TRUE if found, FALSE otherwise. [AI]

Definition at line 304 of file mxomni.cpp.

◆ AddToWorld()

MxEntity * MxOmni::AddToWorld ( const char *  ,
MxS32  ,
MxPresenter  
)
virtual

[AI] [VIRTUAL BASE] Placeholder virtual for derived engines to instantiate an entity and add to the 3D world.

Not implemented in base class.

Parameters
[unused][description unavailable] [AI]
[unused][description unavailable] [AI]
[unused][description unavailable] [AI]
Returns
NULL by default. [AI]

Reimplemented in LegoOmni.

Definition at line 40 of file mxomni.cpp.

◆ Create()

MxResult MxOmni::Create ( MxOmniCreateParam p_param)
virtual

[AI] Allocates and configures engine subsystems, depending on the provided flags in MxOmniCreateParam.

Handles creation of atom set, object factory, variable table, media managers, notification/event/timer/tickle/streamer subsystems as requested.

Parameters
p_paramConfiguration describing which subsystems to create. [AI]
Returns
SUCCESS if all requested subsystems are created and initialized, otherwise FAILURE. [AI]

Reimplemented in LegoOmni.

Definition at line 82 of file mxomni.cpp.

◆ CreatePresenter()

MxResult MxOmni::CreatePresenter ( MxStreamController p_controller,
MxDSAction p_action 
)
virtual

[AI] Instantiates and starts a Presenter (e.g., video, sound, animation) to handle the specified action on the given stream controller.

Name-dispatches to correct presenter type based on action format.

Parameters
p_controllerStream controller managing the resource/media. [AI]
p_actionAction specifying presenter type and parameters. [AI]
Returns
SUCCESS if presenter was created, manager notification dispatched, and start succeeded. FAILURE otherwise. [AI]

Definition at line 245 of file mxomni.cpp.

◆ DeleteObject()

void MxOmni::DeleteObject ( MxDSAction p_dsAction)
virtual

[AI] Deletes a world or subsystem object corresponding to an action.

Notifies streamer to unregister and clean up streaming resources associated with the action.

Parameters
p_dsActionThe action whose resources/object should be deleted. [AI]

Reimplemented in LegoOmni.

Definition at line 237 of file mxomni.cpp.

◆ Destroy()

void MxOmni::Destroy ( )
virtual

[AI] Tears down all engine subsystems, deletes and frees all managed memory.

Also performs world object destruction. [AI]

Reimplemented in LegoOmni.

Definition at line 182 of file mxomni.cpp.

◆ DestroyInstance()

void MxOmni::DestroyInstance ( )
static

[AI] Destroys the singleton MxOmni instance and performs memory cleanup.

Should be called before application exit.

Definition at line 295 of file mxomni.cpp.

◆ DoesEntityExist()

MxBool MxOmni::DoesEntityExist ( MxDSAction p_dsAction)
virtual

[AI] Checks whether an entity (gameplay object) exists by querying the streamer and notification manager.

Parameters
p_dsActionThe action referencing the entity (usually by ID or AtomID). [AI]
Returns
TRUE if entity exists and no queued notifications for deletion remain, FALSE otherwise. [AI]

Reimplemented in LegoOmni.

Definition at line 399 of file mxomni.cpp.

◆ GetAtomSet()

MxAtomSet * MxOmni::GetAtomSet ( ) const
inline

[AI] Gets the atom set used for mapping strings/IDs to atom objects.

Returns
Pointer to the atom set. [AI]

Definition at line 258 of file mxomni.h.

◆ GetCD()

const char * MxOmni::GetCD ( )
static

[AI] Retrieves the configured CD-ROM media path string used for resource location.

Returns
Pointer to a string containing the path to CD media. [AI]

Definition at line 375 of file mxomni.cpp.

◆ GetEventManager()

MxEventManager * MxOmni::GetEventManager ( ) const
inline

[AI] Get the event manager responsible for handling event queueing/dispatching.

Returns
Pointer to event manager. [AI]

Definition at line 252 of file mxomni.h.

◆ GetHD()

const char * MxOmni::GetHD ( )
static

[AI] Retrieves the configured hard disk media path string used for resource location.

Returns
Pointer to a string containing the path to the HD media. [AI]

Definition at line 363 of file mxomni.cpp.

◆ GetInstance()

MxOmni * MxOmni::GetInstance ( )
static

[AI] Returns the singleton instance of the MxOmni subsystem coordinator.

Returns
Pointer to the global engine singleton. [AI]

Definition at line 289 of file mxomni.cpp.

◆ GetMusicManager()

MxMusicManager * MxOmni::GetMusicManager ( ) const
inline

[AI] Returns the current music manager, responsible for background/interactive music.

Returns
Pointer to music manager. [AI]

Definition at line 246 of file mxomni.h.

◆ GetNotificationManager()

MxNotificationManager * MxOmni::GetNotificationManager ( ) const
inline

[AI] Returns the notification manager responsible for enqueuing and dispatching notifications/events.

Returns
Notification manager. [AI]

Definition at line 204 of file mxomni.h.

◆ GetObjectFactory()

MxObjectFactory * MxOmni::GetObjectFactory ( ) const
inline

[AI] Retrieves the currently used object factory for presenter/entity instantiation (ownership not transferred).

Returns
Pointer to global object factory. [AI]

Definition at line 198 of file mxomni.h.

◆ GetSoundManager()

MxSoundManager * MxOmni::GetSoundManager ( ) const
inline

[AI] Gets the engine's sound manager used for playing/controlling sounds.

Returns
Sound manager object. [AI]

Definition at line 228 of file mxomni.h.

◆ GetStreamer()

MxStreamer * MxOmni::GetStreamer ( ) const
inline

[AI] Returns the engine's global streamer object for media/data access.

Returns
Pointer to streamer subsystem. [AI]

Definition at line 222 of file mxomni.h.

◆ GetTickleManager()

MxTickleManager * MxOmni::GetTickleManager ( ) const
inline

[AI] Returns the tickle manager which manages the tickle update loop for registered clients.

Returns
Pointer to tickle manager. [AI]

Definition at line 210 of file mxomni.h.

◆ GetTimer()

MxTimer * MxOmni::GetTimer ( ) const
inline

[AI] Gets the main frame-timer object (if any).

Returns
Pointer to engine timer. [AI]

Definition at line 216 of file mxomni.h.

◆ GetVariableTable()

MxVariableTable * MxOmni::GetVariableTable ( ) const
inline

[AI] Gets the global variable table for scripting/logic purposes.

Returns
The variable table used for storing game variables/values. [AI]

Definition at line 240 of file mxomni.h.

◆ GetVideoManager()

MxVideoManager * MxOmni::GetVideoManager ( ) const
inline

[AI] Returns the video media manager (for handling FLC/SMK/etc.), if present.

Returns
Video manager instance. [AI]

Definition at line 234 of file mxomni.h.

◆ GetWindowHandle()

HWND MxOmni::GetWindowHandle ( ) const
inline

[AI] Gets the window handle (HWND) associated with the engine (ownership not transferred).

Returns
Window handle. [AI]

Definition at line 192 of file mxomni.h.

◆ HandleEndAction()

MxLong MxOmni::HandleEndAction ( MxParam p_param)

[AI] Handles the engine's response to action end notifications (c_notificationEndAction), deletes action objects as necessary and manages streamer state.

Parameters
p_paramEnd action notification parameter. [AI]
Returns
Always 1 to acknowledge handling. [AI]

Definition at line 337 of file mxomni.cpp.

◆ Init()

void MxOmni::Init ( )
virtual

[AI] Resets all internal pointers to defaults.

Subsystem pointers are set to NULL. Window handle and paused state reset.

Reimplemented in LegoOmni.

Definition at line 57 of file mxomni.cpp.

◆ IsPaused()

virtual MxBool MxOmni::IsPaused ( )
inlinevirtual

[AI] Returns paused state of the engine.

[AI]

Returns
True if the engine is currently paused, false otherwise. [AI]

Definition at line 172 of file mxomni.h.

◆ IsSound3D()

MxBool MxOmni::IsSound3D ( )
static

[AI] Returns current state of 3D sound configuration.

Returns
TRUE if 3D sound output should be used; FALSE otherwise. [AI]

Definition at line 387 of file mxomni.cpp.

◆ Notify()

MxLong MxOmni::Notify ( MxParam p_param)
overridevirtual

[AI] Handles global notifications.

Handles c_notificationEndAction and delegates to HandleEndAction.

Parameters
p_paramIncoming notification/parameter. [AI]
Returns
1 if handled (end action), else 0. [AI]

Reimplemented from MxCore.

Definition at line 325 of file mxomni.cpp.

◆ NotifyCurrentEntity()

void MxOmni::NotifyCurrentEntity ( const MxNotificationParam p_param)
virtual

[AI] [VIRTUAL BASE] Placeholder for derived implementations—sends a notification to the currently active entity.

Not implemented in base. [AI]

Parameters
p_paramNotification parameters to send. [AI]

Reimplemented in LegoOmni.

Definition at line 46 of file mxomni.cpp.

◆ Pause()

void MxOmni::Pause ( )
virtual

[AI] Pauses subsystems that support pausing (timer, sound manager) and sets paused state.

Reimplemented in LegoOmni.

Definition at line 412 of file mxomni.cpp.

◆ Resume()

void MxOmni::Resume ( )
virtual

[AI] Resumes paused subsystems (timer, sound manager) and clears paused state.

Reimplemented in LegoOmni.

Definition at line 422 of file mxomni.cpp.

◆ SetCD()

void MxOmni::SetCD ( const char *  p_cd)
static

[AI] Sets the global CD media path used for source file lookup.

Parameters
p_cdThe new CD path to use for resource access. [AI]

Definition at line 381 of file mxomni.cpp.

◆ SetHD()

void MxOmni::SetHD ( const char *  p_hd)
static

[AI] Sets the global hard disk media path used for resource lookup.

Parameters
p_hdThe new HD path to use for resource access. [AI]

Definition at line 369 of file mxomni.cpp.

◆ SetInstance()

void MxOmni::SetInstance ( MxOmni p_instance)
static

[AI] Manually set the static instance of the global engine object.

Parameters
p_instanceThe new instance pointer. [AI]

Definition at line 75 of file mxomni.cpp.

◆ SetSound3D()

void MxOmni::SetSound3D ( MxBool  p_use3dSound)
static

[AI] Enables or disables use of 3D sound processing.

Parameters
p_use3dSoundSet TRUE to enable 3D sound, FALSE otherwise. [AI]

Definition at line 393 of file mxomni.cpp.

◆ Start()

MxResult MxOmni::Start ( MxDSAction p_dsAction)
virtual

[AI] Requests the start of a top-level scripted action (from SI).

Triggers sequence execution for streaming/media/subsystems as required by the action, via streamer.

Parameters
p_dsActionThe action object (parsed from SI) to be started. [AI]
Returns
SUCCESS if streaming was successfully initiated, FAILURE if requirements not met or error occurred. [AI]

Reimplemented in LegoOmni.

Definition at line 226 of file mxomni.cpp.

Member Data Documentation

◆ g_instance

MxOmni * MxOmni::g_instance = NULL
staticprotected

[AI] The singleton instance pointer of the MxOmni engine.

[AI]

Definition at line 274 of file mxomni.h.

◆ m_atomSet

MxAtomSet* MxOmni::m_atomSet
protected

[AI] Global set of strings mapped to atom objects (for fast lookup/id assignment).

[AI]

Definition at line 339 of file mxomni.h.

◆ m_criticalSection

MxCriticalSection MxOmni::m_criticalSection
protected

[AI] Critical section used for thread-safe engine operations.

[AI]

Definition at line 344 of file mxomni.h.

◆ m_eventManager

MxEventManager* MxOmni::m_eventManager
protected

[AI] Centralized event manager for engine events (scripted/game logic).

[AI]

Definition at line 324 of file mxomni.h.

◆ m_mediaPath

MxString MxOmni::m_mediaPath
protected

[AI] Path to media assets (SI files, resources) used for loading content.

[AI]

Definition at line 279 of file mxomni.h.

◆ m_musicManager

MxMusicManager* MxOmni::m_musicManager
protected

[AI] Manages background and event-triggered music.

[AI]

Definition at line 319 of file mxomni.h.

◆ m_notificationManager

MxNotificationManager* MxOmni::m_notificationManager
protected

[AI] Manages notifications and their distribution to interested clients.

[AI]

Definition at line 304 of file mxomni.h.

◆ m_objectFactory

MxObjectFactory* MxOmni::m_objectFactory
protected

[AI] Factory object used to instantiate engine objects (presenters, entities) by class name.

[AI]

Definition at line 289 of file mxomni.h.

◆ m_paused

MxBool MxOmni::m_paused
protected

[AI] Indicates if the engine/systems are currently paused.

[AI]

Definition at line 349 of file mxomni.h.

◆ m_soundManager

MxSoundManager* MxOmni::m_soundManager
protected

[AI] Manages sound (WAV, MIDI) output and channels.

[AI]

Definition at line 314 of file mxomni.h.

◆ m_streamer

MxStreamer* MxOmni::m_streamer
protected

[AI] Main streamer for handling open files and distributed streaming.

[AI]

Definition at line 334 of file mxomni.h.

◆ m_tickleManager

MxTickleManager* MxOmni::m_tickleManager
protected

[AI] Manages list of objects requiring tickle updates each frame/step.

[AI]

Definition at line 299 of file mxomni.h.

◆ m_timer

MxTimer* MxOmni::m_timer
protected

[AI] Master timer for time-keeping and scheduling.

[AI]

Definition at line 329 of file mxomni.h.

◆ m_variableTable

MxVariableTable* MxOmni::m_variableTable
protected

[AI] Variable table for scripting/in-engine variable storage.

[AI]

Definition at line 294 of file mxomni.h.

◆ m_videoManager

MxVideoManager* MxOmni::m_videoManager
protected

[AI] Manager for decoding and rendering video resources (FLC, etc.).

[AI]

Definition at line 309 of file mxomni.h.

◆ m_windowHandle

HWND MxOmni::m_windowHandle
protected

[AI] Associated window handle for DirectX/Win32 operations.

[AI]

Definition at line 284 of file mxomni.h.


The documentation for this class was generated from the following files: