Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
refabout.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/* RefPack - Backward Reference Codex */
25/* */
26/* by FrANK G. Barchard, EAC */
27/* */
28/*------------------------------------------------------------------*/
29/* */
30/* Version Date SE History: */
31/* ------- ---- -- -------- */
32/* 0.10 941010 FB First codex prototype module */
33/* 0.90 941019 FB #includable */
34/* 1.00 950108 FB frozen API at 1.00 */
35/* 1.01 010426 FB 32 size field */
36/* */
37/*------------------------------------------------------------------*/
38/* */
39/* Module Notes: */
40/* ------------- */
41/* used hash table and link table for speed */
42/* Reentrant */
43/* Files: refread.c refwrite.c refcodex.h (refmatch.asm pc) */
44/* */
45/*------------------------------------------------------------------*/
46/* */
47/* Format Notes: */
48/* ------------- */
49/* refpack is a sliding window (131k) lzss method, with byte */
50/* oriented coding. */
51/* */
52/* huff fb6 style header: */
53/* *10fb fb6 refpack 1.0 reference pack */
54/* *90fb fb6 refpack 1.01 32 bit reference pack */
55/* */
56/* */
57/* header: */
58/* [10fb] [totalunpacksize] [nextunpacksize] */
59/* 2 3 3 */
60/* [90fb] [totalunpacksize] [nextunpacksize] */
61/* 2 4 4 */
62/* */
63/* */
64/* */
65/* format is: */
66/* ---------- */
67/* 0ffnnndd_ffffffff short ref, f=0..1023,n=3..10,d=0..3 */
68/* 10nnnnnn_ddffffff_ffffffff int ref, f=0..16384,n=4..67,d=0..3 */
69/* 110fnndd_f.._f.._nnnnnnnn very int,f=0..131071,n=5..1028,d=0..3*/
70/* 111ddddd literal, d=4..112 */
71/* 111111dd eof, d=0..3 */
72/* */
73/*------------------------------------------------------------------*/
74/* END ABSTRACT */
75
76#include <string.h>
77#include "codex.h"
78#include "refcodex.h"
79
80/****************************************************************/
81/* Information Functions */
82/****************************************************************/
83
85{
86 CODEXABOUT *info;
87
88 info = (CODEXABOUT *) galloc(sizeof(CODEXABOUT));
89 if (info)
90 {
91 memset(info, 0, sizeof(CODEXABOUT));
92
93 info->signature = QMAKEID(0,'R','E','F');
94 info->size = sizeof(CODEXABOUT);
95 info->version = 200; /* codex version number (200) */
96 info->decode = 1; /* supports decoding */
97 info->encode = 1; /* supports encoding */
98 info->size32 = 1; /* supports 32 bit size field */
99 strcpy(info->versionstr, "1.01"); /* version # */
100 strcpy(info->shorttypestr, "ref"); /* type */
101 strcpy(info->longtypestr, "Refpack"); /* longtype */
102 }
103 return(info);
104}
105
#define galloc
Definition gimex.h:356
#define GCALL
Definition codex.h:81
#define QMAKEID(a, b, c, d)
Definition codex.h:75
CODEXABOUT *GCALL REF_about(void)
Definition refabout.cpp:84
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