DO/BTB
From Dark Omen Wiki
(Difference between revisions)
Line 7: | Line 7: | ||
}; | }; | ||
- | Each chunk consists of 'records' which are similar to chunks, but the record size is | + | Each chunk consists of 'records' which are similar to chunks, but the record size is ''inclusive'' of the header. |
struct RECORD_HEADER | struct RECORD_HEADER | ||
Line 18: | Line 18: | ||
START/END CHUNK, type=0xBEAFEED0, size=0 | START/END CHUNK, type=0xBEAFEED0, size=0 | ||
- | HEADER CHUNK, type=0, size= | + | HEADER CHUNK, type=0, size=240 |
UNKNOWN CHUNK, type=1, size=<varies> | UNKNOWN CHUNK, type=1, size=<varies> | ||
OBSTACLES CHUNK, type=2, size=<varies> | OBSTACLES CHUNK, type=2, size=<varies> | ||
Line 31: | Line 31: | ||
GAME OBJECT CHUNK, type=4, size=<varies> | GAME OBJECT CHUNK, type=4, size=<varies> | ||
START/END CHUNK, type=0xBEAFEEDO, size=0 | START/END CHUNK, type=0xBEAFEEDO, size=0 | ||
+ | |||
+ | == START/END CHUNK == | ||
+ | |||
+ | This chunk is just a marker of the start/end of the file; it contains no data | ||
+ | |||
+ | == HEADER CHUNK == | ||
+ | |||
+ | HEADER CHUNK, type=0, size=240 | ||
+ | INTEGER RECORD (<Map width in tiles> * 8) type=1, size=12 | ||
+ | INTEGER RECORD (<Map height in tiles> * 8) type=2, size=12 | ||
+ | STRING RECORD (Mercenary Army file name without extension) type=1001, size=40 | ||
+ | STRING RECORD (Enemy Army file name without extension) type=1002, size=40 | ||
+ | STRING RECORD (CTL filename without extension) type=1003, size=40 | ||
+ | STRING RECORD ("/0") type=1004, size=40 | ||
+ | STRING RECORD ("/0") type=1005, size=40 | ||
+ | 2-TUPLE RECORD ( [Number of Regions in file, Number of line segments in all regions] ) type=9, size=16 |
Revision as of 08:53, 11 May 2008
The BTB file consists of chunks of the form:
struct CHUNK_HEADER { unsigned int chunkType; unsigned int chunkSize; // excluding header };
Each chunk consists of 'records' which are similar to chunks, but the record size is inclusive of the header.
struct RECORD_HEADER { unsigned int recordType; unsigned int recordSize; // including header };
The observed format of the BTB files in Dark Omen follows in order:
START/END CHUNK, type=0xBEAFEED0, size=0 HEADER CHUNK, type=0, size=240 UNKNOWN CHUNK, type=1, size=<varies> OBSTACLES CHUNK, type=2, size=<varies> REGION CHUNK 0, type=3, size=<varies> REGION CHUNK 1, type=3, size=<varies> . . . REGION CHUNK n, type=3, size=<varies> GAME OBJECT CHUNK, type=4, size=<varies> START/END CHUNK, type=0xBEAFEEDO, size=0
START/END CHUNK
This chunk is just a marker of the start/end of the file; it contains no data
HEADER CHUNK
HEADER CHUNK, type=0, size=240 INTEGER RECORD (<Map width in tiles> * 8) type=1, size=12 INTEGER RECORD (<Map height in tiles> * 8) type=2, size=12 STRING RECORD (Mercenary Army file name without extension) type=1001, size=40 STRING RECORD (Enemy Army file name without extension) type=1002, size=40 STRING RECORD (CTL filename without extension) type=1003, size=40 STRING RECORD ("/0") type=1004, size=40 STRING RECORD ("/0") type=1005, size=40 2-TUPLE RECORD ( [Number of Regions in file, Number of line segments in all regions] ) type=9, size=16