Re: It's not a DM game without people attacking the save fil
Posted: Mon Apr 30, 2012 4:08 pm
Moved to modding.
Daniel.
Daniel.
Official Legend of Grimrock Forums
http://grimrock.net/forum/
d'ohDej wrote:The 04 after the "GRIM" keyword is in fact the size of the segment data. That size is encoded as a 32-bit word in little-endian and will be the same on all save files: 04 00 00 00.x000000 47 52 49 4d 04 00 00 00 81 c2 0e 00 78 9c ec 7d 'GRIM........x...'
I'm assuming that the 04 is a version tag or something similar.
The segment data is therefore the next 32-bit word (at offset 8). It is also a size, and also little-endian. It is the size of the uncompressed zlib data. In the example above 81 c2 0e 00 --> 0x0EC281 = 967'297 bytes.
Following that is the zlib data. The first 16-bit word (offset 12) is the zlib data header. It will not change from one save file to the other: always 0x789C (which corresponds to a standard zlib compression). Following that is the compressed data.