Isle
Loading...
Searching...
No Matches
MxDSMediaAction Class Reference

MxDSMediaAction extends MxDSAction to add media-specific playback properties and management. More...

#include <mxdsmediaaction.h>

Inheritance diagram for MxDSMediaAction:
Collaboration diagram for MxDSMediaAction:

Public Member Functions

 MxDSMediaAction ()
 Constructs a new MxDSMediaAction and initializes all members. More...
 
 MxDSMediaAction (MxDSMediaAction &p_dsMediaAction)
 Copy constructor; constructs a new MxDSMediaAction by copying the state of another. More...
 
 ~MxDSMediaAction () override
 Destructor. More...
 
void CopyFrom (MxDSMediaAction &p_dsMediaAction)
 Copy the internal state and properties from another MxDSMediaAction. More...
 
MxDSMediaActionoperator= (MxDSMediaAction &p_dsMediaAction)
 Assignment operator. More...
 
const char * ClassName () const override
 Returns the class name string for this object. More...
 
MxBool IsA (const char *p_name) const override
 Checks for class membership. More...
 
undefined4 VTable0x14 () override
 [AI] Implementation-specific vtable placeholder. More...
 
MxU32 GetSizeOnDisk () override
 Calculates size in bytes required to store this object on disk, including strings and additional fields. More...
 
void Deserialize (MxU8 *&p_source, MxS16 p_unk0x24) override
 Deserializes the object data from a binary buffer, restoring state including media source path and configuration. More...
 
MxDSActionClone () override
 Creates a deep copy (clone) of this action and returns it. More...
 
void CopyMediaSrcPath (const char *p_mediaSrcPath)
 Deep-copies a new string for the media source path; cleans up previous memory as needed. More...
 
const char * GetMediaSrcPath ()
 Provides access to the path string of the media resource used by this action. More...
 
MxS32 GetFramesPerSecond () const
 Gets the frame rate to use for media playback. More...
 
MxS32 GetMediaFormat () const
 Returns the media format code (e.g., FLC, SMK, WAV) for playback and presenter dispatch. More...
 
MxS32 GetPaletteManagement () const
 Gets the palette management mode for playback of this media. More...
 
MxLong GetSustainTime () const
 Returns the sustain time for the media, i.e., time it should remain presented/active. More...
 
- Public Member Functions inherited from MxDSAction
 MxDSAction ()
 [AI] Default constructor. More...
 
 ~MxDSAction () override
 [AI] Destructor. More...
 
 MxDSAction (MxDSAction &p_dsAction)
 [AI] Copy constructor from another MxDSAction More...
 
void CopyFrom (MxDSAction &p_dsAction)
 [AI] Copies all properties from another MxDSAction (deep copy, including extra data string) More...
 
MxDSActionoperator= (MxDSAction &p_dsAction)
 [AI] Assignment operator: deep-copy from a different MxDSAction, including base class data and extra fields. More...
 
const char * ClassName () const override
 [AI] Returns the class name for RTTI or reflection purposes. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Run-time type check, compares provided name with this or any ancestor type. More...
 
undefined4 VTable0x14 () override
 [AI] Unknown virtual placeholder, possibly for additional interfaces. More...
 
MxU32 GetSizeOnDisk () override
 [AI] Serializes the size on disk of this action (all fields + extra data length) More...
 
void Deserialize (MxU8 *&p_source, MxS16 p_unk0x24) override
 [AI] Deserializes this action's data from a binary buffer. More...
 
virtual MxLong GetDuration ()
 [AI] Gets the duration for which this action is intended to run. More...
 
virtual void SetDuration (MxLong p_duration)
 [AI] Sets the duration of this action in ticks or time units. More...
 
virtual MxDSActionClone ()
 [AI] Clones (deep-copies) this action and returns a new pointer. More...
 
virtual void MergeFrom (MxDSAction &p_dsAction)
 [AI] Copies/merges properties from another action. More...
 
