*.spr and *.pal

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
ilovechii
beginner
Posts: 21
Joined: Tue Aug 12, 2014 5:49 pm
Has thanked: 2 times
Been thanked: 4 times

*.spr and *.pal

Post by ilovechii » Fri Jan 11, 2019 2:28 am

Hi,

Someone can help me in read *.spr files? I added *.pal files too, because I think this files use theses palettes.

Download: https://drive.google.com/file/d/1VYZxz8 ... sp=sharing

I already tried to use TextureFinder.

About HEADER of the *.spr files, I think it's something like:

Header
- sizeX
- sizeY
- totalLength

Cheers!!

User avatar
Acewell
VIP member
VIP member
Posts: 1226
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2365 times
Been thanked: 707 times

Re: *.spr and *.pal

Post by Acewell » Sat Jan 12, 2019 3:20 am

i took a quick look and i don't know how the pal files relate to the spr files, but
the spr files have what looks to be a 32bit color palette and a 16bit color palette
with the same amount of colors in each already.
i will look into these a bit more later. :D
what is the full game name and platform from which the samples came?

ilovechii
beginner
Posts: 21
Joined: Tue Aug 12, 2014 5:49 pm
Has thanked: 2 times
Been thanked: 4 times

Re: *.spr and *.pal

Post by ilovechii » Sat Jan 12, 2019 6:54 pm

Acewell wrote:i took a quick look and i don't know how the pal files relate to the spr files, but
the spr files have what looks to be a 32bit color palette and a 16bit color palette
with the same amount of colors in each already.
i will look into these a bit more later. :D
what is the full game name and platform from which the samples came?
Yo @Acewell,

Name of the game is The Great Merchant (https://www.thegreatmerchant.com/) and Windows. This game uses own graphics engine (DX7), it is very old around the years 2004 ~ 2005.


I got something because I decompiled SPR Viewer (a koren tool used in this game). But my problem now is with *.s32 files, I already saw in another forum *.s32 file is related to TGA (32bit).

SPR Viewer:
https://drive.google.com/file/d/13fPk_w ... sp=sharing

Can you help me with *.s32 files?
Cheers!

User avatar
Acewell
VIP member
VIP member
Posts: 1226
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2365 times
Been thanked: 707 times

Re: *.spr and *.pal

Post by Acewell » Tue Jan 15, 2019 4:33 am

ah, i should have known these might be sprites from the spr
extension, i tend to not trust extensions any more though. :D
what i thought was a color palette looks like an offset table now. (:

S32 files look the same as the spr to me except they store 32 bit data,
i'm no good with sprite data though so i don't think i can help. :(

fortunately that "SPR Viewer" program is written in .NET so it can be decompiled to source code. :D

Apollo
veteran
Posts: 130
Joined: Sat Oct 21, 2006 12:58 pm
Has thanked: 5 times
Been thanked: 20 times

Re: *.spr and *.pal

Post by Apollo » Tue Jan 15, 2019 8:03 am

Just my few cents having looked a little.

pal files are standard vga 6-bit palette, the spr/s32 files format header is simple, first byte is seemingly format byte to be followed by width and height and the count.
However thats where things get dicey, actual data is compressed in both cases seemingly as math wise it won't match data size, the s32 files seem(?) to be using standard 4 byte RGBA information per pixel as expected but at very least the transparent space is RLEd or otherwise compressed if main data is not. If assume s32 relates to TGA, it could use TGA's scheme of compression packets would be 127 value long at max, whether raw or compressed packet.

EDIT: hmm yeah .spr files do check out, they use simple RLE scheme for compression thanks to checking the art with sprview but s32 files..hmm..ah..I don't think it's necessarily using tga method but it does use RLE seemingly too, just changed from .spr, would need programmer test encoding theorys out for s32.

Start of the spr and s32 files after header uses some kinda offset table or whatever data with lots of zeroes and is not the main interest besides figuring where each frame data starts.

Not sure what you need something this old and low quality game arts for tho.

herbert3000
veteran
Posts: 132
Joined: Wed Jun 02, 2010 4:53 am
Has thanked: 16 times
Been thanked: 134 times
Contact:

Re: *.spr and *.pal

Post by herbert3000 » Sun Jan 27, 2019 2:04 am

Code: Select all

ICE_EAGLE.S32

@0x00: header:
19 00 00 00 	unknown
4C 00 00 00 	sprite width
4F 00 00 00 	sprite height
1E 00 00 00 	num of sprites


@0x4C0: sprite offset table
00 00 00 00 
88 10 00 00 
08 21 00 00 
D4 30 00 00 
...


@0x970: unknown table
22 04 00 00 
20 04 00 00 
F3 03 00 00 
E5 03 00 00 
...


@0xE20:
98 BD 01 00 	total length of pixel data
F8 02 00 00 	spritesheet width
ED 00 00 00 	spritesheet height

	2F8 / 4C (sprite width) = A
	ED / 4F (sprite height) = 3
	A * 3 = 1E (number of sprites)


@0xE4C: start of pixel data (offset 0)

transparent pixels are encoded in the format 00 XX 00 00 (where XX is the number of transparent pixels)
The line
00 19 00 00 05 51 50 4D 08 51 52 50 00 31 00 00
means
00 19 00 00 	0x19 transparent pixels
05 51 50 4D 	RGBA pixel
08 51 52 50 	RGBA pixel
00 31 00 00 	0x31 transparent pixels

Post Reply