142 if (dataActionStart ==
NULL) {
155 MxS16 newUnknown24 = -1;
166 if (newUnknown24 == -1) {
175 if (newUnknown24 == -1) {
196 if (!streamingAction) {
232 if (action !=
NULL) {
249 if (action ==
NULL) {
267 if (action !=
NULL) {
295 if (p_action->
IsA(
"MxDSMultiAction")) {
300 while (cursor.
Next(action)) {
325 "Subscriber for action (stream %d, instance %d) from %s is still here.\n",
333 if (p_obj->
IsA(
"MxDSMultiAction")) {
337 while (cursor.
Next(action)) {
351 for (iterator it = begin(); it != end(); it++) {
352 if (p_id == (*it)->GetObjectId() && p_value == (*it)->GetUnknown24()) {
366 for (iterator it = begin(); it != end(); it++) {
367 if (p_id == (*it)->GetObjectId() && (p_value == -2 || p_value == (*it)->GetUnknown24())) {
[AI] Atomized (unique) string identifier, managed by reference counting.
const char * GetInternal() const
[AI] Returns a pointer to the internal string, or nullptr if not set.
[AI] Convenience cursor class for iterating over an MxDSActionList.
[AI] A list (collection) of pointers to MxDSAction objects, supporting comparison,...
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
virtual void SetUnknown90(MxLong p_unk0x90)
[AI] Set unknown value at offset 0x90, used as baseline in GetElapsedTime.
MxBool IsA(const char *p_name) const override
[AI] Run-time type check, compares provided name with this or any ancestor type.
virtual MxDSAction * Clone()
[AI] Clones (deep-copies) this action and returns a new pointer.
void SetChunkFlags(MxU16 p_flags)
[AI] Sets all chunk header flag bits.
void SetObjectId(undefined4 p_objectid)
[AI] Sets the object id for this chunk (links chunk data to logical entity, resource,...
[AI] Represents a container for multiple MxDSAction objects, facilitating the grouping and management...
MxDSObject * FindAndErase(MxDSObject *p_action)
[AI] Finds the matching object and removes it from the list.
MxDSObject * Find(MxDSObject *p_action)
[AI] Finds a matching object in the list without removing it.
[AI] Base class for any object deserialized from an SI (script/data) file in the LEGO Island engine.
MxBool IsA(const char *p_name) const override
[AI] Runtime type check; supports derived/parent class lookup by name.
void SetUnknown24(MxS16 p_unk0x24)
[AI] Sets the unknown field at 0x24 (possibly version/state).
MxPresenter * GetUnknown28()
[AI] Returns the pointer stored at 0x28, likely a presenter or handler for this DS object.
MxS16 GetUnknown24()
[AI] Returns the unknown 0x24 value (may be data version or usage state). [AI]
void SetObjectId(MxU32 p_objectId)
[AI] Sets the object id (for serialization or lookup).
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
[AI] Represents an action that streams data from a buffer within a DirectScript (DS) media timeline.
void SetBufferOffset(MxU32 p_bufferOffset)
[AI] Sets the current buffer read offset.
MxDSSubscriber * Find(MxDSObject *p_object)
[AI] Searches for a subscriber corresponding to the provided MxDSObject.
[AI] Handles the receipt, queuing, and batch management of data chunks streamed by a MxStreamControll...
MxS16 GetUnknown48()
[AI] Returns the member field sometimes used for disambiguating media (purpose context-specific).
MxU32 GetObjectId()
[AI] Returns the object identifier associated with this subscriber.
[AI] List class specialized for storing MxNextActionDataStart pointers, managing streaming action sta...
MxNextActionDataStart * FindAndErase(MxU32 p_id, MxS16 p_value)
[AI] Searches for a MxNextActionDataStart with the given properties and erases it from the list if fo...
MxNextActionDataStart * Find(MxU32 p_id, MxS16 p_value)
[AI] Searches for a MxNextActionDataStart element with the given object ID and unknown value.
[AI] Contains data for scheduling the next action in a process, storing an object id,...
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for no...
MxResult SendChunk(MxDSSubscriberList &p_subscriberList, MxBool p_append, MxS16 p_obj24val)
[AI] Dispatches this stream chunk to a list of subscribers matching certain criteria.
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
virtual MxResult VTable0x24(MxDSAction *p_action)
[AI] Matches and processes an action in the "unk0x54" (pending) list and triggers sending to subscrib...
MxDSSubscriberList m_subscribers
[AI] List of current subscribers (listening entities for streamed data).
undefined4 * m_unk0x2c
[AI] Unknown data, likely used for streaming internals or as a metadata pointer.
~MxStreamController() override
[AI] Destructor.
MxResult FUN_100c1a00(MxDSAction *p_action, MxU32 p_offset)
[AI] Allocates and inserts a streaming action chunk at a given buffer offset for the supplied action.
void RemoveSubscriber(MxDSSubscriber *p_subscriber)
[AI] Removes a previously registered subscriber from the stream notification list.
MxCriticalSection m_criticalSection
[AI] Protects streaming controller state for thread-safety.
virtual MxResult VTable0x20(MxDSAction *p_action)
[AI] Streams data for the provided action by determining data offset and reading required chunk.
MxAtomId m_atom
[AI] Unique identifier for this stream, derived from source/resource name.
MxBool IsStoped(MxDSObject *p_obj)
[AI] Checks if the streaming operation for a given object/action has fully stopped and no longer has ...
MxResult FUN_100c1f00(MxDSAction *p_action)
[AI] Sends a streaming chunk to all current subscribers for the specified action, handling recursive ...
MxNextActionDataStartList m_nextActionList
[AI] List mapping from streamed object/action to starting offset (used for internal tracking).
MxDSObjectList m_unk0x3c
[AI] List of actions currently being processed/streamed ("in progress" actions).
MxDSAction * m_action0x60
[AI] Current action pointer used during processing, moved from pending to active as actions are proce...
virtual MxResult Open(const char *p_filename)
[AI] Opens a data stream with the specified resource filename.
void AddSubscriber(MxDSSubscriber *p_subscriber)
[AI] Adds a subscriber to the list who will receive streaming action data.
MxStreamProvider * m_provider
[AI] Stream provider abstraction, handling resource IO (RAM/disk).
MxDSObjectList m_unk0x54
[AI] List of actions queued and ready to be streamed ("pending" actions).
MxPresenter * FUN_100c1e70(MxDSAction &p_action)
[AI] Returns the presenter associated with a given in-progress streaming action.
MxNextActionDataStart * FindNextActionDataStartFromStreamingAction(MxDSStreamingAction *p_action)
[AI] Finds the corresponding next action data start (offset info) for a streaming action.
MxResult FUN_100c1800(MxDSAction *p_action, MxU32 p_val)
[AI] Helper function to add a next action data start object for tracking offsets for streaming action...
MxAtomId & GetAtom()
[AI] Retrieves the atom ID (unique logical identifier) for this stream controller.
virtual MxResult VTable0x30(MxDSAction *p_action)
[AI] Removes a completed action from in-progress ("unk0x3c") list and deletes its data block.
virtual MxResult VTable0x2c(MxDSAction *p_action, MxU32 p_bufferval)
[AI] Handles allocation and setup of a new streaming action and associated chunk for the action,...
MxResult InsertActionToList54(MxDSAction *p_action)
[AI] Inserts a clone of the provided action into the pending ("unk0x54") list.
[AI] Abstract base class for stream resource providers in the LEGO Island engine.
virtual MxU32 GetFileSize()=0
[AI] Gets the file size, in bytes, of the underlying SI file resource.
virtual void VTable0x20(MxDSAction *p_action)
[AI] Virtual hook for subclasses to react to new stream actions being queued.
virtual MxU32 GetLengthInDWords()=0
[AI] Gets the full buffer length, interpreted as a DWORD-count, for direct buffer streaming.
virtual MxU32 * GetBufferForDWords()=0
[AI] Returns a pointer to the underlying buffer, cast as an array of DWORDs, for streaming purposes.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
void PushBack(T p_obj)
[AI] Pushes a copy of the provided object to the back of the list.
MxBool PopFront(T &p_obj)
[AI] Removes and returns the first element of the list.
#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.
T Max(T p_t1, T p_t2)
[AI] Returns the maximum of two values.
@ e_lowerCase2
[AI] Alternative or legacy lower case mode, functionally equivalent to e_lowerCase.
#define AUTOLOCK(CS)
[AI] Macro for automatic locking using the MxAutoLock class. This macro instantiates an MxAutoLock ob...
#define MxTrace(args)
[AI] Macro for trace logging (non-variadic version, MSVC compatibility), expands to nothing.
#define DS_CHUNK_BIT3
[AI] Unknown bit flag, marked as BIT3 in decompilation.
MxTimer * Timer()
[AI] Returns the global simulation timer.
void MakeSourceName(char *, const char *)
Parses an SI source filename and normalizes it for use in the engine.
[AI] STL compatibility layer header to provide consistent STL (Standard Template Library) types and a...