28void MxEventPresenter::Init()
104 if (m_data[12] == 2) {
108 const char* name = data;
110 data += strlen(data) + 1;
112 const char* value = data;
114 data += strlen(data) + 1;
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.
virtual MxLong GetElapsedTime()
[AI] Gets elapsed time for this action since the last time field 0x90 was set.
MxU32 GetLength()
[AI] Returns the length in bytes of the data payload. [AI]
MxLong GetTime()
[AI] Returns the time (timestamp or tick) associated with this chunk. [AI]
MxU8 * GetData()
[AI] Returns a pointer to the start of the data payload. [AI]
void FreeDataChunk(MxStreamChunk *p_chunk)
[AI] Frees (deletes) a data chunk if it's found in the consumed data list; also forcibly deletes sing...
[AI] Presenter for handling "Event" stream data, typically parsed from event actions in SI files.
MxEventPresenter()
[AI] Constructs an event presenter and initializes internal state.
MxResult PutData() override
[AI] If the event is a variable table command (event type == 2), parses and updates the variable tabl...
virtual void CopyData(MxStreamChunk *p_chunk)
[AI] Copies raw chunk data from a stream chunk (e.g., from a SI file), for use by the event presenter...
void ReadyTickle() override
[AI] Processes event data in the ready state; copies the next chunk's data and prepares for parsing e...
~MxEventPresenter() override
[AI] Destructor, unregisters from event manager and releases memory.
void Destroy() override
[AI] Unregisters this presenter from the event manager and frees owned resources, including event dat...
MxResult AddToManager() override
[AI] Registers this presenter with the event manager for tickling and notification.
void StartingTickle() override
[AI] Processes "starting" state, transitioning to streaming if elapsed time has passed the chunk time...
virtual void ParseExtra()
[AI] Parses additional data from the associated action for configuration or world interaction.
void ProgressTickleState(TickleState p_tickleState)
[AI] Helper for advancing the presenter's tickle state and updating transition history.
MxBool IsEnabled()
[AI] Returns whether this presenter is logically enabled (based on the associated action's flags).
MxDSAction * m_action
[AI] The associated action currently being presented by this presenter.
TickleState m_currentTickleState
[AI] Current state in the tickle lifecycle.
@ e_repeating
[AI] Presentation is repeating (e.g., looping media).
@ e_done
[AI] Completed processing the current action.
@ 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.
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for no...
MxVariableTable is a specialized hash table for storing key/value string variables used by the LEGO I...
void SetVariable(const char *p_key, const char *p_value)
Sets a variable by key and value, replacing or updating if it exists.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
#define AUTOLOCK(CS)
[AI] Macro for automatic locking using the MxAutoLock class. This macro instantiates an MxAutoLock ob...
MxEventManager * EventManager()
[AI] Returns the event manager responsible for handling event messages in the game.
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.