conanac
Let's start with the exploration # x01
by
, 12-05-2009 at 03:34 PM (15000 Views)
As I have mentioned in my last blog that I would like to learn more about brres file (texture part). Now, it would perhaps be better that we learn together so if you know more or find that I miss something perhaps you could post your comments, and at the end, we all get the benefit of having better information/guess (especially the unknowns in the description column).
To get to the texture part, we need to be able to unpack the brres file, and the first thing is to understand the beginning part of the file (bres header and root section).
Here are the information/guesses that I have got so far:
Any feedback or comment is greatly appreciated.Code:Offset Size Description brres_header structure 0x00 4 bytes brres tag (62 72 65 73 = "bres") 0x04 4 bytes unknown (endian indicator? FE FF 00 0) 0x08 4 bytes size of brres file <in bytes> 0x0C 2 bytes brres header size <in bytes> [0x10] 0x0E 2 bytes number of sections (including root section) section_header structure (root section) 0x10 4 bytes section tag (72 6F 6F 74 = "root") 0x14 4 bytes section header size <in bytes> directory_info structure 0x18 4 bytes directory description size <in bytes> 0x1C 4 bytes number of objects 0x20 4 bytes unknown (e,g, FF FF 00 00) 0x24 4 bytes unknown (e.g. 00 01 00 00; 00 02 00 00) 0x28 4 bytes unknown (constant? 00 00 00 00) 0x2C 4 bytes unknown (constant? 00 00 00 00) the i-th object_info structure (0x10 bytes for each object) (i-1)*0x10 + 0x30 2 bytes unknown (e.g. 00 6D; 00 33; 00 2A; 00 5D) (i-1)*0x10 + 0x32 2 bytes unknown (e.g. 00 00) (i-1)*0x10 + 0x34 2 bytes unknown (e.g. 00 00; 00 02; 00 03; 00 04) (i-1)*0x10 + 0x36 2 bytes unknown (e.g. 00 01; 00 02; 00 04) (i-1)*0x10 + 0x38 4 bytes [on-i] object name location offset (from directory_info start, 0x18) (i-1)*0x10 + 0x3C 4 bytes [od-i] object data location offset (from directory_info start, 0x18) the i-th object_data_info structure 0x18 + [od-i] 4 bytes the i-th object_data_info size <in bytes> 0x1C + [od-i] 4 bytes number of files for the i-th object 0x20 + [od-i] 4 bytes unknown (e,g, FF FF 00 00) 0x24 + [od-i] 4 bytes unknown (e.g. 00 01 00 00; 00 02 00 00) 0x28 + [od-i] 4 bytes unknown (constant? 00 00 00 00) 0x2C + [od-i] 4 bytes unknown (constant? 00 00 00 00) the j-th file of the i-th object_data_info structure (0x10 bytes for each file) (j-1)*0x10 + 0x30 + [od-i] 2 bytes unknown (e.g. 00 16; 00 1D) (j-1)*0x10 + 0x32 + [od-i] 2 bytes unknown (e.g. 00 00) (j-1)*0x10 + 0x34 + [od-i] 2 bytes unknown (e.g. 00 00; 00 01) (j-1)*0x10 + 0x36 + [od-i] 2 bytes unknown (e.g. 00 01; 00 02) (j-1)*0x10 + 0x38 + [od-i] 4 bytes [fn-j] file name location offset (from 0x18 + [od-i]) (j-1)*0x10 + 0x3C + [od-i] 4 bytes [fd-j] file data location offset (from 0x18 + [od-i]) repeat until all files of the i-th object_data_info repeat until all objects of the directory_info end of section (root)
To be continued...