Isle
|
[AI] Animation manager handling all world and character animation state, loading, and logic for extras and transitions. More...
#include <legoanimationmanager.h>
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... | |
LegoTranInfo * | GetTranInfo (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... | |
![]() | |
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... | |
[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.
[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.
LegoAnimationManager::LegoAnimationManager | ( | ) |
Default constructor. [AI].
Definition at line 327 of file legoanimationmanager.cpp.
|
override |
Destructor, cleans up all allocations and deregisters from tickle/notify. [AI].
Definition at line 341 of file legoanimationmanager.cpp.
[AI] Spawns a new extra actor at a boundary or location, if capacity and logic allow.
p_location | Index (−1 for random). [AI] |
p_und | TRUE for forced placement, else timed. [AI] |
Definition at line 1879 of file legoanimationmanager.cpp.
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]
p_actor | User actor. [AI] |
... | See implementation for exact call logic. [AI] |
Definition at line 1187 of file legoanimationmanager.cpp.
|
overridevirtual |
[AI] Gets the class name ("LegoAnimationManager").
Reimplemented from MxCore.
|
static |
[AI] Updates the configuration values (global) for animation manager's allowed number of extras, performance settings etc.
p_legoAnimationManagerConfig | Config value (usually 1 or 2). [AI] |
Definition at line 320 of file legoanimationmanager.cpp.
void LegoAnimationManager::EnableCamAnims | ( | MxBool | p_enableCamAnims | ) |
[AI] Sets whether camera-based queued animations are enabled for the world.
p_enableCamAnims | TRUE to enable, FALSE to disable. [AI] |
Definition at line 572 of file legoanimationmanager.cpp.
[AI] Looks up a vehicle by name, returning its index if found.
p_name | Vehicle name to search for. [AI] |
p_index | (output) Found vehicle index. [AI] |
Definition at line 744 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_1005f6d0 | ( | MxBool | p_unk0x400 | ) |
[AI] Enables or disables extras (extra actors).
If disabling, purges all extras.
p_unk0x400 | TRUE to enable extras, FALSE to disable and remove all extras. [AI] |
Definition at line 556 of file legoanimationmanager.cpp.
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.
p_characterNames | Array of names to enable. [AI] |
p_numCharacterNames | Number of entries in array. [AI] |
Definition at line 884 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_100604d0 | ( | MxBool | p_unk0x08 | ) |
[AI] Sets the m_unk0x08 flag for all characters.
[AI]
p_unk0x08 | Value to set for all characters (TRUE/FALSE). [AI] |
Definition at line 897 of file legoanimationmanager.cpp.
[AI] Enables/disables certain animations by object id list (sets m_unk0x29 flag in AnimInfo).
p_objectIds | Array of object IDs. [AI] |
p_numObjectIds | Count of object IDs. [AI] |
Definition at line 906 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_10060540 | ( | MxBool | p_unk0x29 | ) |
[AI] Sets the 'enabled for random camera animation' flag for all animations.
p_unk0x29 | TRUE/FALSE to set. [AI] |
Definition at line 919 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_10060570 | ( | MxBool | p_unk0x1a | ) |
[AI] Sets whether the manager should immediately trigger camera transition animations in quick succession.
p_unk0x1a | TRUE to enable, FALSE to clear. [AI] |
Definition at line 928 of file legoanimationmanager.cpp.
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 for start; see implementation for detailed logic. [AI] |
Definition at line 1137 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_10061010 | ( | MxBool | p_und | ) |
[AI] Cancels all camera/transition animations and resets camera after completion.
p_und | TRUE to fully stop, FALSE to only end visuals. [AI] |
Definition at line 1230 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_10062770 | ( | ) |
[AI] Initializes sound transitions if not already active for the current world.
Definition at line 1807 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_10063270 | ( | LegoROIList * | p_list, |
LegoAnimPresenter * | p_presenter | ||
) |
[AI] Handles "extras" onboarding by evaluating visibility and position for presenter-based animation.
p_list | ROI list of extras to present. [AI] |
p_presenter | Animation presenter. [AI] |
Definition at line 2219 of file legoanimationmanager.cpp.
void LegoAnimationManager::FUN_10063780 | ( | LegoROIList * | p_list | ) |
[AI] Examines an ROI list and adds all actors of type to internal "pending" list for extras.
p_list | List to check. [AI] |
Definition at line 2299 of file legoanimationmanager.cpp.
[AI] Activates special triggered animation in response to player position near given point.
p_position | World position to test proximity. [AI] |
Definition at line 2703 of file legoanimationmanager.cpp.
[AI] Similar to FUN_10064670, but triggers a different special animation event for secondary location or characters.
p_position | World position. [AI] |
Definition at line 2727 of file legoanimationmanager.cpp.
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.
p_name | Name of extra. [AI] |
p_unk0x0c | Minimum idle time. [AI] |
p_unk0x10 | Maximum idle time. [AI] |
Definition at line 2760 of file legoanimationmanager.cpp.
[AI] Determines if any currently running animation is assigned to the given objectId, and queries its presenter.
p_objectId | Animation object id. [AI] |
Definition at line 2856 of file legoanimationmanager.cpp.
LegoTranInfo * LegoAnimationManager::GetTranInfo | ( | MxU32 | p_index | ) |
[AI] Retrieves an active transition info, or NULL if not found.
p_index | Index into tranInfo list to locate. [AI] |
Definition at line 1375 of file legoanimationmanager.cpp.
|
overridevirtual |
[AI] Checks if this or a parent is the given class.
Reimplemented from MxCore.
MxResult LegoAnimationManager::LoadWorldInfo | ( | LegoOmni::World | p_worldId | ) |
[AI] Loads all world animation and extra info.
Called on world change.
p_worldId | The world identifier. [AI] |
Definition at line 583 of file legoanimationmanager.cpp.
[AI] Handles system/game notifications, e.g.
end of animation events.
p_param | Notification parameter. [AI] |
Reimplemented from MxCore.
Definition at line 1393 of file legoanimationmanager.cpp.
void LegoAnimationManager::PurgeExtra | ( | MxBool | p_und | ) |
[AI] Removes all extras matching current world/time criteria (but not the player's current character).
p_und | TRUE to purge, FALSE for timed/policy cleanup. [AI] |
Definition at line 1824 of file legoanimationmanager.cpp.
MxResult LegoAnimationManager::ReadAnimInfo | ( | LegoStorage * | p_storage, |
AnimInfo * | p_info | ||
) |
[AI] Reads an AnimInfo entry from file storage, building model list and parsing parameters.
p_storage | Input file reader. [AI] |
p_info | Populated AnimInfo. [AI] |
Definition at line 757 of file legoanimationmanager.cpp.
MxResult LegoAnimationManager::ReadModelInfo | ( | LegoStorage * | p_storage, |
ModelInfo * | p_info | ||
) |
[AI] Reads a single ModelInfo out of storage.
Used for parsing animation's model details.
p_storage | File input. [AI] |
p_info | ModelInfo structure to fill. [AI] |
Definition at line 819 of file legoanimationmanager.cpp.
void LegoAnimationManager::Reset | ( | MxBool | p_und | ) |
[AI] Resets all internal state; optionally resets animation state too.
p_und | If TRUE, animation state is reset. [AI] |
Definition at line 382 of file legoanimationmanager.cpp.
void LegoAnimationManager::Resume | ( | ) |
[AI] Resumes animation manager from suspension, restoring all previously suspended state.
Definition at line 481 of file legoanimationmanager.cpp.
MxResult LegoAnimationManager::StartEntityAction | ( | MxDSAction & | p_dsAction, |
LegoEntity * | p_entity | ||
) |
[AI] Starts a DSAction for a specific entity, managing controller/actor logic if relevant.
p_dsAction | The action to start. [AI] |
p_entity | Entity for this action (must not be NULL). [AI] |
Definition at line 1097 of file legoanimationmanager.cpp.
void LegoAnimationManager::Suspend | ( | ) |
[AI] Suspends all activity, saving out transition/animation state, and disables extra processing.
Definition at line 412 of file legoanimationmanager.cpp.
|
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.