This is a quick&dirty Windows application that can convert PNG image files to the new SMSQ/E file format. Unlike most other converters it can handle the alpha channel information of the PNG format and can thus create SMSQ/E sprites with transparency.
The program is provided “as-is” without any warranty of any kind. I did this program for my own developments and thought that you might enjoy it, too. Feedback is welcome but I must say upfront that I will probably have no time to significantly improve it.
The program makes use of the PNGLib library. This is supplied along in form of a DLL and should reside in the application directory.
You can use the program free of charge. I however prohibit to redistribute it, it is also prohibited to link directly to the ZIP file. You may however set a link to this page.
Download the sprite converter here: pngconv104.zip (v1.04, Windows 32-bit)
Version 1.03 is just a port to a later Delphi version. It doesn’t need the accompanying DLL anymore.
The file selection mechanism is pretty obvious, I think. Noteable is that by holding down the shift key you can select several file and this way do a batch process when hitting the “Convert” button. There’s a preview window that shows the currently selected file.
You have the choice between “Assembly” and “Binary”. Binary directly outputs a complete _spr file that can directly be used in SMSQ/E. “Assembly” output the assembler source for the sprite.
“_” Ext. sep. determines whether the resulting extension is “_spr” or “.spr”.
You have the choice between 8, 16 and 32 bit mode. 32 bit mode is mostly just big and doesn’t really offer any advantage. 8 bit mode might degrade image quality (preview does always show the unprocessed PNG file, not how
the result will look like).
Choice between “Bitmask”, “Alpha” and “Solid”. Bitmask is only of use for sprites with hard transparencies. Except probably a marginal speed gain when drawing a sprite it doesn’t really offer many advantages over the “Alpha” mode. It also needs more memory. “Solid” means that no mask will be produced, which SMSQ/E from version 3.10 on will interpet as a completely opaque sprite. Those sprites can be drawn very quickly and have the least memory consumption of the 3 choices.
The “RLE compression” option compresses the sprite using the RLE mechanism built into SMSQ/E. Drawing a sprite with RLE compression enabled might temporarily need a bit more memory and is a bit slower than one without. But the space saved, especially on sprites with a largely monotonous mask is often worth the trouble.
“Add shadow” does exactly what it says, it computes a soft shadow for the given sprite. Useful when creating new mouse pointers. This shadow does not appear in the preview.
You can specify a name that is used for the labels when generating assembler source code. If no name is specified the filename without extension will be used.
Also you can specify what origin the sprite is supposed to use. If set to “-1” the middle of the sprite it taken as the origin.
Well, that’s it already. I hope you enjoy the program and to see many new colourful sprites in the future.