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

[AI] Animation manager handling all world and character animation state, loading, and logic for extras and transitions. More...

#include <legoanimationmanager.h>

Inheritance diagram for LegoAnimationManager:
Collaboration diagram for LegoAnimationManager:

Classes

struct  Character
 [AI] Static definition of a character, its animation settings, flags, and world identity. More...
 
struct  Extra
 [AI] Tracks a currently active extra (non-player) actor in the world, with associated parameters. More...
 
struct  Vehicle
 [AI] Static definition of a vehicle, including its name and state flags. More...
 

Public Types

enum  PlayMode { e_unk0 = 0 , e_unk1 , e_unk2 }
 [AI] Animation play modes, possibly for controlling explicit or random playback. More...
 

Public Member Functions

 LegoAnimationManager ()
 Default constructor. [AI]. More...
 
 ~LegoAnimationManager () override
 Destructor, cleans up all allocations and deregisters from tickle/notify. [AI]. More...
 
MxLong Notify (MxParam &p_param) override
 [AI] Handles system/game notifications, e.g. More...
 
MxResult Tickle () override
 [AI] Called by tick manager, processes world/time-based animation logic, including spawning extras and updating transitions. More...
 
const char * ClassName () const override
 [AI] Gets the class name ("LegoAnimationManager"). More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks if this or a parent is the given class. More...
 
void Reset (MxBool p_und)
 [AI] Resets all internal state; optionally resets animation state too. More...
 
void Suspend ()
 [AI] Suspends all activity, saving out transition/animation state, and disables extra processing. More...
 
void Resume ()
 [AI] Resumes animation manager from suspension, restoring all previously suspended state. More...
 
void FUN_1005f6d0 (MxBool p_unk0x400)
 [AI] Enables or disables extras (extra actors). More...
 
void EnableCamAnims (MxBool p_enableCamAnims)
 [AI] Sets whether camera-based queued animations are enabled for the world. More...
 
MxResult LoadWorldInfo (LegoOmni::World p_worldId)
 [AI] Loads all world animation and extra info. More...
 
MxBool FindVehicle (const char *p_name, MxU32 &p_index)
 [AI] Looks up a vehicle by name, returning its index if found. More...
 
MxResult ReadAnimInfo (LegoStorage *p_storage, AnimInfo *p_info)
 [AI] Reads an AnimInfo entry from file storage, building model list and parsing parameters. More...
 
MxResult ReadModelInfo (LegoStorage *p_storage, ModelInfo *p_info)
 [AI] Reads a single ModelInfo out of storage. More...
 
void FUN_10060480 (const LegoChar *p_characterNames[], MxU32 p_numCharacterNames)
 [AI] Marks characters in the global character list (g_characters) as available for animation according to an input list. More...
 
void FUN_100604d0 (MxBool p_unk0x08)
 [AI] Sets the m_unk0x08 flag for all characters. More...
 
void FUN_100604f0 (MxS32 p_objectIds[], MxU32 p_numObjectIds)
 [AI] Enables/disables certain animations by object id list (sets m_unk0x29 flag in AnimInfo). More...
 
void FUN_10060540 (MxBool p_unk0x29)
 [AI] Sets the 'enabled for random camera animation' flag for all animations. More...
 
void FUN_10060570 (MxBool p_unk0x1a)
 [AI] Sets whether the manager should immediately trigger camera transition animations in quick succession. More...
 
MxResult StartEntityAction (MxDSAction &p_dsAction, LegoEntity *p_entity)
 [AI] Starts a DSAction for a specific entity, managing controller/actor logic if relevant. More...
 
MxResult FUN_10060dc0 (MxU32 p_objectId, MxMatrix *p_matrix, MxBool p_param3, MxU8 p_param4, LegoROI *p_roi, MxBool p_param6, MxBool p_param7, MxBool p_param8, MxBool p_param9)
 [AI] Helper for starting a specific animation, including world matrix and camera settings. More...
 
void CameraTriggerFire (LegoPathActor *p_actor, MxBool, MxU32 p_location, MxBool p_bool)
 [AI] Triggers a camera animation based on user and location state. More...
 
void FUN_10061010 (MxBool p_und)
 [AI] Cancels all camera/transition animations and resets camera after completion. More...
 
LegoTranInfoGetTranInfo (MxU32 p_index)
 [AI] Retrieves an active transition info, or NULL if not found. More...
 
void FUN_10062770 ()
 [AI] Initializes sound transitions if not already active for the current world. More...
 
