Isle
Loading...
Searching...
No Matches
MxSmk Struct Reference

[AI] The MxSmk struct encapsulates all data required to decode and display a Smacker (SMK) video stream. More...

#include <mxsmk.h>

Collaboration diagram for MxSmk:

Static Public Member Functions

static MxResult LoadHeader (MxU8 *p_data, MxSmk *p_mxSmk)
 [AI] Loads the SMK header and initializes decoding structures for a Smacker video. More...
 
static void Destroy (MxSmk *p_mxSmk)
 [AI] Cleans up and deallocates all resources associated with this MxSmk. More...
 
static MxResult LoadFrame (MxBITMAPINFO *p_bitmapInfo, MxU8 *p_bitmapData, MxSmk *p_mxSmk, MxU8 *p_chunkData, MxBool p_paletteChanged, MxRect32List *p_list)
 [AI] Decompresses and loads a single Smacker frame into a bitmap buffer, updating palette if needed. More...
 
static MxBool GetRect (MxU8 *p_unk0x6b4, MxU16 *p_und, u32 *p_smackRect, MxRect32 *p_rect)
 [AI] Retrieves and merges rectangles describing updated regions of the current frame. More...
 

Public Attributes

SmackTag m_smackTag
 [AI] Metadata block from the Smacker file header. More...
 
undefined m_unk0x390 [784]
 [AI] Reserved/unused; aligns struct to file format ([AI_SUGGESTED_NAME: paddingOrWorkingBuffer]) More...
 
MxU32m_frameSizes
 [AI] Array of frame sizes (in bytes), one entry per video frame (plus ring frame if present). More...
 
MxU8m_frameTypes
 [AI] Array of frame types, one entry per frame. More...
 
MxU8m_huffmanTrees
 [AI] Huffman trees used for decompressing video frames. More...
 
MxU8m_huffmanTables
 [AI] Generated decoding tables for use in SmackDoFrameToBuffer. More...
 
MxU32 m_maxFrameSize
 [AI] Maximum size of any frame, used for allocation. More...
 
MxU8m_unk0x6b4
 [AI] Buffer/context for decoding frame delta data; referenced throughout decompression ([AI_SUGGESTED_NAME: frameDecompressionContext]). More...
 

Detailed Description

[AI] The MxSmk struct encapsulates all data required to decode and display a Smacker (SMK) video stream.

[AI] This struct holds both metadata, decompression tables and buffer pointers for one video stream, as well as working memory for decompression of frames during playback. Used exclusively as part of video playback in LEGO Island.

Definition at line 77 of file mxsmk.h.

Member Function Documentation

◆ Destroy()

void MxSmk::Destroy ( MxSmk p_mxSmk)
static

[AI] Cleans up and deallocates all resources associated with this MxSmk.

Parameters
p_mxSmk[AI] The MxSmk instance to destroy.

[AI] Releases all dynamic buffers/tables to avoid memory leaks.

Definition at line 141 of file mxsmk.cpp.

◆ GetRect()

MxBool MxSmk::GetRect ( MxU8 p_unk0x6b4,
MxU16 p_und,
u32 p_smackRect,
MxRect32 p_rect 
)
static

[AI] Retrieves and merges rectangles describing updated regions of the current frame.

Parameters
p_unk0x6b4[AI] Current decoding context for frame.
p_und[AI] Input/output parameter controlling initial/continuation state.
p_smackRect[AI] Input/output buffer for SMK rectangle coordinates.
p_rect[AI] Output: receives merged rectangle for frame update.
Returns
[AI] TRUE if rectangle was found, FALSE if done with regions.

[AI] Called after each frame to help identify dirty regions (for partial redraw/optimizations).

Definition at line 236 of file mxsmk.cpp.

◆ LoadFrame()

MxResult MxSmk::LoadFrame ( MxBITMAPINFO p_bitmapInfo,
MxU8 p_bitmapData,
MxSmk p_mxSmk,
MxU8 p_chunkData,
MxBool  p_paletteChanged,
MxRect32List p_list 
)
static

[AI] Decompresses and loads a single Smacker frame into a bitmap buffer, updating palette if needed.

Parameters
p_bitmapInfo[AI] Pointer to bitmap metadata (color format, dimensions, palette).
p_bitmapData[AI] Pointer to target buffer for decompressed pixel data.
p_mxSmk[AI] Decoding context for current video stream.
p_chunkData[AI] Raw frame and palette chunk source data.
p_paletteChanged[AI] Indicates if the color palette chunk is included/has changed.
p_list[AI] List to be filled with rectangles (dirty regions) updated by this frame.
Returns
[AI] SUCCESS if frame is loaded properly, FAILURE otherwise.

[AI] Performs palette animation, decompresses frame, fills list of screen areas that changed.

Definition at line 162 of file mxsmk.cpp.

◆ LoadHeader()

MxResult MxSmk::LoadHeader ( MxU8 p_data,
MxSmk p_mxSmk 
)
static

[AI] Loads the SMK header and initializes decoding structures for a Smacker video.

Parameters
p_data[AI] Pointer to the raw .SMK header data.
p_mxSmk[AI] The MxSmk struct to initialize.
Returns
[AI] SUCCESS if header is loaded correctly, FAILURE otherwise.

[AI] Fills out metadata, Huffman tables and allocates all required buffers for playback.

Definition at line 12 of file mxsmk.cpp.

Member Data Documentation

◆ m_frameSizes

MxU32* MxSmk::m_frameSizes

[AI] Array of frame sizes (in bytes), one entry per video frame (plus ring frame if present).

Definition at line 80 of file mxsmk.h.

◆ m_frameTypes

MxU8* MxSmk::m_frameTypes

[AI] Array of frame types, one entry per frame.

Definition at line 81 of file mxsmk.h.

◆ m_huffmanTables

MxU8* MxSmk::m_huffmanTables

[AI] Generated decoding tables for use in SmackDoFrameToBuffer.

Definition at line 83 of file mxsmk.h.

◆ m_huffmanTrees

MxU8* MxSmk::m_huffmanTrees

[AI] Huffman trees used for decompressing video frames.

Definition at line 82 of file mxsmk.h.

◆ m_maxFrameSize

MxU32 MxSmk::m_maxFrameSize

[AI] Maximum size of any frame, used for allocation.

Definition at line 84 of file mxsmk.h.

◆ m_smackTag

SmackTag MxSmk::m_smackTag

[AI] Metadata block from the Smacker file header.

Definition at line 78 of file mxsmk.h.

◆ m_unk0x390

undefined MxSmk::m_unk0x390[784]

[AI] Reserved/unused; aligns struct to file format ([AI_SUGGESTED_NAME: paddingOrWorkingBuffer])

Definition at line 79 of file mxsmk.h.

◆ m_unk0x6b4

MxU8* MxSmk::m_unk0x6b4

[AI] Buffer/context for decoding frame delta data; referenced throughout decompression ([AI_SUGGESTED_NAME: frameDecompressionContext]).

Definition at line 85 of file mxsmk.h.


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