GFXtract Is Almost Ready

I’ve been making some really nice progress with GFXtract. It’s reading scripts very nicely, executing commands and reading arguments pretty much without issues. As I said before I do plan to make a more general way of handling these, right now a lot of it is handled very specifically but it works well enough for now.

Anyway, it can now actually read in linear pixel data, either with or without a palette. The colour order can be any order, either with or without alpha (e.g. ARGB, BGR, GARB, etc). The bits per colour (bpc, which is actually bpp for non-paletted images) can be any multiple of 8 up to 32, and bits per pixel (bpp) for paletted images can be any multiple of 4 up to 32. This should handle most formats, although I intend to expand this later on to allow any number of bits, even odd numbers like 13. For bpc however, I will probably require the script to specify which bits are for which channel. And I won’t allow anything above 32 bits, since I highly doubt it’ll ever be necessary (and besides, Ints in Haxe are 32-bit anyway).

I’ve also done a bit of simple image manipulation, namely flipping vertically and horizontally. I think this is really one of the most important transformations, the only other thing that will often be useful is copying out part of an image onto a different image. It will be handy and allow things like piecing together broken sprites or even making things like sheets using animation info.

Another thing that is sorely needed are if statements and for loops. These aren’t super easy to implement though and I think I will leave them until I redesign the script parsing (which hopefully isn’t too far off).

Anyway, at this point GFXtract is already usable for fairly simple formats; I already have fully functional scripts for Patapon (1 and 2) .gxt files, and Turbo Pug .tex files (which I think might be general Unity TEX; I’ll have to check). I’ll just make sure it all works, write up a small readme and then put up a download! Even if it only has basic functionality, it might get some people interested in it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s