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
67
CODEXABOUT
*
GCALL
HUFF_about
(
void
)
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
galloc
#define galloc
Definition
gimex.h:356
codex.h
GCALL
#define GCALL
Definition
codex.h:81
QMAKEID
#define QMAKEID(a, b, c, d)
Definition
codex.h:75
HUFF_about
CODEXABOUT *GCALL HUFF_about(void)
Definition
huffabout.cpp:67
huffcodex.h
string.h
CODEXABOUT
Definition
codex.h:60
CODEXABOUT::size32
unsigned int size32
Definition
codex.h:67
CODEXABOUT::encode
unsigned int encode
Definition
codex.h:66
CODEXABOUT::signature
int signature
Definition
codex.h:61
CODEXABOUT::shorttypestr
char shorttypestr[8]
Definition
codex.h:71
CODEXABOUT::size
int size
Definition
codex.h:62
CODEXABOUT::decode
unsigned int decode
Definition
codex.h:65
CODEXABOUT::longtypestr
char longtypestr[16]
Definition
codex.h:72
CODEXABOUT::version
int version
Definition
codex.h:63
CODEXABOUT::versionstr
char versionstr[8]
Definition
codex.h:70
Code
Libraries
Source
Compression
EAC
huffabout.cpp
Generated by
1.13.2