virtual MxBool HasId (MxU32 p_objectId)
 [AI] Checks if this action contains/was created for a specific SI object id. More...
 
virtual void SetUnknown90 (MxLong p_unk0x90)
 [AI] Set unknown value at offset 0x90, used as baseline in GetElapsedTime. More...
 
virtual MxLong GetUnknown90 ()
 [AI] Gets the unknown value at offset 0x90, likely a start timestamp. More...
 
virtual MxLong GetElapsedTime ()
 [AI] Gets elapsed time for this action since the last time field 0x90 was set. More...
 
void AppendExtra (MxU16 p_extraLength, const char *p_extraData)
 [AI] Concatenates or stores extra data associated with this action, robust for multi-part actions. More...
 
void GetExtra (MxU16 &p_extraLength, char *&p_extraData)
 [AI] Retrieves the extra data and its length for this action. More...
 
MxU32 GetFlags ()
 [AI] Returns the flag field for this action (bitmask). More...
 
void SetFlags (MxU32 p_flags)
 [AI] Sets the flag bitmask controlling action logic (enabled, looping, etc). More...
 
char * GetExtraData ()
 [AI] Accessor for extra data (not null-terminated). More...
 
MxU16 GetExtraLength () const
 [AI] Returns the length (in bytes) of extra data. More...
 
MxLong GetStartTime () const
 [AI] Gets the nominal start time for the action, as loaded or scheduled. More...
 
MxS32 GetLoopCount ()
 [AI] Returns the loop count for this action. More...
 
void SetLoopCount (MxS32 p_loopCount)
 [AI] Sets the loop count for this action. More...
 
const Vector3GetLocation ()
 [AI] Gets the location vector for this action (world or local space). More...
 
const Vector3GetDirection ()
 [AI] Gets the direction vector (typically forward vector) for this action. More...
 
const Vector3GetUp ()
 [AI] Gets the up vector for this action (global or local). More...
 
void SetLocation (const Vector3 &p_location)
 [AI] Sets the location vector for this action. More...
 
void SetDirection (const Vector3 &p_direction)
 [AI] Sets the direction vector for this action. More...
 
void SetUp (const Vector3 &p_up)
 [AI] Sets the up vector for this action. More...
 
MxCoreGetUnknown84 ()
 [AI] Returns a pointer to an associated or auxiliary core object. More...
 
void SetUnknown84 (MxCore *p_unk0x84)
 [AI] Sets the auxiliary core pointer for this action. More...
 
MxCoreGetOrigin ()
 [AI] Returns a pointer to the "origin" core object, which may be used to localize the action. More...
 
void SetOrigin (MxCore *p_origin)
 [AI] Sets the origin core pointer for this action, if spatially transforming/localizing this action. More...
 
MxBool IsLooping () const
 [AI] Whether this action is set to loop based on current flags. More...
 
MxBool IsBit3 () const
 [AI] Tests for the state of the (unknown purpose) bit 3 flag in m_flags. More...
 
- Public Member Functions inherited from MxDSObject
 MxDSObject ()
 [AI] Default constructor. Initializes to e_object and clears names and pointers. More...
 
 ~MxDSObject () override
 [AI] Destructor. Frees allocated objectName/sourceName memory. More...
 
void CopyFrom (MxDSObject &p_dsObject)
 [AI] Copy data from another MxDSObject, performing deep string copy for names. More...
 
 MxDSObject (MxDSObject &p_dsObject)
 [AI] Copy constructor. More...
 
MxDSObjectoperator= (MxDSObject &p_dsObject)
 [AI] Assignment operator. More...
 
void SetObjectName (const char *p_objectName)
 [AI] Sets object (internal) unique name; deep copies the string. More...
 
void SetSourceName (const char *p_sourceName)
 [AI] Sets the source name (usually source SI file); deep copies the string. More...
 
const char * ClassName () const override
 [AI] Returns the class identifier string for run-time type ID. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Runtime type check; supports derived/parent class lookup by name. More...
 
