Isle
Loading...
Searching...
No Matches
mxsmk.h
Go to the documentation of this file.
1#ifndef MXSMK_H
2#define MXSMK_H
3
4#include "decomp.h"
5#include "mxgeometry.h"
6#include "mxtypes.h"
7
8#include <smack.h>
9
10struct MxBITMAPINFO;
11
12// These functions are not part of the public interface,
13// but present in SMACK.LIB and used directly by Mindscape.
19extern "C"
20{
26
38 u8* p_huffmanTrees,
39 u8* p_huffmanTables,
40 u32 p_codeSize,
41 u32 p_abSize,
42 u32 p_detailSize,
43 u32 p_typeSize
44 );
45
53 void SmackDoFrameToBuffer(u8* p_source, u8* p_huffmanTables, u8* p_unk0x6b4);
54
60 u32 SmackGetSizeDeltas(u32 p_width, u32 p_height);
61
68 u8 SmackGetRect(u8* p_unk0x6b4, u32* p_rect);
69}
70
71// SIZE 0x6b8
77struct MxSmk {
86
94 static MxResult LoadHeader(MxU8* p_data, MxSmk* p_mxSmk);
95
101 static void Destroy(MxSmk* p_mxSmk);
102
114 static MxResult LoadFrame(
115 MxBITMAPINFO* p_bitmapInfo,
116 MxU8* p_bitmapData,
117 MxSmk* p_mxSmk,
118 MxU8* p_chunkData,
119 MxBool p_paletteChanged,
120 MxRect32List* p_list
121 );
122
132 static MxBool GetRect(MxU8* p_unk0x6b4, MxU16* p_und, u32* p_smackRect, MxRect32* p_rect);
133};
134
135#endif // MXSMK_H
[AI] List for pointers to MxRect32 rectangles.
Definition: mxgeometry.h:749
[AI] Rectangle using 32-bit signed integer coordinates.
Definition: mxgeometry.h:706
unsigned char undefined
Definition: decomp.h:26
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.
u32 SmackGetSizeDeltas(u32 p_width, u32 p_height)
[AI] Returns the size required for frame delta data given width and height.
u8 SmackGetRect(u8 *p_unk0x6b4, u32 *p_rect)
[AI] Reads a rectangle from the frame update information.
void SmackDoFrameToBuffer(u8 *p_source, u8 *p_huffmanTables, u8 *p_unk0x6b4)
[AI] Decompress a single Smacker video frame into a provided buffer.
u32 SmackGetSizeTables()
[AI] External functions from SMACK.LIB used for decoding Smacker video data.
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
unsigned short MxU16
[AI]
Definition: mxtypes.h:20
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
#define u32
Definition: rad.h:147
#define u8
Definition: rad.h:146
[AI] Represents a bitmap information header plus a 256-color palette, matching the layout for 8-bit D...
Definition: mxbitmap.h:25
[AI] The MxSmk struct encapsulates all data required to decode and display a Smacker (SMK) video stre...
Definition: mxsmk.h:77
MxU32 * m_frameSizes
[AI] Array of frame sizes (in bytes), one entry per video frame (plus ring frame if present).
Definition: mxsmk.h:80
MxU8 * m_huffmanTrees
[AI] Huffman trees used for decompressing video frames.
Definition: mxsmk.h:82
MxU32 m_maxFrameSize
[AI] Maximum size of any frame, used for allocation.
Definition: mxsmk.h:84
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.
Definition: mxsmk.cpp:162
MxU8 * m_unk0x6b4
[AI] Buffer/context for decoding frame delta data; referenced throughout decompression ([AI_SUGGESTED...
Definition: mxsmk.h:85
MxU8 * m_frameTypes
[AI] Array of frame types, one entry per frame.
Definition: mxsmk.h:81
static void Destroy(MxSmk *p_mxSmk)
[AI] Cleans up and deallocates all resources associated with this MxSmk.
Definition: mxsmk.cpp:141
static MxResult LoadHeader(MxU8 *p_data, MxSmk *p_mxSmk)
[AI] Loads the SMK header and initializes decoding structures for a Smacker video.
Definition: mxsmk.cpp:12
undefined m_unk0x390[784]
[AI] Reserved/unused; aligns struct to file format ([AI_SUGGESTED_NAME: paddingOrWorkingBuffer])
Definition: mxsmk.h:79
MxU8 * m_huffmanTables
[AI] Generated decoding tables for use in SmackDoFrameToBuffer.
Definition: mxsmk.h:83
SmackTag m_smackTag
[AI] Metadata block from the Smacker file header.
Definition: mxsmk.h:78
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.
Definition: mxsmk.cpp:236
Definition: smack.h:33