Two Tribes File Formats

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Two Tribes File Formats

Post by Savage »

http://will.kirk.by/labs/tt/

Im interessed in how i can compile this one:

http://will.kirk.by/labs/tt/ttdev/etx

// for engine version 18-03 (RUSH, some EDGE builds)
struct etx_file_t {
asset_header_t asset_header;
char data[]; // image in PNG format. No length provided, just read to the EOF.
};

// for engine version 18-04 (some EDGE builds)
struct etx_file_t {
asset_header_t asset_header;
short width;
short height;
int unknown1;
int data_length; // width * height * 4
char data[data_length]; // BGRA8888 in standard raster scan order
};

// for engine version 00-04 (Toki Tori 2+)
struct etx_file_t {
asset_header_t asset_header;
short width;
short height;
short depth; // 1 for non-volumetric textures
short mipmap_count;
short unknown1;
short format; // this might be a flags-based thing, I'm unsure.
// so far the only values I've seen are:
// 0x0006 = BGRA8888
// 0x0206 = A8 (alpha-only, used for lightmasks)
int data_length_dst;
int data_length_src;
char data[data_length_src]; // compressed with FastLZ.
// Decompresses to be of length `data_length_dst`
};

Looks the data uses FastLZ
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Two Tribes File Formats

Post by aluigi »

You forgot the sample file.
That's not code to compile, it's just a C structure.
Probably this is something for the Graphics section because etx -> textures.
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: Two Tribes File Formats

Post by Savage »