Isle
Loading...
Searching...
No Matches
misc.cpp File Reference
#include "misc.h"
#include "3dmanager/lego3dmanager.h"
#include "legoinputmanager.h"
#include "legomain.h"
#include "legovideomanager.h"
#include "mxbackgroundaudiomanager.h"
#include "mxmisc.h"
#include "roi/legoroi.h"
#include "scripts.h"
Include dependency graph for misc.cpp:

Go to the source code of this file.

Functions

LegoOmniLego ()
 [AI] Retrieves the global LegoOmni singleton instance, providing access to core subsystems. More...
 
LegoSoundManagerSoundManager ()
 [AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance. [AI] More...
 
LegoVideoManagerVideoManager ()
 [AI] Accessor for the game's LegoVideoManager subsystem. Used for managing 3D/video hardware. [AI] More...
 
MxBackgroundAudioManagerBackgroundAudioManager ()
 [AI] Accessor for the background audio manager. Used for background music and ambient sounds. [AI] More...
 
LegoInputManagerInputManager ()
 [AI] Accessor for the input manager, which handles keyboard, mouse, and controller input. [AI] More...
 
LegoControlManagerControlManager ()
 [AI] Accessor for the control manager through the input manager; manages higher-level user/game controls. [AI] More...
 
LegoGameStateGameState ()
 [AI] Accessor for the game's central game state controller. [AI] More...
 
LegoAnimationManagerAnimationManager ()
 [AI] Accessor for the animation manager, which controls Lego character/world animation state. [AI] More...
 
LegoNavControllerNavController ()
 [AI] Accessor for the navigation controller, managing player/camera navigation. [AI] More...
 
LegoPathActorUserActor ()
 [AI] Accessor for the user (player-controllable) LegoPathActor. [AI] More...
 
LegoWorldCurrentWorld ()
 [AI] Accessor for the currently active LegoWorld instance. [AI] More...
 
LegoCharacterManagerCharacterManager ()
 [AI] Accessor for the character manager, which manages in-game characters/NPCs. [AI] More...
 
ViewManagerGetViewManager ()
 [AI] Accessor for the current ViewManager, managing rendering views/cameras. [AI] More...
 
LegoPlantManagerPlantManager ()
 [AI] Accessor for the plant manager, handling in-game foliage and plants. [AI] More...
 
LegoBuildingManagerBuildingManager ()
 [AI] Accessor for the building manager, handles constructible buildings and structures. [AI] More...
 
LegoTextureContainerTextureContainer ()
 [AI] Accessor for the texture container used for global texture management. [AI] More...
 
ViewLODListManagerGetViewLODListManager ()
 [AI] Returns the global ViewLODListManager for view LOD (Level of Detail) resources. [AI] More...
 
void FUN_10015820 (MxBool p_disable, MxU16 p_flags)
 [AI] Utility for enabling or disabling functionality in LegoOmni based on certain flags. More...
 
LegoROIFindROI (const char *p_name)
 [AI] Looks up a LegoROI (Real-time Object Instance) by name in the current world or global registry. More...
 
void SetROIVisible (const char *p_name, MxBool p_visible)
 [AI] Utility for setting the visibility flag of a named ROI object. More...
 
void SetUserActor (LegoPathActor *p_userActor)
 [AI] Sets the user-controlled LegoPathActor in the engine. More...
 
MxResult StartActionIfUnknown0x13c (MxDSAction &p_dsAction)
 [AI] Triggers a DSAction if a certain unknown flag (0x13c) is set. More...
 
void DeleteAction ()
 [AI] Deletes (or cancels) the currently running DSAction/cutscene/event logic. [AI] More...
 
LegoWorldFindWorld (const MxAtomId &p_atom, MxS32 p_entityid)
 [AI] Searches for or retrieves a LegoWorld instance based on an atom id and entity id. More...
 
MxDSActionGetCurrentAction ()
 [AI] Accessor for the currently running MxDSAction (e.g. More...
 
void SetCurrentWorld (LegoWorld *p_world)
 [AI] Sets the current LegoWorld used for all world/scene logic. More...
 
MxTransitionManagerTransitionManager ()
 [AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes. [AI] More...
 
void PlayMusic (JukeboxScript::Script p_objectId)
 [AI] Starts music playback by scripting the background audio manager to play the music piece referenced by the script/object id. More...
 
void SetIsWorldActive (MxBool p_isWorldActive)
 [AI] Toggles whether the world should be considered active (enables/disables camera/user control etc). More...
 
void DeleteObjects (MxAtomId *p_id, MxS32 p_first, MxS32 p_last)
 [AI] Batch deletes objects, given by atom id, and within the entity id range [p_first, p_last]. More...
 

Variables

MxBool g_isWorldActive = TRUE
 Global variable indicating whether the current LegoWorld is considered active. More...
 

Function Documentation

◆ AnimationManager()

LegoAnimationManager * AnimationManager ( )

[AI] Accessor for the animation manager, which controls Lego character/world animation state. [AI]

Definition at line 69 of file misc.cpp.

◆ BackgroundAudioManager()

MxBackgroundAudioManager * BackgroundAudioManager ( )

[AI] Accessor for the background audio manager. Used for background music and ambient sounds. [AI]

Definition at line 37 of file misc.cpp.

◆ BuildingManager()

LegoBuildingManager * BuildingManager ( )

[AI] Accessor for the building manager, handles constructible buildings and structures. [AI]

Definition at line 123 of file misc.cpp.

◆ CharacterManager()

LegoCharacterManager * CharacterManager ( )

[AI] Accessor for the character manager, which manages in-game characters/NPCs. [AI]

Definition at line 101 of file misc.cpp.

◆ ControlManager()

LegoControlManager * ControlManager ( )

[AI] Accessor for the control manager through the input manager; manages higher-level user/game controls. [AI]

Definition at line 53 of file misc.cpp.

◆ CurrentWorld()

LegoWorld * CurrentWorld ( )

[AI] Accessor for the currently active LegoWorld instance. [AI]

Definition at line 93 of file misc.cpp.

◆ DeleteAction()

void DeleteAction ( )

[AI] Deletes (or cancels) the currently running DSAction/cutscene/event logic. [AI]

Definition at line 181 of file misc.cpp.

◆ DeleteObjects()

void DeleteObjects ( MxAtomId p_id,
MxS32  p_first,
MxS32  p_last 
)

[AI] Batch deletes objects, given by atom id, and within the entity id range [p_first, p_last].

Parameters
p_id[AI] The atom id representing the type/group of objects.
p_first[AI] The first entity id to delete.
p_last[AI] The last entity id (inclusive) to delete.

Definition at line 237 of file misc.cpp.

◆ FindROI()

LegoROI * FindROI ( const char *  p_name)

[AI] Looks up a LegoROI (Real-time Object Instance) by name in the current world or global registry.

Parameters
p_name[AI] The name of the ROI object to search for.
Returns
Pointer to found LegoROI, or NULL if not found. [AI]

Definition at line 151 of file misc.cpp.

◆ FindWorld()

LegoWorld * FindWorld ( const MxAtomId p_atom,
MxS32  p_entityid 
)

[AI] Searches for or retrieves a LegoWorld instance based on an atom id and entity id.

Parameters
p_atom[AI] The atom (unique) id representing the world/resource to search for.
p_entityid[AI] Entity id to further qualify the search.
Returns
Pointer to the found LegoWorld or NULL if not found. [AI]

Definition at line 188 of file misc.cpp.

◆ FUN_10015820()

void FUN_10015820 ( MxBool  p_disable,
MxU16  p_flags 
)

[AI] Utility for enabling or disabling functionality in LegoOmni based on certain flags.

Internal use. [AI]

Parameters
p_disable[AI] If true, disables the feature/subsystem identified by p_flags.
p_flags[AI] Flags determining the feature/subsystem to affect.

Definition at line 143 of file misc.cpp.

◆ GameState()

LegoGameState * GameState ( )

[AI] Accessor for the game's central game state controller. [AI]

Definition at line 61 of file misc.cpp.

◆ GetCurrentAction()

MxDSAction & GetCurrentAction ( )

[AI] Accessor for the currently running MxDSAction (e.g.

current cutscene logic/event). [AI]

Returns
Reference to the current MxDSAction. [AI]

Definition at line 195 of file misc.cpp.

◆ GetViewLODListManager()

ViewLODListManager * GetViewLODListManager ( )

[AI] Returns the global ViewLODListManager for view LOD (Level of Detail) resources. [AI]

Definition at line 136 of file misc.cpp.

◆ GetViewManager()

ViewManager * GetViewManager ( )

[AI] Accessor for the current ViewManager, managing rendering views/cameras. [AI]

Definition at line 108 of file misc.cpp.

◆ InputManager()

LegoInputManager * InputManager ( )

[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input. [AI]

Definition at line 45 of file misc.cpp.

◆ Lego()

LegoOmni * Lego ( )

[AI] Retrieves the global LegoOmni singleton instance, providing access to core subsystems.

Returns
Pointer to LegoOmni instance. [AI]

Definition at line 16 of file misc.cpp.

◆ NavController()

LegoNavController * NavController ( )

[AI] Accessor for the navigation controller, managing player/camera navigation. [AI]

Definition at line 77 of file misc.cpp.

◆ PlantManager()

LegoPlantManager * PlantManager ( )

[AI] Accessor for the plant manager, handling in-game foliage and plants. [AI]

Definition at line 115 of file misc.cpp.

◆ PlayMusic()

void PlayMusic ( JukeboxScript::Script  p_objectId)

[AI] Starts music playback by scripting the background audio manager to play the music piece referenced by the script/object id.

[AI]

Parameters
p_objectId[AI] The jukebox script object id representing the music track to play.

Definition at line 216 of file misc.cpp.

◆ SetCurrentWorld()

void SetCurrentWorld ( LegoWorld p_world)

[AI] Sets the current LegoWorld used for all world/scene logic.

[AI]

Parameters
p_world[AI] The new world to activate.

Definition at line 201 of file misc.cpp.

◆ SetIsWorldActive()

void SetIsWorldActive ( MxBool  p_isWorldActive)

[AI] Toggles whether the world should be considered active (enables/disables camera/user control etc).

[AI]

Parameters
p_isWorldActive[AI] True = world and user controls active; False = blocked/frozen (e.g. during cutscenes).

Definition at line 228 of file misc.cpp.

◆ SetROIVisible()

void SetROIVisible ( const char *  p_name,
MxBool  p_visible 
)

[AI] Utility for setting the visibility flag of a named ROI object.

[AI]

Parameters
p_name[AI] Name of the ROI to affect.
p_visible[AI] If true, ROI is set visible; otherwise, hidden.

Definition at line 158 of file misc.cpp.

◆ SetUserActor()

void SetUserActor ( LegoPathActor p_userActor)

[AI] Sets the user-controlled LegoPathActor in the engine.

[AI]

Parameters
p_userActor[AI] The actor to set as the player-controllable entity.

Definition at line 168 of file misc.cpp.

◆ SoundManager()

LegoSoundManager * SoundManager ( )

[AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance. [AI]

Definition at line 22 of file misc.cpp.

◆ StartActionIfUnknown0x13c()

MxResult StartActionIfUnknown0x13c ( MxDSAction p_dsAction)

[AI] Triggers a DSAction if a certain unknown flag (0x13c) is set.

[AI] Underlying logic checks the LegoOmni subsystem for special conditions before starting the action.

Parameters
p_dsAction[AI] The action data to attempt to start.
Returns
SUCCESS or FAILURE depending on conditions. [AI]

Definition at line 175 of file misc.cpp.

◆ TextureContainer()

LegoTextureContainer * TextureContainer ( )

[AI] Accessor for the texture container used for global texture management. [AI]

Definition at line 130 of file misc.cpp.

◆ TransitionManager()

MxTransitionManager * TransitionManager ( )

[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes. [AI]

Definition at line 208 of file misc.cpp.

◆ UserActor()

LegoPathActor * UserActor ( )

[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]

Definition at line 85 of file misc.cpp.

◆ VideoManager()

LegoVideoManager * VideoManager ( )

[AI] Accessor for the game's LegoVideoManager subsystem. Used for managing 3D/video hardware. [AI]

Definition at line 29 of file misc.cpp.

Variable Documentation

◆ g_isWorldActive

MxBool g_isWorldActive = TRUE

Global variable indicating whether the current LegoWorld is considered active.

Used to block user/camera control and can be checked by presenters to block tickle calls (e.g. for freezing cutscenes or scripted world events). [AI] True if the world should be considered "active" for user or presenter logic

Definition at line 13 of file misc.cpp.