conanac
Implementation for testing exploration # x01
by
, 12-12-2009 at 07:20 AM (14107 Views)
Now, for testing those structures (for unpacking brres file) we just need a little bit, but critical, more information about the size of each file within the object data. It looks for various file type, this information is available in the corresponding header part. So here is one additional structure that we need to add.
With all these information, I put together (not optimal coding results, so feel free to modify as you wish) two simple files, header and main files. You could see them by choosing the links below.Code:Offset Size Description file_section_header structure 0x00 + [fd-j] 4 bytes file tag (e.g. 54 45 58 30 = "TEX0") 0x04 + [fd-j] 4 bytes file size <in bytes> 0x08 + [fd-j] 4 bytes unknown0; 0x0C + [fd-j] 4 bytes offset to the beginning of brres file
And for those of you who just want to try it, you could download the windows executable. To use it just drag and drop a brres file onto this application, and it will automatically create a tree of directories and files (in the same folder of the brres file).
To motivate the learning process, try unpacking the gamecube dresser brres file, and you will see two palette files (PLT) but only one texture file (TEX). You may ask why we need two palette files for one texture files. Yes, somehow the maker of this DLC did not remove the unused one (who knows what the reasons were). Just to show the differences, these two png files are created by using those two different palettes (but with the same texture file). Which one is the unused one? Which one that you like better?
With pal name
With pall name
So in the next set of my blogs, we will try to explore about texture and palette files format and content structures so we could generate those png files.
Until next time...
Cheers.