I picked up a Lynx at California Extreme, and because I'm completely nuts, I can't truly enjoy a new game console, until I've written code for it, and I understand how it works.
Long story short, I was having trouble getting my head wrapped around how the sprite data has to be set up for packed sprites, so I wrote a tool to convert 16 color bitmaps into Lynx packed sprite data. Tools like this may already exist, but in any case, I thought I'd share the tool and it's source in case anyone else wants a head start, or wants to make the tool more useful. It could be better, IE: by changing the draw direction in the data it may be possible to get better compression, but I'm not figuring out the algorithm to do that :-). Depending on how many repeating pixels you have in your sprite, you can get a lot of space savings by packing your sprites up with this tool.
I used VC++ 2008, but it's all std c, so you should be able to compile it for Linux or Mac by removing the precompiled header nonsense.
Attached Files
Edited by Cupcakus, Sat Jul 24, 2010 5:07 PM.















