]> 4ch.mooo.com Git - 16.git/blob - 16/cawat/SL_FILE.H
wwww
[16.git] / 16 / cawat / SL_FILE.H
1 /* Catacomb Armageddon Source Code\r
2  * Copyright (C) 1993-2014 Flat Rock Software\r
3  *\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
8  *\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
13  *\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
17  */\r
18 \r
19 #ifndef _SL_FILE_H\r
20 #define _SL_FILE_H\r
21 \r
22 \r
23 //==========================================================================\r
24 //\r
25 //                                                                              DEFINES\r
26 //\r
27 //==========================================================================\r
28 \r
29 #ifndef MakeID\r
30 #define MakeID(a,b,c,d)                 (((long)(d)<<24L)|((long)(c)<<16L)|((long)(b)<<8L)|(long)(a))\r
31 #endif\r
32 \r
33 \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
38 \r
39 \r
40 \r
41 //==========================================================================\r
42 //\r
43 //                                                                              TYPES\r
44 //\r
45 //==========================================================================\r
46 \r
47 \r
48 \r
49 \r
50 //--------------------------------------------------------------------------\r
51 //                                                      SOFTLIB File Entry Types\r
52 //--------------------------------------------------------------------------\r
53 typedef enum LibFileTypes\r
54 {\r
55         lib_DATA =0,                                    // Just streight raw data\r
56 //      lib_AUDIO,                                              // Multi chunk audio file\r
57 \r
58 } LibFileTypes;\r
59 \r
60 \r
61 \r
62 //--------------------------------------------------------------------------\r
63 //                                                      SOFTLIB Library File header..\r
64 //\r
65 //                                                 * This header will NEVER change! *\r
66 //--------------------------------------------------------------------------\r
67 \r
68 typedef struct SoftLibHdr\r
69 {\r
70         unsigned Version;                                                                       // Library Version Num\r
71         unsigned FileCount;\r
72 } SoftlibHdr;\r
73 \r
74 \r
75 \r
76 //--------------------------------------------------------------------------\r
77 //                                                      SOFTLIB Directory Entry Hdr\r
78 //\r
79 // This can change according to Version of SoftLib (Make sure we are\r
80 // always downward compatable!\r
81 //--------------------------------------------------------------------------\r
82 \r
83 #define SL_FILENAMESIZE         16\r
84 \r
85 typedef struct FileEntryHdr\r
86 {\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
92 } FileEntryHdr;\r
93 \r
94 \r
95 \r
96 //--------------------------------------------------------------------------\r
97 //                                                         SOFTLIB Entry Chunk Header\r
98 //--------------------------------------------------------------------------\r
99 \r
100 typedef struct ChunkHeader\r
101 {\r
102         unsigned long HeaderID;\r
103         unsigned long OrginalLength;\r
104         short Compression;                                                              // ct_TYPES\r
105 } ChunkHeader;\r
106 \r
107 \r
108 \r
109 #endif