Isle
Loading...
Searching...
No Matches
mxsmk.h File Reference
#include "decomp.h"
#include "mxgeometry.h"
#include "mxtypes.h"
#include <smack.h>
Include dependency graph for mxsmk.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Functions

u32 SmackGetSizeTables ()
 [AI] External functions from SMACK.LIB used for decoding Smacker video data. More...
 
void SmackDoTables (u8 *p_huffmanTrees, u8 *p_huffmanTables, u32 p_codeSize, u32 p_abSize, u32 p_detailSize, u32 p_typeSize)
 [AI] Generates Huffman tables required for decoding a Smacker frame. More...
 
void SmackDoFrameToBuffer (u8 *p_source, u8 *p_huffmanTables, u8 *p_unk0x6b4)
 [AI] Decompress a single Smacker video frame into a provided buffer. More...
 
u32 SmackGetSizeDeltas (u32 p_width, u32 p_height)
 [AI] Returns the size required for frame delta data given width and height. More...
 
u8 SmackGetRect (u8 *p_unk0x6b4, u32 *p_rect)
 [AI] Reads a rectangle from the frame update information. More...
 

Function Documentation

◆ SmackDoFrameToBuffer()

void SmackDoFrameToBuffer ( u8 p_source,
u8 p_huffmanTables,
u8 p_unk0x6b4 
)

[AI] Decompress a single Smacker video frame into a provided buffer.

Parameters
p_source[AI] Source chunk/frame data to decode.
p_huffmanTables[AI] Prepared Huffman tables for decompression.
p_unk0x6b4[AI] Buffer/context for decompression (decoded frame output or working state).

[AI] Called for each frame displayed; decompresses frame from compressed data into output bitmap.

◆ SmackDoTables()

void SmackDoTables ( u8 p_huffmanTrees,
u8 p_huffmanTables,
u32  p_codeSize,
u32  p_abSize,
u32  p_detailSize,
u32  p_typeSize 
)

[AI] Generates Huffman tables required for decoding a Smacker frame.

Parameters
p_huffmanTrees[AI] Pointer to the Huffman trees (input).
p_huffmanTables[AI] Buffer to receive generated Huffman tables (output).
p_codeSize[AI] Size of the code table.
p_abSize[AI] Size of the AB table.
p_detailSize[AI] Size of the detail table.
p_typeSize[AI] Size of the type table.

[AI] This function prepares the internal coding tables based on Huffman tree input, enabling Smacker frame decompression.

◆ SmackGetRect()

u8 SmackGetRect ( u8 p_unk0x6b4,
u32 p_rect 
)

[AI] Reads a rectangle from the frame update information.

Parameters
p_unk0x6b4[AI] Frame decoder state/context.
p_rect[AI] Output array for rectangle dimensions (left,top,width,height).
Returns
[AI] Returns the rectangle descriptor (usually success state).

◆ SmackGetSizeDeltas()

u32 SmackGetSizeDeltas ( u32  p_width,
u32  p_height 
)

[AI] Returns the size required for frame delta data given width and height.

Parameters
p_width[AI] Width of the frame.
p_height[AI] Height of the frame.

◆ SmackGetSizeTables()

u32 SmackGetSizeTables ( )

[AI] External functions from SMACK.LIB used for decoding Smacker video data.

[AI] These functions provide access to the internal Huffman table and frame decoding routines of the Smacker codec. They are used to decompress and decode video streams in LEGO Island.

[AI] Returns the required size for Huffman tables used in Smacker video decoding.

Returns
[AI] Size in bytes needed for the tables.