So I finally got sick of converting bitmaps with a pen and paper and wrote a script to do it for me.
This script takes a bitmap, splits it down into whatever size meta-tiles you want, then outputs it into tile data you can include straight into your source code.
It'll work with any size tiles you specify, the default is 16x16 but you can do 8x8, 16x16, 32x8, it'll even do 10x93 if you want it to. Just make sure your image is actually divisible by the tile size. If you split a 100x100 px image into 8x8 tiles, you'll get weird results.
As always, I don't presume this is the best method of producing these results. This script is linux only and requires imagemagick to be installed. You can probably get it to run under cygwin, but you're on your own for that.
I've included sample input and output if you want to try it out: http://cinematicbazaar.com/?p=111
There is one limitation to the script. If a meta-tile is only used once in the original bitmap, it won't be included in the data file. This was intentional to keep the script from counting the original bitmap as a tile itself. So make sure each tile is used at least twice and you'll be fine.
I'm going to drag linux kicking and screaming into NES development one way or the other... even if I do have to write all my own tools.
This script takes a bitmap, splits it down into whatever size meta-tiles you want, then outputs it into tile data you can include straight into your source code.
It'll work with any size tiles you specify, the default is 16x16 but you can do 8x8, 16x16, 32x8, it'll even do 10x93 if you want it to. Just make sure your image is actually divisible by the tile size. If you split a 100x100 px image into 8x8 tiles, you'll get weird results.
As always, I don't presume this is the best method of producing these results. This script is linux only and requires imagemagick to be installed. You can probably get it to run under cygwin, but you're on your own for that.
I've included sample input and output if you want to try it out: http://cinematicbazaar.com/?p=111
There is one limitation to the script. If a meta-tile is only used once in the original bitmap, it won't be included in the data file. This was intentional to keep the script from counting the original bitmap as a tile itself. So make sure each tile is used at least twice and you'll be fine.
I'm going to drag linux kicking and screaming into NES development one way or the other... even if I do have to write all my own tools.