virtual undefined4 VTable0x14 ()
 [AI] Placeholder for early vtable slot (purpose unknown, may be used for RTTI). More...
 
virtual MxU32 GetSizeOnDisk ()
 [AI] Calculates serialized size of this object on disk (for buffer allocation). More...
 
virtual void Deserialize (MxU8 *&p_source, MxS16 p_unk0x24)
 [AI] Initializes this object from serialized (memory buffer) data. More...
 
virtual void SetAtomId (MxAtomId p_atomId)
 [AI] Sets the atom id for this object instance, used for indexing or lookup. More...
 
Type GetType () const
 [AI] Returns the object's type enum as stored in m_type. More...
 
const char * GetSourceName () const
 [AI] Returns the source name string (typically the originating SI file). More...
 
const char * GetObjectName () const
 [AI] Returns the object name string. More...
 
MxU32 GetObjectId ()
 [AI] Returns the object id numeric value. More...
 
const MxAtomIdGetAtomId ()
 [AI] Returns a const-reference to the object's atom identifier. More...
 
MxS16 GetUnknown24 ()
 [AI] Returns the unknown 0x24 value (may be data version or usage state). [AI] More...
 
MxPresenterGetUnknown28 ()
 [AI] Returns the pointer stored at 0x28, likely a presenter or handler for this DS object. More...
 
void SetType (Type p_type)
 [AI] Sets the DS object type. More...
 
void SetObjectId (MxU32 p_objectId)
 [AI] Sets the object id (for serialization or lookup). More...
 
void SetUnknown24 (MxS16 p_unk0x24)
 [AI] Sets the unknown field at 0x24 (possibly version/state). More...
 
void SetUnknown28 (MxPresenter *p_unk0x28)
 [AI] Sets the pointer at 0x28 (presenter or handler). More...
 
void ClearAtom ()
 [AI] Clears the atom id, releasing its association. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Additional Inherited Members

- Public Types inherited from MxDSAction
enum  {
  c_looping = 0x01 , c_bit3 = 0x04 , c_bit4 = 0x08 , c_bit5 = 0x10 ,
  c_enabled = 0x20 , c_bit7 = 0x40 , c_world = 0x80 , c_bit9 = 0x100 ,
  c_bit10 = 0x200 , c_bit11 = 0x400
}
 [AI] Action bitmask flag options controlling flow (loop, enable, world-space, etc) More...
 
- Public Types inherited from MxDSObject
enum  Type {
  e_object = 0 , e_action , e_mediaAction , e_anim ,
  e_sound , e_multiAction , e_serialAction , e_parallelAction ,
  e_event , e_selectAction , e_still , e_objectAction
}
 [AI] Enumerated type value for each kind of DS object. More...
 
- Protected Attributes inherited from MxDSAction
MxU32 m_sizeOnDisk
 [AI] The size of this action's fields on disk, not counting ancestor size. More...
 
MxU32 m_flags
 [AI] Bitfield for flags (enabled, looping, etc). More...
 
MxLong m_startTime
 [AI] Time at which the action is meant to start, or INT_MIN for unset. More...
 
MxLong m_duration
 [AI] The duration to run the action, or INT_MIN for undefined. More...
 
MxS32 m_loopCount
 [AI] Number of times to repeat the action, or -1 for infinite/not-set. More...
 
Mx3DPointFloat m_location
 [AI] Location in 3D world or local space (x, y, z). More...
 
Mx3DPointFloat m_direction
 [AI] "Forward" direction vector for this action. More...
 
Mx3DPointFloat m_up
 [AI] "Up" vector for this action. More...
 
char * m_extraData
 [AI] Opaque extra data for custom or extended behavior. More...
 
MxU16 m_extraLength
 [AI] Length of extra data in bytes. More...
 
MxCorem_unk0x84
 [AI] Pointer to an auxiliary MxCore object, purpose unknown. More...
 
