10#define DS_CHUNK_BIT1 0x01
14#define DS_CHUNK_END_OF_STREAM 0x02
18#define DS_CHUNK_BIT3 0x04
22#define DS_CHUNK_SPLIT 0x10
26#define DS_CHUNK_BIT16 0x8000
[AI] Base virtual class for all Mindscape engine (Mx) objects.
virtual MxBool IsA(const char *p_name) const
[AI] Checks whether this object's class type or parents match the given name.
[AI] Represents a chunk of data extracted from a stream (typically from a Mindscape/Mx SI file or str...
static MxU32 GetHeaderSize()
[AI] Returns the fixed size of the chunk header, typically used for parsing binary streams.
static MxU32 Size(MxU8 *p_buffer)
[AI] Returns the total size (header + data) of a chunk from a raw buffer pointer.
const char * ClassName() const override
[AI] Returns the class name ("MxDSChunk") for runtime type identification. [AI]
MxBool IsA(const char *p_name) const override
[AI] Checks if this object or any parent class matches the provided class name string.
undefined4 GetObjectId()
[AI] Returns the object id of this chunk. [AI]
MxU32 GetLength()
[AI] Returns the length in bytes of the data payload. [AI]
void Release()
[AI] Releases (deletes) data payload if present, regardless of flags; call to explicitly free memory ...
MxLong m_time
[AI] Timestamp (tick/frame) value for the chunk. Used for ordering, sequencing, and synchronization....
MxU32 m_objectId
[AI] Logical id field linking chunk to a resource, action, or entity. [AI]
MxLong GetTime()
[AI] Returns the time (timestamp or tick) associated with this chunk. [AI]
void SetData(MxU8 *p_data)
[AI] Sets the pointer to the raw payload data (may or may not be owned by chunk object).
MxU8 * GetData()
[AI] Returns a pointer to the start of the data payload. [AI]
static MxU8 * End(MxU8 *p_buffer)
[AI] Returns a pointer to the end of this chunk for sequential iteration through a chunked buffer.
~MxDSChunk() override
[AI] Virtual destructor. Cleans up any owned chunk data if flagged by DS_CHUNK_BIT1....
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,...
MxU16 m_flags
[AI] Flag bitfield indicating properties/status of the chunk. See DS_CHUNK_* defines....
MxU16 GetChunkFlags()
[AI] Returns the chunk's flag bitfield. [AI]
MxU32 m_length
[AI] Number of bytes of data in this chunk's payload. [AI]
MxDSChunk()
[AI] Constructs a new, empty chunk. All members initialized to safe defaults. [AI]
void SetLength(MxU32 p_length)
[AI] Sets the payload data length for this chunk.
MxU8 * m_data
[AI] Pointer to chunk's raw data buffer. Ownership is determined by DS_CHUNK_BIT1 flag and usage cont...
void SetTime(MxLong p_time)
[AI] Sets the time (timestamp/tick/frame) associated with this chunk.