How to use compression with GenRes?

Talk about development tools here

Moderator: BigEvilCorporation

Post Reply
djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

How to use compression with GenRes?

Post by djcouchycouch » Sat Feb 18, 2012 10:20 pm

I'm using GenRes through the SGDK. I've noticed there's a setting for sprites in the resource file that enables "compression", but it's not clear to me how I would use that.

Does it actually compress images when the .bin is being created?
Or is it just a flag indicating that the data I'm adding as a resource is already compressed?
Do I decompress them at runtime or is that automatic?
If runtime decompression is required, how is that done?
Do I access the sprites in the same was as non-compressed sprites?

Any info would be great.

Thanks!
DJCC.

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Sun Feb 19, 2012 12:05 am

the compression mode compress the data using something like RLE
It uses the routine of Charles. It is an optimized and low resource way to unpack data on the fly for the genny.

If you read my tutorial (http://code.google.com/p/sgdk/wiki/SGDKTutorial#Tiles), you'll notice the unpack method isn't available on SGDK yet

another thing on hold :(
it is done (I use it myself for many years) but I must include it in SGDK the right way, with the help of Stef

why everyone asking for my stuff on hold RIGHT now !! ;)

Post Reply