undefined4 m_unk0x88
 [AI] 4 bytes at 0x88; usage not known. More...
 
MxCorem_origin
 [AI] Pointer to an "origin" MxCore object, for spatial/ownership reference. More...
 
MxLong m_unk0x90
 [AI] Unknown field, appears to store a timestamp for GetElapsedTime logics. More...
 
- Protected Attributes inherited from MxDSObject
MxU32 m_sizeOnDisk
 [AI] Cached/calculated disk size of object data for serialization. [AI] More...
 
MxU16 m_type
 [AI] Object type enum (see Type) as read from data or set in code. [AI] More...
 
char * m_sourceName
 [AI] Heap copy: SI file or source identifier string. [AI] More...
 
undefined4 m_unk0x14
 [AI] Unknown usage, possibly flags or reserved SI-format field. [AI] More...
 
char * m_objectName
 [AI] Heap copy: Logical object name as referenced in script/data. [AI] More...
 
MxU32 m_objectId
 [AI] Numeric id (unique per file or context, often -1). [AI] More...
 
MxAtomId m_atomId
 [AI] String/value pair for engine lookup/reference. [AI] More...
 
MxS16 m_unk0x24
 [AI] Unknown usage, possibly used for context or flags during loading. [AI] More...
 
MxPresenterm_unk0x28
 [AI] Presenter or handler associated to this object (may be null). [AI] More...
 

Detailed Description

MxDSMediaAction extends MxDSAction to add media-specific playback properties and management.

[AI]

This class is used as a base for DS objects that represent a media action in the LEGO Island engine, providing parameters such as media source path, frame rate, format, palette options, and sustain time. [AI]

Definition at line 18 of file mxdsmediaaction.h.

Constructor & Destructor Documentation

◆ MxDSMediaAction() [1/2]

MxDSMediaAction::MxDSMediaAction ( )

Constructs a new MxDSMediaAction and initializes all members.

[AI]

Definition at line 10 of file mxdsmediaaction.cpp.

◆ MxDSMediaAction() [2/2]

MxDSMediaAction::MxDSMediaAction ( MxDSMediaAction p_dsMediaAction)

Copy constructor; constructs a new MxDSMediaAction by copying the state of another.

[AI]

Parameters
p_dsMediaActionReference to the MxDSMediaAction to copy from. [AI]

Definition at line 44 of file mxdsmediaaction.cpp.

◆ ~MxDSMediaAction()

MxDSMediaAction::~MxDSMediaAction ( )
override

Destructor.

Cleans up allocated media source path memory. [AI]

Definition at line 25 of file mxdsmediaaction.cpp.

Member Function Documentation

◆ ClassName()

const char * MxDSMediaAction::ClassName ( ) const
inlineoverridevirtual

Returns the class name string for this object.

[AI]

Returns
"MxDSMediaAction" as the class name. [AI]

Reimplemented from MxDSAction.

Reimplemented in MxDSObjectAction, MxDSSound, and MxDSStill.

Definition at line 53 of file mxdsmediaaction.h.

◆ Clone()

MxDSAction * MxDSMediaAction::Clone ( )
overridevirtual

Creates a deep copy (clone) of this action and returns it.

[AI]

Returns
Pointer to a new MxDSAction clone. [AI]

Reimplemented from MxDSAction.

Reimplemented in MxDSObjectAction, MxDSSound, and MxDSStill.

Definition at line 64 of file mxdsmediaaction.cpp.

◆ CopyFrom()

void MxDSMediaAction::CopyFrom ( MxDSMediaAction p_dsMediaAction)

Copy the internal state and properties from another MxDSMediaAction.

[AI]

Parameters
p_dsMediaActionThe source object to copy from. [AI]

Definition at line 32 of file mxdsmediaaction.cpp.

◆ CopyMediaSrcPath()

void MxDSMediaAction::CopyMediaSrcPath ( const char *  p_mediaSrcPath)

