@Lord-Spectre(View Post) They're both the same, it's just that stamps have a variable width/height Format is: Magic number (3 Bytes): 'PSv' Saved settings (1 Byte): Bit 0: Legacy mode Bit 1: Pause mode Bit 2-3: Gravity mode Bit 4-6: Air mode Bit 7: Newtonian gravity mode Game version (1 Byte) Cell size (1 Byte) Width, in cells (1 Bytes) Heigth, in cells (1 Bytes) Unzipped size of the save data (4 Bytes) Save data, zipped with bzip2:
All walls (1 Byte each) For FANs: X speed (1 Byte each) For FANs: Y speed (1 Byte each) All particles, types (1 Byte each) Particles X speed (1 Byte each) Particles Y speed (1 Byte each) Particles life (2 Byte each) Particles tmp (2 Byte each) Particles deco alpha (1 Byte each) Particles deco red (1 Byte each) Particles deco green (1 Byte each) Particles deco blue (1 Byte each) Particles temperature (2 Byte each) Particles ctype, only for CLNE, PCLN, BCLN, SPRK, LAVA & PIPE (1 Byte each) Number of signs (1 Byte) Then for each sign:
X position (2 Bytes) Y position (2 Bytes) Text align (1 Byte) Length of text (1 Byte) Text (IV Bytes)
@boxmein(View Post) There were some minor changes to this, in the recent versions. Each PBCN adds a additional byte for its tmp2-value right after the regular tmp-values. There are some additional elements that have their ctype saved. But the rest should still be good.
This is the saving function, http://pastebin.com/wCsHL7zK The compressing function is BZ2_bzBuffToBuffCompress((char *)(c+12), (unsigned *)&i, (char *)d, p, 9, 0, 0) To decompress it, just run BZ2_bzBuffToBuffDecompress(arguments);