Stunts Forum

Stunts - the Game => Stunts Code Extraction => Topic started by: w4kfu on March 25, 2013, 08:35:41 PM

Title: PES File Format
Post by: w4kfu on March 25, 2013, 08:35:41 PM
So I started reverse the real "game.exe", and found that restunts don't know how to handle this type of files (*.PES)
This file format use a common scheme used in image file compression, first pass is huffman decompression, then RLE decompression.
After they do an "unflip" on pixels for some images, and expand image data to 8bits. After all this, we can extract easily image like follow :

Image gallery for the file SCRED.PES : http://w4kfu.com/misc/stunts/SDCRED_gallery/

Image gallery for the file SDTEDIT.PES : http://w4kfu.com/misc/stunts/SDTEDIT_gallery/

dstien will add my work to stressed and restunts as soon as possible.
Title: Re: PES File Format
Post by: dreadnaut on March 25, 2013, 09:35:45 PM
Track item masks, that's nice! Thanks!

Although there are some artifacts left. E.g., this image (http://w4kfu.com/misc/stunts/SDTEDIT_gallery/g_pics/sx41_full.jpg) (http://w4kfu.com/misc/stunts/SDTEDIT_gallery/g_pics/sx41_full.jpg) should be a brown windmill, like the one in this palette:
(http://dreadnaut.altervista.org/test/stunts/palettes/scenery.png)
Title: Re: PES File Format
Post by: w4kfu on March 25, 2013, 11:10:34 PM
You are right, and it is now fix :)
Title: Re: PES File Format
Post by: Duplode on March 26, 2013, 05:08:38 AM
Excellent! :) ESH icons were the main data formats yet to be described. Only a fuller account of music and sound effect data is missing now, IIRC. To point out one low-hanging fruit: as the track element to editor selection grid correspondence is defined by pbox in TEDIT.RES (http://forum.stunts.hu/index.php?topic=1137.msg35417#msg35417), being able to edit the icons makes it possible to add the ghost cars (like the one available in Track Blaster) to the regular editor's palette.
Title: Re: PES File Format
Post by: dstien on March 30, 2013, 10:13:31 PM
Beyond excellent! ;D
7 related functions (http://re.stunts.no/status/) now ported in restunts.
Title: Re: PES File Format
Post by: arturbmallmann on March 08, 2017, 11:00:40 PM
I know I'm digging up this post, but it costed to me to found where was the information about what kind of decompression was necessary to open the files. I think would be interesting that someone put this information on the Stunts Wiki(If already was there, sorry, but I don`t found it there).
Title: Re: PES File Format
Post by: Duplode on March 09, 2017, 02:15:45 AM
I know I'm digging up this post, but it costed to me to found where was the information about what kind of decompression was necessary to open the files. I think would be interesting that someone put this information on the Stunts Wiki(If already was there, sorry, but I don`t found it there).

Indeed, that should be documented -- as a section in Resource file format (http://wiki.stunts.hu/index.php?title=Resource_file_format), or perhaps in a separate article to also cover compression in the executable.