.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Star & the Crescent- Save $9.00
winSPWW2- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old November 4th, 2006, 01:06 AM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default I can\'t extract the sprites from the .exe

Maybe I'm just being dense, but I'm posting this so that no-one else has to duplicate my wasted effort . 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 .

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.
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:22 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.