gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Usenti command line exporter?

#62950 - gauauu - Wed Dec 07, 2005 3:53 am

This question is really for Cearn, but posting it here, because the answer might be useful to others....

Is there any way in usenti to use the exporter from a command line? The exporter is really good and flexible, so I tend to use it most of the time, but it'd be really great to be able to automate the graphics-to-data conversion in my makefile.

Just curious!

#62985 - Cearn - Wed Dec 07, 2005 2:54 pm

Actually, I was working on that about 2 months ago ... then I blew my PCs PSU (at least, I think that's what's happened, all I know is that the thing's completely dead right now) and I don't have all my latest stuff on my laptop to continue right now.
Don't worry I ordered a new PC (was long overdue anyway) and should arrive around Nov 14.
Errr, Nov 28.
Oh right, we've past that date too ... Dec 4 then.
Dammit, don't have the opportunity to pick it up >_<

Maybe tomorrow.
...
Well, I'll get it soon enough.

Anyway, the plan is to have everything that the current (v1.7.1) Usenti exporter has in there, i.e.
  • (partial) palette
  • (partial) image, as bitmap or tiles
  • rudimentary mapping options, with tile reduction and meta tiling
  • compression: bitpacking, RLE, LZ77, Huffman (though thats still buggy sometimes :( )
  • C, asm, binary, gbfs formats; header optional. u8, u16, u32.
All the actual exporting code is already there, I just need the command-line parser, and maybe some extra safety code for dying gracefully.

#62988 - gauauu - Wed Dec 07, 2005 3:38 pm

Wow, great!

Thanks for letting us know....and thanks for the nice tool!

#71543 - gauauu - Mon Feb 13, 2006 9:55 am

Well, as Cearn is working through improving his exporter, I got impatient, and implemented the command-line features I needed myself, since he was kind enough to provide the code for wingit (which uses the same exporter as usenti).

From my website, you can download what I call wingitCLI -- a command line interface to Cearn's exporter. http://www.tolberts.net/wingitCLI.zip

To use it, you'll need to download the FreeImage dll. (sorry, I was too lazy to statically link it in).

I didn't include a help file, but you can figure it out pretty easily by just running it with no options, or taking a look at the source.

In the zip file, I included the source files that I added. The other sources you can get directly from Cearn's website

Also, I didn't do any extensive testing, and it was very much a hack-together job, so I'm making no claims to the quality. And I guess since wingit was under a GPL license, my code is too :)

Anyway, enjoy. Thanks, Cearn!