24void LegoHideAnimPresenter::Init()
35 delete[] m_boundaryMap;
42 if (!p_fromDestructor) {
116 if (m_boundaryMap !=
NULL) {
119 if (boundary !=
NULL) {
127 FUN_1006db60(p_node->
GetChild(i), p_time);
133void LegoHideAnimPresenter::FUN_1006dc10()
139 if (m_boundaryMap !=
NULL) {
140 delete[] m_boundaryMap;
144 m_boundaryMap[0] =
NULL;
146 for (LegoHideAnimStructMap::iterator it = anims.begin(); !(it == anims.end()); it++) {
147 m_boundaryMap[(*it).second.m_index] = (*it).second.m_boundary;
148 delete[]
const_cast<char*
>((*it).first);
157 const char* name = data->
GetName();
162 if (boundary !=
NULL) {
163 FUN_1006e470(p_map, data, name, boundary);
171 for (
MxS32 i = 0; i < count; i++) {
172 FUN_1006e3f0(p_map, p_node->
GetChild(i));
178void LegoHideAnimPresenter::FUN_1006e470(
185 LegoHideAnimStructMap::iterator it;
187 it = p_map.find(p_name);
188 if (it == p_map.end()) {
190 animStruct.
m_index = p_map.size() + 1;
195 char* name =
new char[strlen(p_name) + 1];
196 strcpy(name, p_name);
198 p_map[name] = animStruct;
[AI] Holds per-node animation data for a model's animation tree.
void SetUnknown0x22(LegoU16 p_unk0x22)
[AI] Sets unknown parameter (possibly camera/scene state).
LegoBool FUN_100a0990(LegoFloat p_time)
[AI] Evaluates morph keys at the given animation time and returns result (typically affects mesh shap...
LegoU16 GetUnknown0x20()
[AI] Unknown, used in scene/camera calculations (purpose unclear).
LegoChar * GetName()
[AI] Name of this animation node (used for lookup/mapping to scene graph).
LegoU16 GetUnknown0x22()
[AI] Unknown, used in scene/camera calculations (purpose unclear).
void StartingTickle() override
[AI] Called at the "Starting" tickle state.
LegoAnim * m_anim
[AI] Animation resource currently being played back.
void ReadyTickle() override
[AI] Called when the presenter is in the "Ready" tickle state.
LegoROI ** m_roiMap
[AI] Lookup array to map animation node indices to scene ROIs (1-based index).
MxResult AddToManager() override
[AI] Adds this presenter instance to the relevant presenter/notification manager.
LegoWorld * m_currentWorld
[AI] Reference to the world in which this presenter is currently placed/active.
[AI] Presenter class responsible for controlling animations that hide or show actors based on animati...
void StartingTickle() override
[AI] Called during the Starting state tick; if streaming state is reached, prepares boundary mappings...
~LegoHideAnimPresenter() override
[AI] Destructor. Destroys presenter and cleans up boundary mapping.
void ReadyTickle() override
[AI] Called when presenter is in the Ready state; maps boundaries to animation nodes and adds present...
void EndAction() override
[AI] Called when the associated DSAction has ended, cleans up and removes presenter from the world.
void PutFrame() override
[AI] Advances the animation by one frame (no-op here; implemented in other presenter classes).
MxResult AddToManager() override
[AI] Adds the presenter to the tickle manager; delegates to base animation presenter registration.
void Destroy() override
[AI] Destroys the presenter, optionally from destructor; cleans up resources and removes from world.
void FUN_1006db40(LegoTime p_time)
[AI] Traverses the animation node hierarchy starting at the root and synchronizes visibility flags fo...
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
[AI] Represents a node within a general, N-ary tree structure.
LegoTreeNodeData * GetData()
[AI] Returns the data payload stored at this node (may be nullptr). [AI]
LegoU32 GetNumChildren()
[AI] Returns the number of direct children of this node. [AI]
LegoTreeNode * GetChild(LegoU32 p_i)
[AI] Gets the child node at the specified index (no bounds checking).
LegoTreeNode * GetRoot()
[AI] Returns a pointer to the root node of the tree. [AI]
LegoU32 GetFlag0x10()
Returns TRUE if the 'disabled' flag is not set, otherwise FALSE.
void SetFlag0x10(LegoU32 p_disable)
[AI] Sets the enabled/disabled flag for this edge.
void Remove(MxCore *p_object)
Removes an object from all relevant world-managed lists or sets, and also detaches if needed.
virtual void Add(MxCore *p_object)
Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set.
LegoPathBoundary * FindPathBoundary(const char *p_name)
Finds a path boundary in all path controllers by name.
void Enter()
[AI] Acquires/gains entry to the critical section or mutex, blocking if not available.
void Leave()
[AI] Releases/leaves the critical section or mutex.
MxDSAction * m_action
[AI] The associated action currently being presented by this presenter.
TickleState m_currentTickleState
[AI] Current state in the tickle lifecycle.
@ e_starting
[AI] In the process of starting playback/presentation.
@ e_streaming
[AI] Streaming or rendering actively.
MxCriticalSection m_criticalSection
[AI] Thread synchronization for presenter state and data.
MxCompositePresenter * m_compositePresenter
[AI] Owner composite presenter, if any.
void SendToCompositePresenter(MxOmni *p_omni)
[AI] Notifies a composite presenter (if one exists) that this presenter wishes to join a group.
void EndAction() override
Signals the end of the current playback action.
unsigned char GetVisibility()
[AI] Returns the visibility flag; true if visible, false if hidden.
void SetVisibility(unsigned char p_visible)
[AI] Sets the visibility flag to the provided value.
#define DECOMP_SIZE_ASSERT(T, S)
map< const char *, LegoHideAnimStruct, LegoHideAnimStructComparator > LegoHideAnimStructMap
[AI] Map associating string (name) keys to LegoHideAnimStruct, using custom comparator for C strings.
#define NULL
[AI] Null pointer value (C/C++ semantics).
LegoS32 LegoTime
[AI] Time value, typically used for tick counts, durations, or timing; defined as a signed 32-bit int...
LegoOmni * Lego()
[AI] Retrieves the global LegoOmni singleton instance, providing access to core subsystems.
[AI] Structure associating a path boundary with an index.
LegoPathBoundary * m_boundary
[AI] Pointer to a LegoPathBoundary found by name from animation node
MxU32 m_index
[AI] Index assigned to this boundary in the map and used for node-to-boundary association