Decoding - RX Files

 

 

This section has information about the construction of the game files and how to edit them. If you know something about a that there is no information available about, please contribute! Provided are documents, descriptions and tools allowing you to edit the files.


The information here is based on The Peasants Rebellion, unless otherwise stated!

 


Overview

Contents: The RX files store all the different graphics found within the game.
Status: 100%
Contributors: Harold
Documents: Not available
Tools: Harold download.png

 

Construction

 

 

This is what Harold told me:

 

"RX:
the RX files are collections of textures (all indexed colours in the same way as textX.dat files), they start with an int32 for the number of textures in them. After that come that many bytes which can be 0 or 1, if a byte is 0 it means that the texture has been removed - so there is no data defining it. This means that any indexing that is done on these textures must be offsetted at every place where a texture has been removed, it also means that you can not extract that number of textures from the RX file (you would end up trying to read beyond the end of the file).
After these enabled/disabled bytes, come the real textures. Each texture entry cosists of 5 parts, a width, a height, a X-origin, a Y-origin and pixel data. Width and height are int16's, while the origin consists of 2 int32's. (note that this is useless since those values never exceed the range of 16bit values). The pixel data once again is a byte per pixel, indexing a palette."