17 m_pBufferOfFileSize =
NULL;
19 m_bufferForDWords =
NULL;
109 MxU8* data = p_buffer;
112#define IntoType(p) ((MxU32*) (p))
114 while (data < p_buffer + p_size) {
124 while (data < p_buffer + p_size) {
const char * GetInternal() const
[AI] Returns a pointer to the internal string, or nullptr if not set.
static MxResult Append(MxU8 *p_buffer1, MxU8 *p_buffer2)
[AI] Appends one chunk/data stream buffer to another, adjusting sizes/headers.
static MxU32 Size(MxU8 *p_buffer)
[AI] Returns the total size (header + data) of a chunk from a raw buffer pointer.
static MxU8 * End(MxU8 *p_buffer)
[AI] Returns a pointer to the end of this chunk for sequential iteration through a chunked buffer.
[AI] Represents a source file handler for SI (Streamer Interface) files, providing buffered access fo...
void SetFileName(const char *p_filename)
[AI] Sets the SI file's name.
MxResult Read(unsigned char *, MxULong) override
[AI] Reads up to the specified number of bytes from the file into a buffer.
MxS32 CalcFileSize()
[AI] Calculates and returns the file size by querying the system (Windows GetFileSize).
MxResult Open(MxULong) override
[AI] Opens the SI file for reading or writing with the specified style flags.
MxULong GetBufferSize() override
[AI] Returns the SI chunk's buffer size, as obtained from the SI file header.
[AI] Base class for any object deserialized from an SI (script/data) file in the LEGO Island engine.
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
virtual MxU32 * GetBuffer()
[AI] Returns a pointer to the internal buffer as a DWORD (32-bit) pointer.
virtual MxLong GetLengthInDWords()
[AI] Gets the length of the data in DWORDs (32-bit units).
static const char * GetCD()
[AI] Retrieves the configured CD-ROM media path string used for resource location.
static const char * GetHD()
[AI] Retrieves the configured hard disk media path string used for resource location.
[AI] Provides RAM-backed stream data access.
MxU32 m_fileSize
[AI] Size in bytes of the loaded resource file.
MxU32 m_lengthInDWords
[AI] Number of DWORD (4 byte) entries in buffer.
MxS32 GetStreamBuffersNum() override
[AI] Returns number of stream buffers contained (always 1 for RAM provider).
MxU32 * GetBufferForDWords() override
[AI] Returns pointer to the buffer as array of 32bit values (DWORDs), for data accessing aligned to 4...
MxU8 * m_pBufferOfFileSize
[AI] Pointer to full byte buffer with loaded SI file contents.
MxU32 * m_bufferForDWords
[AI] Pointer to DWORD buffer for 4-byte-aligned access to SI chunk data.
MxU32 GetFileSize() override
[AI] Returns the loaded file's full byte size.
MxU32 GetLengthInDWords() override
[AI] Returns length (number) of 32-bit words in buffer (DWORD units).
MxU32 m_bufferSize
[AI] Actual size in bytes of the buffer allocated for file (may match or exceed file size).
~MxRAMStreamProvider() override
[AI] Destroys the MxRAMStreamProvider, releasing all memory buffers.
MxResult SetResourceToGet(MxStreamController *p_resource) override
[AI] Loads the requested resource (SI file) fully into memory, prepares internal buffers for fast acc...
static MxLong * IntoTime(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the time field pointer, facilitating direct parsing.
static MxU32 * IntoObjectId(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the objectId field pointer, facilitating direct parsi...
static MxU16 * IntoFlags(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the flags field pointer, facilitating direct parsing.
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
MxAtomId & GetAtom()
[AI] Retrieves the atom ID (unique logical identifier) for this stream controller.
[AI] Abstract base class for stream resource providers in the LEGO Island engine.
MxDSFile * m_pFile
[AI] Pointer to the loaded SI file associated with this provider. [AI]
MxStreamController * m_pLookup
[AI] The stream controller using this provider as its data source. [AI]
Mindscape custom string class for managing dynamic C-strings within the game engine.
char * GetData() const
Returns a pointer to the internal character buffer.
#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.
#define DS_CHUNK_END_OF_STREAM
[AI] Flag bit indicating this chunk is the last in its stream.
#define DS_CHUNK_SPLIT
[AI] Flag indicating this chunk is split (i.e., fragmented and needs reassembling).
MxDSObject * DeserializeDSObjectDispatch(MxU8 *&, MxS16)
[AI] Reads and deserializes a DS object of the specific type from an SI buffer.
MxU32 ReadData(MxU8 *p_buffer, MxU32 p_size)
[AI] Rearranges split and unordered chunks within a memory buffer for SI resource files,...
#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).