Initial revision
[ssr] / StraySrc / Libraries / Core / AOF / h / chunk
1 /*
2 * chunk.h
3 *
4 * Chunk file format definitions
5 *
6 * © 1993-1998 Straylight
7 */
8
9 /*----- Licensing note ----------------------------------------------------*
10 *
11 * This file is part of Straylight's AOF library (aoflib).
12 *
13 * Aoflib is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
18 * Aoflib is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with Aoflib. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 */
27
28 #ifndef __chunk_h
29 #define __chunk_h
30
31
32 #define chunk_MAGIC (0xC3CBC6C5ul)
33
34 typedef struct
35 {
36 char chunkName[8]; /* The name of this chunk */
37 int offset; /* Offset of chunk data in file */
38 int size; /* Size of the chunk data */
39 }
40 chunk_tableEntry;
41
42 typedef struct
43 {
44 unsigned long id; /* Chunk file magic number */
45 int maxChunks; /* Number of chunks allocated */
46 int numChunks; /* Number of chunks used */
47 }
48 chunk_fixedHeader;
49
50 typedef struct
51 {
52 chunk_fixedHeader hdr; /* The file's header info */
53 chunk_tableEntry table[1]; /* Chunk entries (unsized array)*/
54 }
55 chunk_header;
56
57 #endif