View Full Version : I can't extract the sprites from the .exe
Singularity24601
November 4th, 2006, 01:03 AM
FrankTrollman said:
If so I could probably make a library of tga's for modders.
I second in saying that this would be the coolest thing ever.
-Frank
Indeed! The great majority of my modding time is currently spent on extracting exact sprites - and I've only completed a handful.
DrPraetorious
November 4th, 2006, 01:06 AM
Maybe I'm just being dense, but I'm posting this so that no-one else has to duplicate my wasted effort http://forum.shrapnelgames.com/images/smilies/happy.gif. The long story short - the dom3 executable is only 5 MB, so they obviously aren't using .tga or .rgb to store O(2000) sprites.
Has anyone else had any success *finding* all the unit sprites buried in the executable itself?
I started on the assumption that all the unit sprites would have little .rgb or .tga headers.
So, I find specifications, here they are:
http://www.fileformat.info/format/sgiimage/
http://www.fileformat.info/format/tga/egff.htm
rgb file headers are supposed to start with the "magic number", 474. That'd be 0x01DA - and yes, the .rgb map files generated by the random map generator start with 01DA. Unfortunately 01DA only appears twice in the executable.
So, either the internal sprites aren't in rgb format, or they are, but part of the header is stripped off. Don't these guys know that programmer time is far more valuable than incremental performance improvements!?!?
TGA file headers don't have any magic numbers in them - so I'll try to find some headers in some custom sprites that Frank drew, and hope they're the same.
The header of a .tga file is 18 bytes long. I figure if any of this header info is retained, it'll be the size of the sprite, which is bytes 13-16 of the header.
This is 0x00800018 from Frank's .tga sprites.
Unfortunately, 00800018 doesn't appear at all in the executable http://forum.shrapnelgames.com/images/smilies/frown.gif.
The actual begining of Frank's .tga sprites is:
00 00 02 00
So, I counted those occurences - 1,478. That sounds (about) right, there are O(1000) units, 2 sprites each but many of them share sprites, so I tried splitting on 00 00 02 00.
I get 1,478 "tga" files but I can't actually open any of them. On examination I notice they're much too small.
This is when I did the math - Frank's .tga sprites are 50K each. 1000 such sprites would be 50MB. The dom3 executable is 5MB. Boy do I feel stupid.
trees.r3f is about the right size, though.
It has only 523 "00 00 02 00" in it (and no 01 DA) and I'm pretty sure this file is full of background wireframes for the tactical maps.
Ah well.
paradoxharbinger
November 4th, 2006, 01:12 AM
if the sprites are being stored in the exe, they probably know exactly where the are and what format they are in so they would have no need for headers, just the raw data and the dimensions
Gandalf Parker
November 4th, 2006, 01:16 AM
They arent in the exe.
Mostly its the files that start with 'army' which if you are lucky might be the same format
Kristoffer O
November 4th, 2006, 01:24 AM
They are army.trs etc. It is no conventional format and is only used in JK's own program spooky sprites. I don't know anything about formats, but I suspect it might be difficult to extract them. It is possible to make tga's from the sprites in spooky, but I'm not sure if you can extract a whole bunch at a time. If so I could probably make a library of tga's for modders.
Agrajag
November 4th, 2006, 02:23 AM
Kristoffer O said:
If so I could probably make a library of tga's for modders.
If you would do so you will be worshipped as a god even more than you were before http://forum.shrapnelgames.com/images/smilies/happy.gif
FrankTrollman
November 4th, 2006, 02:38 AM
If so I could probably make a library of tga's for modders.
I second in saying that this would be the coolest thing ever.
-Frank
DrPraetorious
November 4th, 2006, 02:49 AM
http://groups.google.com/group/comp.sys.atari.announce/msg/73a37bb567c2bed2?dmode=source
Whoah, an Atari Falcon. That takes me back. My parents wouldn't buy me one, but a couple of my friends had those.
If I can find an Atari Falcon emulator (check) and one that supports scripted input (not bloody likely) and then get a copy of JK's old freeware version of Spooky Sprites then, assuming the binary format he uses is the same, and assuming the old version supports extracting files into any sort of bitmap.... hmm....
Nerfix
November 4th, 2006, 03:12 AM
It's a holy relic from a bygone age! :O
Endoperez
November 4th, 2006, 03:33 AM
Nerfix said:
It's a holy relic from a bygone age! :O
Indeed! Praetarius, that was a great find!
fmunoz
November 7th, 2006, 08:45 AM
Some time ago I created a gimp perl plugging to extract the dominions:PPP images from the files.
I was able to get the item files almost pefectly, they just were stored with no compression, 1 byte per pixel using 2-3bits per colour channel (or just got lucky with the colours).
IIRC the unit files had some sort of pallette and a kind simple of RLE. I got the centurion (was the 1st one) mostly ok from the 1st army.trs file, the other files used another set of colours.
The script got lost in a format&write-wrong-partiton accident so was never posted anywhere...
So start your hex editors to check the files and show your ninja coding skills.
http://en.wikipedia.org/wiki/Run-length_encoding
Singularity24601
November 7th, 2006, 11:29 PM
Kristoffer O said:
They are army.trs etc. It is no conventional format and is only used in JK's own program spooky sprites. I don't know anything about formats, but I suspect it might be difficult to extract them. It is possible to make tga's from the sprites in spooky, but I'm not sure if you can extract a whole bunch at a time. If so I could probably make a library of tga's for modders.
http://groups.google.com/group/comp.sys.atari.announce/msg/73a37bb567c2bed2?dmode=source
You may now create a picture containing all sprites.
If it's possible to create a single image containing all the sprites, that could be a quick and simple way of providing all the sprites for modders and would be entirely sufficient (especially if lateral offsets in each sprite are preserved or somehow inferrable) in my opinion - modders can crop out individual sprites as needed.
Endoperez
November 8th, 2006, 05:41 AM
http://www.btinternet.com/~AnthonyJ/Atari/stos/falcextn.html
tc sprite x,y,n,scr,spr
This instruction draws a sprite created with Spooky Sprites (by Johan Karlsson - d92jk@efd.lth.se ) in true colour mode. X and Y are the co-ordinates at which to plot the sprite. N is the number of the sprite to draw. SCR is the address of the screen, and SPR is the address of the sprite bank.
Spooky Sprites v 6 available from here:
http://www.btinternet.com/~AnthonyJ/Atari/falc_download.html
Anyone knnow anything about Atari? This is your chance to prove its power! http://forum.shrapnelgames.com/images/smilies/wink.gif
Singularity24601
November 8th, 2006, 08:49 AM
The download URL seems broken. Does anyone have the file?
Maltrease
November 13th, 2006, 03:53 PM
Has anyone explored this further? This approach would be MUCH better then my planned automated screen shot capture method.
Agrajag
November 13th, 2006, 04:21 PM
I guess everyone is hoping KO will come through and save us all the trouble http://forum.shrapnelgames.com/images/smilies/happy.gif
Endoperez
December 14th, 2006, 08:38 PM
spooky4.lzh extracted and re-packed into spooky4.zip.
Anyone up to launching this old, old version of Spooky Sprites and seeing what happens?
Found from here:
http://www.umich.edu/~archive/atari/Falcon/Graphics/
Maltrease
December 15th, 2006, 12:28 PM
If someone is able to get this software working well enough to extract 1 sprite I can probably build a macro that can automate mouse movement, clicks and sending keys to the program.
So assuming you have to manually extract each sprite (vs having some kind of batch command) I could likely setup something to "batch" it.
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.