Destruction Derby 000: Difference between revisions
imported>Torque No edit summary |
imported>Ikskoks No edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 33: | Line 33: | ||
uint8 b = readByte(); | uint8 b = readByte(); | ||
// raw bytes | // raw bytes? | ||
if (b & (1 << 7)) | if (b & (1 << 7)) | ||
{ | { | ||
| Line 90: | Line 90: | ||
* [[Game Extractor|Game Extractor]]<br> | * [[Game Extractor|Game Extractor]]<br> | ||
[[Category:File Format]] | |||
Latest revision as of 11:56, 4 January 2021
000, 001
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
File Header
All compressed files (.000, .001, .RAW, COLMAP, etc) start with the following header.
Note that some files can be uncompressed, in which case they don't start with "PACKED".
| Type | Meaning | Notes |
|---|---|---|
| char[6] | magick | "PACKED" |
| uint32 | size | Size of unpacked data. |
| uint32 | checksum | Checksum calculated with unknown algorithm (deduced by looking at strings in DD.EXE, mentions invalid checksum of RLE data). |
File Data
Data is either RLE compressed (header present) or raw bytes.
The RLE decompression algorithm is as follows:
int size = 0;
while (not eof)
{
uint8 b = readByte();
// raw bytes?
if (b & (1 << 7))
{
int count = (b & 0x7F);
for (int i=0; i<count; i++)
{
b = readByte();
output += b;
}
size += count;
} else
{
int count = b;
b = readByte();
// insert byte count times
for (int i=0; i<count; i++)
output += b;
size += count;
}
}
success = (size == header.size);
LEVELXXX.000 Specifics
The .000 file is a 8-bit indexed bitmap containing all textures required for a level (except ground). It also seems to include all common textures. The palette is stored in the COLOURS file for each level.
LEVELXXX.001 Specifics
The .001 file seems to contain chunked data. It is assumed that it contains the level / car geometry. Details are TODO.
BLOCKS0.RAW Specifics
This file seems to contain ground textures. It is similar to .000 and also uses COLOURS in the level directory.
COLOURS Specifics
A palette with 24 bit RGB entries. It contains more than 256 entries, only the first 256 seem to be used, other entries seem random. Doesn't contain a header or size.
MultiEx BMS Script
- Not written yet
Notes and Comments
This format just stores a single file.