1#ifndef LEGOANIMATIONMANAGER_H
2#define LEGOANIMATIONMANAGER_H
91 MxU32 m_extraCharacterId;
94 MxU32 m_locationsFlagsLength;
318 void DeleteAnimations();
336 MxS8 GetCharacterIndex(
const char* p_name);
345 void FUN_10062580(
AnimInfo& p_info);
356 void FUN_10063950(
LegoROI* p_roi);
381 const char* p_boundaryName,
397 void FUN_10064b50(
MxLong p_time);
415 MxU32 m_lastExtraCharacterId;
424 MxU32 m_numAllowedExtras;
428 MxBool m_suspendedEnableCamAnims;
[AI] Persistent serializable animation state for resuming animations and restoring global animation p...
AnimState()
Constructor. [AI].
void CopyToAnims(MxU32, AnimInfo *p_anims, MxU32 &p_outExtraCharacterId)
[AI] Writes tracked usage data to animations.
MxBool Reset() override
[AI] Resets all tracked animation usage to default.
MxBool IsA(const char *p_name) const override
[AI] Checks if this or a parent is the given class.
const char * ClassName() const override
[AI] Gets the class name ("AnimState").
~AnimState() override
Destructor, releases animation tracking arrays. [AI].
MxResult Serialize(LegoStorage *p_storage) override
[AI] Serialize state to or from disk for save/load.
void InitFromAnims(MxU32 p_animsLength, AnimInfo *p_anims, MxU32 p_extraCharacterId)
[AI] Reads usage state from animations and stores it in this AnimState.
[AI] Handles playback and synchronization of animated LEGO objects, including variable substitution,...
[AI] Animation manager handling all world and character animation state, loading, and logic for extra...
MxLong Notify(MxParam &p_param) override
[AI] Handles system/game notifications, e.g.
void PurgeExtra(MxBool p_und)
[AI] Removes all extras matching current world/time criteria (but not the player's current character)...
MxResult StartEntityAction(MxDSAction &p_dsAction, LegoEntity *p_entity)
[AI] Starts a DSAction for a specific entity, managing controller/actor logic if relevant.
void FUN_10063780(LegoROIList *p_list)
[AI] Examines an ROI list and adds all actors of type to internal "pending" list for extras.
MxBool FUN_10064ee0(MxU32 p_objectId)
[AI] Determines if any currently running animation is assigned to the given objectId,...
void FUN_10060540(MxBool p_unk0x29)
[AI] Sets the 'enabled for random camera animation' flag for all animations.
void FUN_10060480(const LegoChar *p_characterNames[], MxU32 p_numCharacterNames)
[AI] Marks characters in the global character list (g_characters) as available for animation accordin...
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.
MxBool FindVehicle(const char *p_name, MxU32 &p_index)
[AI] Looks up a vehicle by name, returning its index if found.
void Reset(MxBool p_und)
[AI] Resets all internal state; optionally resets animation state too.
void FUN_10061010(MxBool p_und)
[AI] Cancels all camera/transition animations and resets camera after completion.
PlayMode
[AI] Animation play modes, possibly for controlling explicit or random playback.
@ e_unk1
[AI] Unknown/unspecified play mode
@ e_unk2
[AI] Unknown/unspecified play mode
@ e_unk0
[AI] Unknown/unspecified play mode
~LegoAnimationManager() override
Destructor, cleans up all allocations and deregisters from tickle/notify. [AI].
void FUN_100604f0(MxS32 p_objectIds[], MxU32 p_numObjectIds)
[AI] Enables/disables certain animations by object id list (sets m_unk0x29 flag in AnimInfo).
MxResult LoadWorldInfo(LegoOmni::World p_worldId)
[AI] Loads all world animation and extra info.
const char * ClassName() const override
[AI] Gets the class name ("LegoAnimationManager").
MxResult Tickle() override
[AI] Called by tick manager, processes world/time-based animation logic, including spawning extras an...
MxResult ReadModelInfo(LegoStorage *p_storage, ModelInfo *p_info)
[AI] Reads a single ModelInfo out of storage.
void FUN_10060570(MxBool p_unk0x1a)
[AI] Sets whether the manager should immediately trigger camera transition animations in quick succes...
void Resume()
[AI] Resumes animation manager from suspension, restoring all previously suspended state.
void FUN_100604d0(MxBool p_unk0x08)
[AI] Sets the m_unk0x08 flag for all characters.
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.
void FUN_10062770()
[AI] Initializes sound transitions if not already active for the current world.
void EnableCamAnims(MxBool p_enableCamAnims)
[AI] Sets whether camera-based queued animations are enabled for the world.
void FUN_10063270(LegoROIList *p_list, LegoAnimPresenter *p_presenter)
[AI] Handles "extras" onboarding by evaluating visibility and position for presenter-based animation.
LegoAnimationManager()
Default constructor. [AI].
void CameraTriggerFire(LegoPathActor *p_actor, MxBool, MxU32 p_location, MxBool p_bool)
[AI] Triggers a camera animation based on user and location state.
MxResult ReadAnimInfo(LegoStorage *p_storage, AnimInfo *p_info)
[AI] Reads an AnimInfo entry from file storage, building model list and parsing parameters.
void Suspend()
[AI] Suspends all activity, saving out transition/animation state, and disables extra processing.
MxBool IsA(const char *p_name) const override
[AI] Checks if this or a parent is the given class.
MxResult FUN_10064740(Vector3 *p_position)
[AI] Similar to FUN_10064670, but triggers a different special animation event for secondary location...
MxResult FUN_10064670(Vector3 *p_position)
[AI] Activates special triggered animation in response to player position near given point.
LegoTranInfo * GetTranInfo(MxU32 p_index)
[AI] Retrieves an active transition info, or NULL if not found.
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig)
[AI] Updates the configuration values (global) for animation manager's allowed number of extras,...
void AddExtra(MxS32 p_location, MxBool p_und)
[AI] Spawns a new extra actor at a boundary or location, if capacity and logic allow.
void FUN_1005f6d0(MxBool p_unk0x400)
[AI] Enables or disables extras (extra actors).
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
Implementation of LegoStorage for file-backed storage using stdio FILE*.
World
[AI] Identifiers for all unique, script-driven world environments in LEGO Island.
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] A specialized pointer list for managing LegoROI instances.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
[AI] Base class for game state blocks which encapsulate serializable and/or resettable aspects of the...
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
[AI] List container holding pointers to LegoTranInfo objects for use in transfer/pathfinding/ROIs.
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
[AI] Base virtual class for all Mindscape engine (Mx) objects.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
unsigned short undefined2
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
[AI] Describes a specific animation, containing animation parameters, model list, and related metadat...
float m_unk0x10[4]
Animation parameters: start/target position and radius. [AI].
MxBool m_unk0x29
Animation is active/available/playable. [AI].
MxU16 m_unk0x22
Use-count or instance count for this animation. [AI].
ModelInfo * m_models
Array of ModelInfo structs for the animation's involved models. [AI].
MxU8 m_unk0x0c
Bitmask related to actor/vehicle ability to use this animation (see g_unk0x100d8b28)....
MxU32 m_objectId
Object ID corresponding to this animation; used as a unique key. [AI].
MxBool m_unk0x0a
Boolean to control startup/behavioral logic. [AI].
MxS8 m_unk0x2a[3]
Vehicle indices or similar (max 3), for use by certain actors. [AI].
MxU8 m_unk0x0b
Purpose unknown; animation-related flag. [AI].
MxU8 m_unk0x0d
Additional animation state flag. [AI].
char * m_name
Animation name. [AI].
MxS8 m_characterIndex
Index into g_characters for the owning character (-1 if not set). [AI].
MxS16 m_location
Location index if relevant (−1 for omni/global). [AI].
MxU8 m_modelCount
Number of models referenced in m_models array. [AI].
[AI] Static definition of a character, its animation settings, flags, and world identity.
MxS32 m_unk0x10
Maximum idle time before main animation for this character (milliseconds). [AI].
const char * m_name
Character's name/identifier (must be unique). [AI].
undefined m_unk0x06
[AI_SUGGESTED_NAME: unusedPadding] Currently unused byte. [AI]
MxBool m_active
Runtime flag; TRUE if animation for this character is currently activated (in any mode)....
MxBool m_unk0x08
Boolean, TRUE if this character is eligible for "extra" animation. [AI].
MxU8 m_unk0x15
Probability (0–100) used for random vehicle assignment. [AI].
MxBool m_unk0x09
Boolean, TRUE if this character is ever to be placed as an extra at all. [AI].
MxBool m_unk0x07
Flag for reuse/destruction logic; meaning: pending return to actor pool. [AI].
MxS8 m_unk0x16
Index in g_cycles, used for finding correct main/alternative cycle animations for this character....
MxS8 m_vehicleId
Index into the vehicle array for this character's vehicle, −1 if not relevant. [AI].
MxBool m_inExtras
True if this character is currently active as an 'extra'. [AI].
MxS32 m_unk0x0c
Minimum idle time before main animation for this character (milliseconds). [AI].
[AI] Static definition of a vehicle, including its name and state flags.
const char * m_name
Vehicle's name (corresponds to a ROI/model name). [AI].
MxBool m_unk0x04
TRUE if this vehicle is to be used in the next animation cycle. [AI].
MxBool m_unk0x05
TRUE if this vehicle is reserved by an actor present as an extra. [AI].
Defines a logical boundary associated with a location for things such as triggers,...
[AI] Holds transformation and animation information for a LEGO object/ROI, especially in the context ...
[AI] Represents an advanced edge in the LEGO Island geometry system, with direction,...
[AI] Contains information about a model used in an animation, including name and orientation.
MxU8 m_unk0x2c
Unknown purpose, acts as a boolean/flag. [AI].
MxU8 m_unk0x04
Unknown byte flag. [AI].
char * m_name
Name of the model. [AI].
float m_location[3]
Location/origin for the model in 3D space. [AI].
float m_direction[3]
Forward/direction vector. [AI].
float m_up[3]
Up vector for the model orientation. [AI].