Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
huffdecode.cpp File Reference
#include <string.h>
#include "codex.h"
#include "huffcodex.h"

Go to the source code of this file.

Classes

struct  HuffDecodeContext
 

Macros

#define __HUFREAD   1
 
#define GET16BITS()
 
#define SQgetbits(v, n)
 
#define SQgetnum(v)
 
#define SQmemset(ptr, val, amt)
 

Functions

bool GCALL HUFF_is (const void *compresseddata)
 
int GCALL HUFF_size (const void *compresseddata)
 
int GCALL HUFF_decode (void *dest, const void *compresseddata, int *compressedsize)
 

Macro Definition Documentation

◆ __HUFREAD

#define __HUFREAD   1

Definition at line 22 of file huffdecode.cpp.

◆ GET16BITS

#define GET16BITS ( )
Value:
bitsunshifted = qs[0] | (bitsunshifted << 8);\
bitsunshifted = qs[1] | (bitsunshifted << 8);\
qs += 2;

Definition at line 49 of file huffdecode.cpp.

◆ SQgetbits

#define SQgetbits ( v,
n )
Value:
if (n) \
{ \
v = bits >> (32-(n));\
bits <<= (n);\
bitsleft -= (n);\
} \
\
if (bitsleft<0)\
{\
GET16BITS() \
\
bits = bitsunshifted<<(-bitsleft);\
bitsleft += 16;\
}

Definition at line 55 of file huffdecode.cpp.

◆ SQgetnum

#define SQgetnum ( v)

Definition at line 72 of file huffdecode.cpp.

◆ SQmemset

#define SQmemset ( ptr,
val,
amt )
Value:
{\
int i = amt/16;\
int intval = (val<<24)|(val<<16)|(val<<8)|val;\
int* lptr = (int*)ptr;\
\
while (i)\
{\
lptr[0] = intval;\
lptr[1] = intval;\
lptr[2] = intval;\
lptr[3] = intval;\
lptr += 4;\
--i;\
}\
}\

Definition at line 120 of file huffdecode.cpp.

Function Documentation

◆ HUFF_decode()

int GCALL HUFF_decode ( void * dest,
const void * compresseddata,
int * compressedsize )

Definition at line 564 of file huffdecode.cpp.

◆ HUFF_is()

bool GCALL HUFF_is ( const void * compresseddata)

Definition at line 519 of file huffdecode.cpp.

◆ HUFF_size()

int GCALL HUFF_size ( const void * compresseddata)

Definition at line 546 of file huffdecode.cpp.