Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
huffabout.cpp
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19// Copyright (C) Electronic Arts Canada Inc. 1995-2002. All rights reserved.
20
21/* ABSTRACT */
22/*------------------------------------------------------------------*/
23/* */
24/* Huffman - Huffman with Runlength Codex */
25/* */
26/* by FrANK G. Barchard, EAC */
27/* */
28/*------------------------------------------------------------------*/
29/* */
30/* Version Date SE History: */
31/* ------- ---- -- -------- */
32/* 1.00 950108 FB based on huff and ref codex */
33/* 1.01 950316 FB delta huff and delta delta huff */
34/* 1.02 950317 FB quick table version (used in wing3) */
35/* 1.03 950626 FB allocate context instead of on stack */
36/* 1.04 010608 ID forgot to undelta big size buffer fix */
37/* */
38/*------------------------------------------------------------------*/
39/* */
40/* Module Notes: */
41/* ------------- */
42/* Reentrant */
43/* Files: hufread.c hufwrite.c hufcodex.h */
44/* */
45/*------------------------------------------------------------------*/
46/* */
47/* Format Notes: */
48/* ------------- */
49/* *30fb fb6 huff 6.1 EOF only huff */
50/* *31fb fb6 huff 6.1 ' ' ' composite */
51/* *32fb fb6 huff 6.1 EOF only speed */
52/* *33fb fb6 huff 6.1 ' ' ' composite */
53/* *34fb fb6 huff 6.1 EOF only acceleration */
54/* *35fb fb6 huff 6.1 ' ' ' composite */
55/* */
56/*------------------------------------------------------------------*/
57/* END ABSTRACT */
58
59#include <string.h>
60#include "codex.h"
61#include "huffcodex.h"
62
63/****************************************************************/
64/* Information Functions */
65/****************************************************************/
66
68{
69 CODEXABOUT *info;
70
71 info = (CODEXABOUT *) galloc(sizeof(CODEXABOUT));
72 if (info)
73 {
74 memset(info, 0, sizeof(CODEXABOUT));
75
76 info->signature = QMAKEID('H','U','F','F');
77 info->size = sizeof(CODEXABOUT);
78 info->version = 200; /* codex version number (200) */
79 info->decode = 1; /* supports decoding */
80 info->encode = 1; /* supports encoding */
81 info->size32 = 0; /* supports 32 bit size field */
82 strcpy(info->versionstr, "1.04"); /* version # */
83 strcpy(info->shorttypestr, "huff"); /* type */
84 strcpy(info->longtypestr, "Huffman"); /* longtype */
85 }
86 return(info);
87}
88
#define galloc
Definition gimex.h:356
#define GCALL
Definition codex.h:81
#define QMAKEID(a, b, c, d)
Definition codex.h:75
CODEXABOUT *GCALL HUFF_about(void)
Definition huffabout.cpp:67
unsigned int size32
Definition codex.h:67
unsigned int encode
Definition codex.h:66
int signature
Definition codex.h:61
char shorttypestr[8]
Definition codex.h:71
int size
Definition codex.h:62
unsigned int decode
Definition codex.h:65
char longtypestr[16]
Definition codex.h:72
int version
Definition codex.h:63
char versionstr[8]
Definition codex.h:70