25 m_startTime = INT_MIN;
28 m_location.Fill(FLT_MAX);
29 m_direction.Fill(FLT_MAX);
120 size +=
sizeof(double) * 3;
121 size +=
sizeof(double) * 3;
122 size +=
sizeof(double) * 3;
135 if (
this == &p_dsAction) {
200 if (p_dsAction.
GetUp()[0] != FLT_MAX) {
203 if (p_dsAction.
GetUp()[1] != FLT_MAX) {
206 if (p_dsAction.
GetUp()[2] != FLT_MAX) {
212 p_dsAction.
GetExtra(extraLength, extraData);
214 if (extraLength && extraData) {
268 m_location[0] = *(
double*) p_source; p_source +=
sizeof(double);
269 m_location[1] = *(
double*) p_source; p_source +=
sizeof(double);
270 m_location[2] = *(
double*) p_source; p_source +=
sizeof(double);
271 m_direction[0] = *(
double*) p_source; p_source +=
sizeof(double);
272 m_direction[1] = *(
double*) p_source; p_source +=
sizeof(double);
273 m_direction[2] = *(
double*) p_source; p_source +=
sizeof(double);
274 m_up[0] = *(
double*) p_source; p_source +=
sizeof(double);
275 m_up[1] = *(
double*) p_source; p_source +=
sizeof(double);
276 m_up[2] = *(
double*) p_source; p_source +=
sizeof(double);
278 MxU16 extraLength = *(
MxU16*) p_source; p_source +=
sizeof(extraLength);
283 p_source += extraLength;
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
undefined4 VTable0x14() override
[AI] Unknown virtual placeholder, possibly for additional interfaces.
virtual void SetDuration(MxLong p_duration)
[AI] Sets the duration of this action in ticks or time units.
MxU32 GetSizeOnDisk() override
[AI] Serializes the size on disk of this action (all fields + extra data length)
undefined4 m_unk0x88
[AI] 4 bytes at 0x88; usage not known.
MxDSAction & operator=(MxDSAction &p_dsAction)
[AI] Assignment operator: deep-copy from a different MxDSAction, including base class data and extra ...
MxLong GetStartTime() const
[AI] Gets the nominal start time for the action, as loaded or scheduled.
virtual MxBool HasId(MxU32 p_objectId)
[AI] Checks if this action contains/was created for a specific SI object id.
char * m_extraData
[AI] Opaque extra data for custom or extended behavior.
void CopyFrom(MxDSAction &p_dsAction)
[AI] Copies all properties from another MxDSAction (deep copy, including extra data string)
void GetExtra(MxU16 &p_extraLength, char *&p_extraData)
[AI] Retrieves the extra data and its length for this action.
void Deserialize(MxU8 *&p_source, MxS16 p_unk0x24) override
[AI] Deserializes this action's data from a binary buffer.
Mx3DPointFloat m_up
[AI] "Up" vector for this action.
MxS32 GetLoopCount()
[AI] Returns the loop count for this action.
virtual void SetUnknown90(MxLong p_unk0x90)
[AI] Set unknown value at offset 0x90, used as baseline in GetElapsedTime.
MxDSAction()
[AI] Default constructor.
virtual MxLong GetUnknown90()
[AI] Gets the unknown value at offset 0x90, likely a start timestamp.
MxS32 m_loopCount
[AI] Number of times to repeat the action, or -1 for infinite/not-set.
MxU32 m_flags
[AI] Bitfield for flags (enabled, looping, etc).
Mx3DPointFloat m_location
[AI] Location in 3D world or local space (x, y, z).
const Vector3 & GetLocation()
[AI] Gets the location vector for this action (world or local space).
MxCore * m_origin
[AI] Pointer to an "origin" MxCore object, for spatial/ownership reference.
void AppendExtra(MxU16 p_extraLength, const char *p_extraData)
[AI] Concatenates or stores extra data associated with this action, robust for multi-part actions.
const Vector3 & GetUp()
[AI] Gets the up vector for this action (global or local).
MxU16 m_extraLength
[AI] Length of extra data in bytes.
const Vector3 & GetDirection()
[AI] Gets the direction vector (typically forward vector) for this action.
virtual MxLong GetDuration()
[AI] Gets the duration for which this action is intended to run.
MxLong m_duration
[AI] The duration to run the action, or INT_MIN for undefined.
virtual MxLong GetElapsedTime()
[AI] Gets elapsed time for this action since the last time field 0x90 was set.
MxCore * m_unk0x84
[AI] Pointer to an auxiliary MxCore object, purpose unknown.
MxLong m_startTime
[AI] Time at which the action is meant to start, or INT_MIN for unset.
virtual MxDSAction * Clone()
[AI] Clones (deep-copies) this action and returns a new pointer.
virtual void MergeFrom(MxDSAction &p_dsAction)
[AI] Copies/merges properties from another action.
@ c_enabled
[AI] Action is currently enabled [AI]
MxU32 m_sizeOnDisk
[AI] The size of this action's fields on disk, not counting ancestor size.
MxLong m_unk0x90
[AI] Unknown field, appears to store a timestamp for GetElapsedTime logics.
~MxDSAction() override
[AI] Destructor.
Mx3DPointFloat m_direction
[AI] "Forward" direction vector for this action.
[AI] Base class for any object deserialized from an SI (script/data) file in the LEGO Island engine.
MxDSObject & operator=(MxDSObject &p_dsObject)
[AI] Assignment operator.
virtual MxU32 GetSizeOnDisk()
[AI] Calculates serialized size of this object on disk (for buffer allocation).
MxU32 m_objectId
[AI] Numeric id (unique per file or context, often -1). [AI]
virtual void Deserialize(MxU8 *&p_source, MxS16 p_unk0x24)
[AI] Initializes this object from serialized (memory buffer) data.
virtual undefined4 VTable0x14()
[AI] Placeholder for early vtable slot (purpose unknown, may be used for RTTI).
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
MxTimer * Timer()
[AI] Returns the global simulation timer.
#define TWOCC(a, b)
[AI] Macro to compose a 16-bit code from two 8-bit characters (e.g., for type IDs).