Thought I'd cross-post from here:
http://www.arcengames.com/forums/index.php/topic,8546.msg75823.html#msg75823Will the sprite dictionary also be used for the animated effects? (if so i do hope you release your gdi tool to align the single sprite png's... ;p)
I forgot to mention, but yes, all the sprites in the game are now in sprite dictionaries -- it saves even more RAM, VRAM and texture swaps with them, since usually you have many in a row that are at various stages of animation. Bear in mind I'm talking here about the individual particles exported from particle illusion that are used to make compound effects, not the actual compound effects themselves, of course. The main component of the fireball effect, with all its frames, is attached as one example (it's a two-image sprite dictionary).
I don't mind at all sharing the tool and the code for it, I've thought about doing just that, but the main problem is that it's really specific to my needs at the moment; it only does dictionaries in powers of two images, and it prefers to do two smaller images (say, two 512x512 images) instead of one larger image (one 1024x1024 image) when it can, since the total number of pixels quadruples each time you go up a size, and that wastes more RAM and disk space, ultimately. This whole thing also only works with PNGs, because that's all I needed; it's not a general-purpose tool. It also requires .NET 2.0.
Anyway, I've attached both the executable and the source code in two attachments here, so you're welcome to them if you want. A few other notes:
1. Min Combine Size sets the minimum size of dictionary frames it will use. So if your frames are actually 30px large at the largest, but you want them centered in 64px for some reason (I had to do this with the side-facing bat poses, for instance), you can set 64px and then the frame sizes will match those of your other stances, for instance.
2. To do the dictionary, hit Process Combine once you've put in a directory (when you click the textbox, it automatically pastes from the clipboard, to save some keystrokes). It's
nondestructive, in that it will put in some new images based on your existing PNGs.
3. Scale Character will scale and entire folder larger sprites down to the size set in the Scale To textbox. It analyzes the entire non-transparent width/height of all the sprites in that folder when determining what offsets to place each one at in the reduced images. That's what I was talking about above for the characters, for instance. This is a
destructive process -- it alters your existing images, so make sure you have a backup before you do this! I always run it on a secondary folder I've created just for that purpose.
4. Process Rename is what my original function of this program was, and it just looks in a folder and renames all the files to be FolderName.png, FolderName2.png, FolderName3.png, etc. This is handy when converting from the number format from one program (they are all different) to the specific format I was using before I started doing sprite dictionaries (thus making this no longer really needed).
5. Process Duplicate is identical to Process Rename, except that it also duplicates all of the frames in a series except the first and last, in reverse order. So if you have frames 01234556789, and really you need that to loop in a specific fashion in a dictionary, you can use Process duplicate and not only will it do what Process Rename does, but it will also duplicate things so that your sequence is 012345678987654321, and then it's ready to loop again at 0 seamlessly.
So hope that's of some help, but bear in mind it's not a general-purpose tool at the moment (though the source code is there, so folks can do with that what they will).