void PurgeExtra (MxBool p_und)
 [AI] Removes all extras matching current world/time criteria (but not the player's current character). More...
 
void AddExtra (MxS32 p_location, MxBool p_und)
 [AI] Spawns a new extra actor at a boundary or location, if capacity and logic allow. More...
 
void FUN_10063270 (LegoROIList *p_list, LegoAnimPresenter *p_presenter)
 [AI] Handles "extras" onboarding by evaluating visibility and position for presenter-based animation. More...
 
void FUN_10063780 (LegoROIList *p_list)
 [AI] Examines an ROI list and adds all actors of type to internal "pending" list for extras. More...
 
MxResult FUN_10064670 (Vector3 *p_position)
 [AI] Activates special triggered animation in response to player position near given point. More...
 
MxResult FUN_10064740 (Vector3 *p_position)
 [AI] Similar to FUN_10064670, but triggers a different special animation event for secondary location or characters. More...
 
MxResult FUN_10064880 (const char *p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10)
 [AI] Updates specified character's extra animation idle/play time values for active extras. More...
 
MxBool FUN_10064ee0 (MxU32 p_objectId)
 [AI] Determines if any currently running animation is assigned to the given objectId, and queries its presenter. 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 configureLegoAnimationManager (MxS32 p_legoAnimationManagerConfig)
 [AI] Updates the configuration values (global) for animation manager's allowed number of extras, performance settings etc. More...
 

Detailed Description

[AI] Animation manager handling all world and character animation state, loading, and logic for extras and transitions.

[AI] Coordinates the active animations, their states, extra characters (extras), model loads, world animation loading, and camera/transition animation logic. Called as part of the engine's tickle/tick system and notification handling.

Definition at line 102 of file legoanimationmanager.h.

Member Enumeration Documentation

◆ PlayMode

[AI] Animation play modes, possibly for controlling explicit or random playback.

Enumerator
e_unk0 

[AI] Unknown/unspecified play mode

e_unk1 

[AI] Unknown/unspecified play mode

e_unk2 

[AI] Unknown/unspecified play mode

Definition at line 143 of file legoanimationmanager.h.

Constructor & Destructor Documentation

◆ LegoAnimationManager()

LegoAnimationManager::LegoAnimationManager ( )

Default constructor. [AI].

Definition at line 327 of file legoanimationmanager.cpp.

◆ ~LegoAnimationManager()

LegoAnimationManager::~LegoAnimationManager ( )
override

Destructor, cleans up all allocations and deregisters from tickle/notify. [AI].

Definition at line 341 of file legoanimationmanager.cpp.

Member Function Documentation

◆ AddExtra()

void LegoAnimationManager::AddExtra ( MxS32  p_location,
MxBool  p_und 
)

[AI] Spawns a new extra actor at a boundary or location, if capacity and logic allow.

Parameters
p_locationIndex (−1 for random). [AI]
p_undTRUE for forced placement, else timed. [AI]

Definition at line 1879 of file legoanimationmanager.cpp.

◆ CameraTriggerFire()

void LegoAnimationManager::CameraTriggerFire ( LegoPathActor p_actor,
MxBool  ,
MxU32  p_location,
MxBool  p_bool 
)

[AI] Triggers a camera animation based on user and location state.

[AI]

Parameters
p_actorUser actor. [AI]
...See implementation for exact call logic. [AI]

Definition at line 1187 of file legoanimationmanager.cpp.

◆ ClassName()

const char * LegoAnimationManager::ClassName ( ) const
overridevirtual

[AI] Gets the class name ("LegoAnimationManager").

Reimplemented from MxCore.

◆ configureLegoAnimationManager()

void LegoAnimationManager::configureLegoAnimationManager ( MxS32  p_legoAnimationManagerConfig)
static

[AI] Updates the configuration values (global) for animation manager's allowed number of extras, performance settings etc.

Parameters
p_legoAnimationManagerConfigConfig value (usually 1 or 2). [AI]

Definition at line 320 of file legoanimationmanager.cpp.

◆ EnableCamAnims()

void LegoAnimationManager::EnableCamAnims ( MxBool  p_enableCamAnims)

[AI] Sets whether camera-based queued animations are enabled for the world.

Parameters
p_enableCamAnimsTRUE to enable, FALSE to disable. [AI]

Definition at line 572 of file legoanimationmanager.cpp.

◆ FindVehicle()

MxBool LegoAnimationManager::FindVehicle ( const char *  p_name,
MxU32 p_index 
)

[AI] Looks up a vehicle by name, returning its index if found.

Parameters
p_nameVehicle name to search for. [AI]
p_index(output) Found vehicle index. [AI]

Definition at line 744 of file legoanimationmanager.cpp.

◆ FUN_1005f6d0()

void LegoAnimationManager::FUN_1005f6d0 ( MxBool  p_unk0x400)

[AI] Enables or disables extras (extra actors).

If disabling, purges all extras.

Parameters
p_unk0x400TRUE to enable extras, FALSE to disable and remove all extras. [AI]

Definition at line 556 of file legoanimationmanager.cpp.

◆ FUN_10060480()

void LegoAnimationManager::FUN_10060480 ( const LegoChar p_characterNames[],
MxU32  p_numCharacterNames 
)

[AI] Marks characters in the global character list (g_characters) as available for animation according to an input list.

Parameters
p_characterNamesArray of names to enable. [AI]
p_numCharacterNamesNumber of entries in array. [AI]

Definition at line 884 of file legoanimationmanager.cpp.

◆ FUN_100604d0()

void LegoAnimationManager::FUN_100604d0 ( MxBool  p_unk0x08)

[AI] Sets the m_unk0x08 flag for all characters.

[AI]

Parameters
p_unk0x08Value to set for all characters (TRUE/FALSE). [AI]

Definition at line 897 of file legoanimationmanager.cpp.

◆ FUN_100604f0()

void LegoAnimationManager::FUN_100604f0 ( MxS32  p_objectIds[],
MxU32  p_numObjectIds 
)

[AI] Enables/disables certain animations by object id list (sets m_unk0x29 flag in AnimInfo).

Parameters
p_objectIdsArray of object IDs. [AI]
p_numObjectIdsCount of object IDs. [AI]

Definition at line 906 of file legoanimationmanager.cpp.

◆ FUN_10060540()

void LegoAnimationManager::FUN_10060540 ( MxBool  p_unk0x29)

[AI] Sets the 'enabled for random camera animation' flag for all animations.

Parameters
p_unk0x29TRUE/FALSE to set. [AI]

Definition at line 919 of file legoanimationmanager.cpp.

◆ FUN_10060570()

void LegoAnimationManager::FUN_10060570 ( MxBool  p_unk0x1a)

[AI] Sets whether the manager should immediately trigger camera transition animations in quick succession.

Parameters
p_unk0x1aTRUE to enable, FALSE to clear. [AI]

Definition at line 928 of file legoanimationmanager.cpp.

◆ FUN_10060dc0()

MxResult LegoAnimationManager::FUN_10060dc0 ( MxU32  p_objectId,
MxMatrix p_matrix,
MxBool  p_param3,
MxU8  p_param4,
LegoROI p_roi,
MxBool  p_param6,
MxBool  p_param7,
MxBool  p_param8,
MxBool  p_param9 
)

[AI] Helper for starting a specific animation, including world matrix and camera settings.

Parameters
...Parameters for start; see implementation for detailed logic. [AI]

Definition at line 1137 of file legoanimationmanager.cpp.

◆ FUN_10061010()

void LegoAnimationManager::FUN_10061010 ( MxBool  p_und)

[AI] Cancels all camera/transition animations and resets camera after completion.

Parameters
p_undTRUE to fully stop, FALSE to only end visuals. [AI]

Definition at line 1230 of file legoanimationmanager.cpp.

◆ FUN_10062770()

void LegoAnimationManager::FUN_10062770 ( )

[AI] Initializes sound transitions if not already active for the current world.

Definition at line 1807 of file legoanimationmanager.cpp.

◆ FUN_10063270()

void LegoAnimationManager::FUN_10063270 ( LegoROIList p_list,
LegoAnimPresenter p_presenter 
)

[AI] Handles "extras" onboarding by evaluating visibility and position for presenter-based animation.

Parameters
p_listROI list of extras to present. [AI]
p_presenterAnimation presenter. [AI]

Definition at line 2219 of file legoanimationmanager.cpp.

◆ FUN_10063780()

void LegoAnimationManager::FUN_10063780 ( LegoROIList p_list)

[AI] Examines an ROI list and adds all actors of type to internal "pending" list for extras.

Parameters
p_listList to check. [AI]

Definition at line 2299 of file legoanimationmanager.cpp.

◆ FUN_10064670()

MxResult LegoAnimationManager::FUN_10064670 ( Vector3 p_position)

[AI] Activates special triggered animation in response to player position near given point.

Parameters
p_positionWorld position to test proximity. [AI]

Definition at line 2703 of file legoanimationmanager.cpp.

◆ FUN_10064740()

MxResult LegoAnimationManager::FUN_10064740 ( Vector3 p_position)

[AI] Similar to FUN_10064670, but triggers a different special animation event for secondary location or characters.

Parameters
p_positionWorld position. [AI]

Definition at line 2727 of file legoanimationmanager.cpp.

◆ FUN_10064880()

MxResult LegoAnimationManager::FUN_10064880 ( const char *  p_name,
MxS32  p_unk0x0c,
MxS32  p_unk0x10 
)

[AI] Updates specified character's extra animation idle/play time values for active extras.

Parameters
p_nameName of extra. [AI]
p_unk0x0cMinimum idle time. [AI]
p_unk0x10Maximum idle time. [AI]

Definition at line 2760 of file legoanimationmanager.cpp.

◆ FUN_10064ee0()

MxBool LegoAnimationManager::FUN_10064ee0 ( MxU32  p_objectId)

[AI] Determines if any currently running animation is assigned to the given objectId, and queries its presenter.

Parameters
p_objectIdAnimation object id. [AI]

Definition at line 2856 of file legoanimationmanager.cpp.

◆ GetTranInfo()

LegoTranInfo * LegoAnimationManager::GetTranInfo ( MxU32  p_index)

[AI] Retrieves an active transition info, or NULL if not found.

Parameters
p_indexIndex into tranInfo list to locate. [AI]

Definition at line 1375 of file legoanimationmanager.cpp.

◆ IsA()

MxBool LegoAnimationManager::IsA ( const char *  p_name) const
overridevirtual

[AI] Checks if this or a parent is the given class.

Reimplemented from MxCore.

◆ LoadWorldInfo()

MxResult LegoAnimationManager::LoadWorldInfo ( LegoOmni::World  p_worldId)

[AI] Loads all world animation and extra info.

Called on world change.

Parameters
p_worldIdThe world identifier. [AI]

Definition at line 583 of file legoanimationmanager.cpp.

◆ Notify()

MxLong LegoAnimationManager::Notify ( MxParam p_param)
overridevirtual

[AI] Handles system/game notifications, e.g.

end of animation events.

Parameters
p_paramNotification parameter. [AI]

Reimplemented from MxCore.

Definition at line 1393 of file legoanimationmanager.cpp.

◆ PurgeExtra()

void LegoAnimationManager::PurgeExtra ( MxBool  p_und)

[AI] Removes all extras matching current world/time criteria (but not the player's current character).

Parameters
p_undTRUE to purge, FALSE for timed/policy cleanup. [AI]

Definition at line 1824 of file legoanimationmanager.cpp.

◆ ReadAnimInfo()

MxResult LegoAnimationManager::ReadAnimInfo ( LegoStorage p_storage,
AnimInfo p_info 
)

[AI] Reads an AnimInfo entry from file storage, building model list and parsing parameters.

Parameters
p_storageInput file reader. [AI]
p_infoPopulated AnimInfo. [AI]

Definition at line 757 of file legoanimationmanager.cpp.

◆ ReadModelInfo()

MxResult LegoAnimationManager::ReadModelInfo ( LegoStorage p_storage,
ModelInfo p_info 
)

[AI] Reads a single ModelInfo out of storage.

Used for parsing animation's model details.

Parameters
p_storageFile input. [AI]
p_infoModelInfo structure to fill. [AI]

Definition at line 819 of file legoanimationmanager.cpp.

◆ Reset()

void LegoAnimationManager::Reset ( MxBool  p_und)

[AI] Resets all internal state; optionally resets animation state too.

Parameters
p_undIf TRUE, animation state is reset. [AI]

Definition at line 382 of file legoanimationmanager.cpp.

◆ Resume()

void LegoAnimationManager::Resume ( )

[AI] Resumes animation manager from suspension, restoring all previously suspended state.

Definition at line 481 of file legoanimationmanager.cpp.

◆ StartEntityAction()

MxResult LegoAnimationManager::StartEntityAction ( MxDSAction p_dsAction,
LegoEntity p_entity 
)

[AI] Starts a DSAction for a specific entity, managing controller/actor logic if relevant.

Parameters
p_dsActionThe action to start. [AI]
p_entityEntity for this action (must not be NULL). [AI]

Definition at line 1097 of file legoanimationmanager.cpp.

◆ Suspend()

void LegoAnimationManager::Suspend ( )

[AI] Suspends all activity, saving out transition/animation state, and disables extra processing.

Definition at line 412 of file legoanimationmanager.cpp.

◆ Tickle()

MxResult LegoAnimationManager::Tickle ( )
overridevirtual

[AI] Called by tick manager, processes world/time-based animation logic, including spawning extras and updating transitions.

Reimplemented from MxCore.

Definition at line 1457 of file legoanimationmanager.cpp.


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