 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Sir Ralph
|
 |
Long live teh Schwampel!
Dec 2001 time: 06:13
|
|
Thanks IW. That's indeed valid C code, obviously for Microsoft Visual C++. It doesn't compile yet, because it has six undefined symbols (in fact it has much more, but the rest I could easily figure):
Pixel32 - a data type (may be unsigned integer 32 bit?)
Pixel16 - a data type (may be unsigned integer 16 bit?)
g_is565Format - a boolean variable (true or false)
spriteutils_AveragePixel32() - a function
RGB32Info() - a function
RGB32Components() - a function
I will look into it, when I get the time, but it may last a while.
Edit: spriteutils_AveragePixel32() can also easily been figured, given it appears in a function named spriteutils_CreateQuarterSize(). Pixel32 is definitely a 32 bit integer, and Pixel16 a 16 bit integer. The rest remains a mystery so far... now back to the coding for what I'm paid.
Edit2: RGB32Components() was also not so hard to guess. Now, what shall the program do? Reverse the sprite building (make a bunch of pictures out of a sprite)? Or what?
Last edited by Sir Ralph on 03-05-2002 at 19:23
|
|
|  |
 |
|  |
 |
|  |
 |
|
Sir Ralph
|
 |
Long live teh Schwampel!
Dec 2001 time: 06:13
|
|
We'll see. Still the function RGB32Info() is missing. And the code shows only the translation of one picture (and not even complete), but the *.spr file has also headers and probably a block structure, which are not yet described. And about the script I also didn't care yet. Well, you already have a compiler (this MakeSpr.exe), so if I succeed to decompile the sprite, you could edit the files in a traditional graphics program like PSP meanwhile, may be later I or somebody else can unify all 3 parts (decompiling, editing, recompiling) in one program.
As to the reduced quality: It's no criticism and the sprites look ok, but take the "cow" example: the size of all source pictures added is 8.3 MB, the resulting sprite has 240 KB, and there is no compression (like Huffman or so) in the algorithm. Also, one pixel of the source files is 32 Bit (red, green, yellow and alpha each 8 bit), a pixel of the sprite seems to have only 16 bit and I don't know yet how R/G/B/A are distributed, may be there's even a 256 color cap.
Edit: After I had a look in it's inner part, i'm sure now, the SPR file is not strong compressed. Ways too much FF's in it, that can't be the typical compression "randomness". Hence, the size reduction is achieved only with quality reduction. At the start of the file is a 512 bytes array that looks like a color table, but has only 128 elements.
About the file format: Seems it must be a TIF file. I already downloaded a format specification (heck, they are even four different, not much of a standard) and at the first view it's quite complicated. I hope I can get along with it. If not, I can save at least BMP files, but the conversion will have to be done manually.
Last edited by Sir Ralph on 04-05-2002 at 02:46
|
|
|  |
All times are GMT. The time now is 05:13. Apolyton Time is 00:13. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|