	S p r i t e G e n   v1.0
		by
	Jorrit "Mercator" Vermeiren
	http://www.civgaming.net/mercator
	jorrit_v@hotmail.com


SpriteGen is a utility for Civilization II: Test of Time that generates a "static" sprite file from a given units bitmap.

Use the textbox at the top, or the accompanying "Browse..." button to locate a units bitmap. Click "OK" to create the sprite file, click "Exit" to quit SpriteGen.

The initial purpose behind SpriteGen was to hide the health bar (= unit key). So for each of the 81 units you can select which units should have their health bar hidden.

Hiding the health bar is achieved by increasing the height of the unit icons. So, additionally, you can choose which height you want the units to get.


UNIT HEIGHT
I've added a small drop-down box so you can choose how high you want the units without health bar to be.

Here are a few things to keep in mind:
- With increasing unit height the health bar is positioned higher, but the unit itself will also become invisible at the higher, more zoomed-in, zoom levels. The taller the unit, the more zoom levels will be affected.
- 512 is the maximum height at which the unit icon is still visible at all zoom levels.
- 1024 is the maximum height at which the unit icon is still visible at the standard zoom level (Shift+Z in Civ2).
- 640 pixels is enough to make the health bar disappear from view (assuming a screen resolution of 1024x768 and the standard map layout). If you were using the older civ2 layout (status bar on the right), the unit should be 768 pixels high. For a screen resolution of 1280x1024 these values would be 832 (standard map layout) and 1024 (old layout).

I decided 768 would be a safe height to start with. But if you want to be sure the health bar is invisible at higher resolutions as well, you can do so. Just remember that it will go at a cost.

TRANSPARENCY
First of all, SpriteGen will only treat two colors as transparent. Magenta and the color of the top-left pixel of a unit. The latter can be different for each unit.

Secondly, Test of Time graphics are 15-bit, in contrast with your 24-bit unit bitmaps. To put it differently, Test of Time only recognizes 32 different shades of red, green and blue, not 256 as is the case with 24-bit graphics.

This should be of little interest, except in the case of the transparency colors. Think of it as if Test of Time treats a range of colors as transparent, rather than one single color.

If you want to be sure a color is not transparent, make sure at least one of the RGB values is at least 8 shades different from the two transparency colors.

E.g. rgb(255, 0, 255) is the RGB value of magenta, rgb(255, 5, 255) will also be transparent, but rgb(255, 8, 255) won't be transparent.