Deep-copies a new string for the media source path; cleans up previous memory as needed.

[AI]

Parameters
p_mediaSrcPathSource path string for the media. [AI]

Definition at line 77 of file mxdsmediaaction.cpp.

◆ Deserialize()

void MxDSMediaAction::Deserialize ( MxU8 *&  p_source,
MxS16  p_unk0x24 
)
overridevirtual

Deserializes the object data from a binary buffer, restoring state including media source path and configuration.

[AI]

Parameters
p_sourcePointer reference to the current read position in the buffer. [AI]
p_unk0x24Deserialization flags, see MxDSAction. [AI]

Reimplemented from MxDSAction.

Reimplemented in MxDSSound.

Definition at line 132 of file mxdsmediaaction.cpp.

◆ GetFramesPerSecond()

MxS32 MxDSMediaAction::GetFramesPerSecond ( ) const
inline

Gets the frame rate to use for media playback.

[AI]

Returns
Frames per second as integer. [AI]

Definition at line 113 of file mxdsmediaaction.h.

◆ GetMediaFormat()

MxS32 MxDSMediaAction::GetMediaFormat ( ) const
inline

Returns the media format code (e.g., FLC, SMK, WAV) for playback and presenter dispatch.

[AI]

Returns
Media format as integer code. [AI]

Definition at line 119 of file mxdsmediaaction.h.

◆ GetMediaSrcPath()

const char * MxDSMediaAction::GetMediaSrcPath ( )
inline

Provides access to the path string of the media resource used by this action.

[AI]

Returns
The media source path as a const char pointer. [AI]

Definition at line 107 of file mxdsmediaaction.h.

◆ GetPaletteManagement()

MxS32 MxDSMediaAction::GetPaletteManagement ( ) const
inline

Gets the palette management mode for playback of this media.

[AI]

Returns
Palette management value. [AI]

Definition at line 125 of file mxdsmediaaction.h.

◆ GetSizeOnDisk()

MxU32 MxDSMediaAction::GetSizeOnDisk ( )
overridevirtual

Calculates size in bytes required to store this object on disk, including strings and additional fields.

[AI]

Returns
Total size in bytes needed for serialization. [AI]

Reimplemented from MxDSAction.

Reimplemented in MxDSSound.

Definition at line 108 of file mxdsmediaaction.cpp.

◆ GetSustainTime()

MxLong MxDSMediaAction::GetSustainTime ( ) const
inline

Returns the sustain time for the media, i.e., time it should remain presented/active.

[AI]

Returns
Time in system-dependent units. [AI]

Definition at line 131 of file mxdsmediaaction.h.

◆ IsA()

MxBool MxDSMediaAction::IsA ( const char *  p_name) const
inlineoverridevirtual

Checks for class membership.

Compares with this and parent class names. [AI]

Parameters
p_nameClass name string to query. [AI]
Returns
True if p_name matches this class or any parent class in hierarchy. [AI]

Reimplemented from MxDSAction.

Reimplemented in MxDSObjectAction, MxDSSound, and MxDSStill.

Definition at line 64 of file mxdsmediaaction.h.

◆ operator=()

MxDSMediaAction & MxDSMediaAction::operator= ( MxDSMediaAction p_dsMediaAction)

Assignment operator.

Copies the state from another MxDSMediaAction, including deep copies where required. [AI]

Parameters
p_dsMediaActionSource of the data to assign. [AI]
Returns
Reference to this object. [AI]

Definition at line 51 of file mxdsmediaaction.cpp.

◆ VTable0x14()

undefined4 MxDSMediaAction::VTable0x14 ( )
overridevirtual

[AI] Implementation-specific vtable placeholder.

Inherited from MxDSAction. Purpose unknown. [AI_SUGGESTED_NAME: ReservedVTable0x14]

Reimplemented from MxDSAction.

Definition at line 101 of file mxdsmediaaction.cpp.


The documentation for this class was generated from the following files: