1 /* Catacomb Armageddon Source Code
\r
2 * Copyright (C) 1993-2014 Flat Rock Software
\r
4 * This program is free software; you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation; either version 2 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License along
\r
15 * with this program; if not, write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
23 //==========================================================================
\r
27 //==========================================================================
\r
30 #define MakeID(a,b,c,d) (((long)(d)<<24L)|((long)(c)<<16L)|((long)(b)<<8L)|(long)(a))
\r
34 #define ID_SLIB MakeID('S','L','I','B')
\r
35 #define SLIB ("SLIB")
\r
36 #define SOFTLIB_VER 2
\r
37 #define ID_CHUNK MakeID('C','U','N','K')
\r
41 //==========================================================================
\r
45 //==========================================================================
\r
50 //--------------------------------------------------------------------------
\r
51 // SOFTLIB File Entry Types
\r
52 //--------------------------------------------------------------------------
\r
53 typedef enum LibFileTypes
\r
55 lib_DATA =0, // Just streight raw data
\r
56 // lib_AUDIO, // Multi chunk audio file
\r
62 //--------------------------------------------------------------------------
\r
63 // SOFTLIB Library File header..
\r
65 // * This header will NEVER change! *
\r
66 //--------------------------------------------------------------------------
\r
68 typedef struct SoftLibHdr
\r
70 unsigned Version; // Library Version Num
\r
76 //--------------------------------------------------------------------------
\r
77 // SOFTLIB Directory Entry Hdr
\r
79 // This can change according to Version of SoftLib (Make sure we are
\r
80 // always downward compatable!
\r
81 //--------------------------------------------------------------------------
\r
83 #define SL_FILENAMESIZE 16
\r
85 typedef struct FileEntryHdr
\r
87 char FileName[SL_FILENAMESIZE]; // NOTE : May not be null terminated!
\r
88 unsigned long Offset;
\r
89 unsigned long ChunkLen;
\r
90 unsigned long OrginalLength;
\r
91 short Compression; // ct_TYPES
\r
96 //--------------------------------------------------------------------------
\r
97 // SOFTLIB Entry Chunk Header
\r
98 //--------------------------------------------------------------------------
\r
100 typedef struct ChunkHeader
\r
102 unsigned long HeaderID;
\r
103 unsigned long OrginalLength;
\r
104 short Compression; // ct_TYPES
\r