Menu

Initial Version of Sprite Decoder added to Decode Repository

Good news for you.

The long awaited sprite decoder is now available.
It took a while because I had to structure the code better and detach the dumps from it. In my previous (closed-source) versions, I had the Okteta write a .C file of the dump into an array and everything was fixed from compile time.

Still... be advised that this code contains several legacies from the closed-source version, such as the typedef to replace the template definition (which was useful when I was unsure about the spriteinfo format) mixed CSTD and C++STD libraries. The code is procedural and uses returns to check the success instead of defining exception types. It should work fine anyway with good (overall) performance.

Also, my first version employed Magick++ to write png and gif files, it is not yet available, only my custom XPM output is working for now. If you change the format (parametrized), it will still write XPM files. I will try to make the Magick++ output available by tomorrow.

Remember that XPM files are very large (not size efficient), but they allow lossless indexed images without altering the palette, which is actually very good for editing the sprites.

In order to use the decoder, you will need a binary memory dump or a executable container (ex: EXE) from any of the original Deadlocks.
Be sure to check the wiki for the sprite table for offsets and length reference.
You will also need a palette file in a binary format. Use the palette tool to convert a palette image into it. Details about the palettes can be found here.

To compile the decoder, it is recommended that you use cmake and make.
The XPM output only uses the standard libraries, and should be easy to port it.
If you only wish this and cannot use cmake and make, you can also use

c++ -o decoder decoder.cpp image_decoder/image_decoder.cpp xpm_writer/xpm_writer.cpp sprite_table_reader/sprite_table_reader.cpp palette_reader/palette_reader.cpp

(Updated)
Works with this changeset.

Related

Decode Wiki: Palettes
Decode Wiki: Sprite Table
Commit: [d61c76]

Posted by Tggtt 2014-02-09 Labels: decode tool xpm

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.