90 memcpy(extraCopy, extraData, extraLength);
91 extraCopy[extraLength] =
'\0';
100 MxS32 val = token ? atoi(token) : 0;
192 if (!name || strlen(name) == 0) {
195 format = ((
MxDSAnim&) p_action).GetMediaFormat();
197 case FOURCC(
' ',
'F',
'L',
'C'):
201 case FOURCC(
' ',
'S',
'M',
'K'):
209 format = ((
MxDSSound&) p_action).GetMediaFormat();
211 case FOURCC(
' ',
'M',
'I',
'D'):
215 case FOURCC(
' ',
'W',
'A',
'V'):
246 char objectName[512];
247 strcpy(objectName, p_defaultName);
255 memcpy(extraCopy, extraData, extraLength);
256 extraCopy[extraLength] =
'\0';
static const char * HandlerClassName()
[AI] Returns the handler class name ("MxCompositePresenter").
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
MxU32 GetFlags()
[AI] Returns the flag field for this action (bitmask).
MxBool IsLooping() const
[AI] Whether this action is set to loop based on current flags.
void GetExtra(MxU16 &p_extraLength, char *&p_extraData)
[AI] Retrieves the extra data and its length for this action.
void SetOrigin(MxCore *p_origin)
[AI] Sets the origin core pointer for this action, if spatially transforming/localizing this action.
const Vector3 & GetLocation()
[AI] Gets the location vector for this action (world or local space).
void SetFlags(MxU32 p_flags)
[AI] Sets the flag bitmask controlling action logic (enabled, looping, etc).
@ c_world
[AI] Action is described in world-space coordinates [AI]
@ c_enabled
[AI] Action is currently enabled [AI]
Derived class representing an animation action extracted from SI files.
@ e_serialAction
[AI] Series of actions to play in order. [AI]
@ e_still
[AI] Still image resource. [AI]
@ e_parallelAction
[AI] Parallel (simultaneous) action list. [AI]
@ e_sound
[AI] Sound resource reference or cue. [AI]
@ e_selectAction
[AI] Selects an action from several (with rules/random). [AI]
@ e_anim
[AI] Animation sequence or reference. [AI]
@ e_event
[AI] Scripted event type. [AI]
Type GetType() const
[AI] Returns the object's type enum as stored in m_type.
const char * GetSourceName() const
[AI] Returns the source name string (typically the originating SI file).
[AI] Represents a sound action extracted from an SI script and used in the data-driven action system.
[AI] Notification parameter marking the end of an action, specialization of MxActionNotificationParam...
MxEntity is a base class for game entities which are uniquely identified by an integer ID and an Atom...
static const char * HandlerClassName()
[AI] Returns the static class identifier for this presenter ("MxEventPresenter").
static const char * HandlerClassName()
[AI] Provides the class handler string for presenter registration/dispatch.
static const char * HandlerClassName()
[AI] Gets the handler class name string for dynamic presenter dispatch.
static const char * HandlerClassName()
[AI] Returns the concrete handler class name string for dynamic type identification and lookup,...
static const char * HandlerClassName()
[AI] Returns the handler class name used in presenter dispatching: "MxLoopingSmkPresenter".
static const char * HandlerClassName()
Returns the handler class name for this presenter.
MxResult Send(MxCore *p_listener, const MxNotificationParam &p_param)
[AI] Queues a notification to be sent to a specific registered listener.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
virtual MxCore * Create(const char *p_name)
[AI] Creates a new instance of the class matching the provided string name.
[AI] Central subsystem coordinator and singleton of the LEGO Island engine.
static MxOmni * GetInstance()
[AI] Returns the singleton instance of the MxOmni subsystem coordinator.
virtual MxEntity * AddToWorld(const char *, MxS32, MxPresenter *)
[AI] [VIRTUAL BASE] Placeholder virtual for derived engines to instantiate an entity and add to the 3...
virtual void NotifyCurrentEntity(const MxNotificationParam &p_param)
[AI] [VIRTUAL BASE] Placeholder for derived implementations—sends a notification to the currently act...
[AI] 2D point with 32-bit signed integer coordinates.
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
virtual void ParseExtra()
[AI] Parses additional data from the associated action for configuration or world interaction.
MxS32 m_displayZ
[AI] Z-order value for display stacking.
virtual void EndAction()
[AI] Terminates the current action, notifies listeners and resets state.
void ProgressTickleState(TickleState p_tickleState)
[AI] Helper for advancing the presenter's tickle state and updating transition history.
virtual void RepeatingTickle()
[AI] Handles updates when in a repeating (looping) stage. Advances to freezing state.
virtual void Enable(MxBool p_enable)
[AI] Enables or disables this presenter (controls action flags accordingly).
MxBool IsEnabled()
[AI] Returns whether this presenter is logically enabled (based on the associated action's flags).
virtual MxResult StartAction(MxStreamController *, MxDSAction *)
[AI] Initiates presenter for a new action, setting up context and state.
MxU32 m_previousTickleStates
[AI] Bitfield representing all tickle states that have already occurred during this lifetime.
MxDSAction * m_action
[AI] The associated action currently being presented by this presenter.
TickleState m_currentTickleState
[AI] Current state in the tickle lifecycle.
virtual void StartingTickle()
[AI] Handles actions required when first starting presentation. Advances to streaming state.
void Init()
[AI] Initializes object state to post-construction defaults.
virtual void FreezingTickle()
[AI] Handles updates during the freezing/suspended state. Advances to done state.
MxResult Tickle() override
[AI] Main tickle handler, called periodically to progress presenter's internal state.
MxEntity * CreateEntity(const char *p_defaultName)
[AI] Creates an entity based on action 'extra' data, or uses the provided default name.
@ e_repeating
[AI] Presentation is repeating (e.g., looping media).
@ e_done
[AI] Completed processing the current action.
@ e_idle
[AI] Not processing an action.
@ e_ready
[AI] Prepared to start processing an action.
@ e_freezing
[AI] Temporarily suspending updates or playback.
@ 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.
virtual void StreamingTickle()
[AI] Handles periodic updates during the streaming/presentation stage. Advances to repeating state.
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.
MxPoint32 m_location
[AI] 2D display location for the presenter.
virtual void ReadyTickle()
[AI] Handles the transition and setup for the Ready state. Parses extra action data and advances stat...
virtual void DoneTickle()
[AI] Handles any post-completion logic, resetting to idle state.
static const char * HandlerClassName()
[AI] Returns the human-readable handler class name for this presenter type.
static const char * HandlerClassName()
[AI] Returns the handler class name string for this Presenter type ("MxStillPresenter").
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
static const char * HandlerClassName()
[AI] Returns the name identifying this presenter class.
#define DECOMP_SIZE_ASSERT(T, S)
const char * g_parseExtraTokens
[AI] Delimiter tokens for parsing extra parameters in scripts or command strings.
const char * g_strOBJECT
[AI] Used when referencing or distinguishing object instances in script actions or variable assignmen...
const char * g_strWORLD
[AI] Symbolic name used to reference a "WORLD" entity or property in scripts and object definitions.
#define NULL
[AI] Null pointer value (C/C++ semantics).
#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...
MxObjectFactory * ObjectFactory()
[AI] Returns the factory for creating core engine objects from atom/type ids.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
@ c_notificationPresenter
[AI] Update or event from a Presenter [AI]
@ c_notificationEndAction
[AI] Indicates the end of an action [AI]
const char * PresenterNameDispatch(const MxDSAction &p_action)
[AI] Provides a mapping from action object/type to the correct presenter handler class name based on ...
#define FOURCC(a, b, c, d)
[AI] Macro to compose a 32-bit code from four 8-bit characters (e.g., for resource and chunk IDs).
MxBool KeyValueStringParse(char *, const char *, const char *)
Searches p_string for a key command and copies its associated value to p_output.