Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 9:00 pm
All times are UTC + 0
RA1 mouse.shp
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
pd
Laser Commando


Joined: 19 Jun 2005
Location: Gone

PostPosted: Thu Nov 21, 2013 8:14 am    Post subject:  RA1 mouse.shp
Subject description: Decoding that thing
Reply with quote  Mark this post and the followings unread

Since it doesn't seem like it's documented anywhere: what format is Red Alert's "mouse.shp" in?

I know VK decoded it at some point, but didn't share the sources. I know the OpenRA guys must have decoded it somehow, but I'm not really keen to hunt through all of their sources right now. Their "Dune2ShpReader", however, seems to read it the way I assume it to be encoded. Is RA's "mouse.shp" in Dune2k SHP format?

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Nov 21, 2013 2:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's in pure Dune2 format., not Dune2k.

I have a source from a redhorizon project, (can't remember where I found it) which says the following about it:

Quote:

/*
* ======================
* Dune 2 SHP file format
* ======================
*
* The Dune 2 SHP file, is a multiple image filetype, where each image can have
* it's own set of dimensions.  The file is structured as follows:
*
* File header:
*   NumImages (2 bytes)    - the number of images in the file
*   Offsets[NumImages + 1] - offset to the image header for an image.  The last
*     (2 or 4 bytes each)    offset points to the end of the file.  The offsets
*                            don't take into account the NumImages bytes at the
*                            beginning, so add 2 bytes to the offset value to
*                            get the actual position of an image header in the
*                            file
*
* The size of the offsets can be either 2 or 4 bytes.  There is no simple way
* to determine which it will be, but checking the file's 4th byte to see if
* it's 0, seems to be a commonly accepted practice amongst existing Dune 2 SHP
* file readers:
*
* eg: A 2-byte offset file: 01 00 06 00 EC 00 45 0A ...
*     A 4-byte offset file: 01 00 08 00 00 00 EC 00 ...
*                                       ^^
* The marked byte will be 0 in 4-byte offset files, non 0 in 2-byte offset
* files.
* Lastly, like C&C SHP files, there is an extra offset, pointing to the end of
* the file (or what would have been the position of another image header/data
* pair).
*
* Following the file header, are a series of image header & image data pairs.
* The image header is structured as follows:
*
* Image header:
*   Flags (2 bytes)    - flags to identify the type of data following the
*                        Datasize field, and/or the compression schemes used
*   Slices (1 byte)    - number of Format2 slices used to encode the image
*                        data.  Often this is the same as the height of the
*                        image
*   Width (2 bytes)    - width of the image
*   Height (1 byte)    - height of the image
*   Filesize (2 bytes) - size of the image data in the file
*   Datasize (2 bytes) - size of the image data when Format2 encoded/compressed
*
* Regarding the flags, there seem to be 4 values:
*  - 00000000 (0) = Decompress with Format80, then Format2
*  - 00000001 (1) = (see 3)
*  - 00000010 (2) = Decompress with Format2
*  - 00000011 (3) = A small 16-byte lookup table follows, and the image data
*                   should be decompressed with Format80 then Format2.
*  - 00000101 (5) = The first byte gives the size of the lookup table that
*                   follows, and the image data should be decompressed with
*                   Format80 then Format2.
*
* And after this image header is the image data.
*/

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
pd
Laser Commando


Joined: 19 Jun 2005
Location: Gone

PostPosted: Fri Nov 22, 2013 9:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks!

And sorry, I keep confusing "Dune2" and "Dune2k" because frankly, I have never played either of those games. Embarassed

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Nov 22, 2013 12:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dune2k is a remake of Dune 2 on a highly customized, Red Alert-derived engine. Just sayin'. #Tongue

Meanwhile I found out that OpenRA guys also used this redhorizon documentation for their implementation.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Fri Nov 22, 2013 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
Dune2k is a remake of Dune 2 on a highly customized, Red Alert-derived engine. Just sayin'..


Its actually not based on any of the Pre SAGE engines, it is in fact a new engine and only contains some code from the WWLib, mostly the VQA lib.

Back to top
View user's profile Send private message
Reaperrr
Commander


Joined: 26 Apr 2003
Location: Somewhere in Germany

PostPosted: Fri Nov 22, 2013 3:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

CCHyper wrote:
Graion Dilach wrote:
Dune2k is a remake of Dune 2 on a highly customized, Red Alert-derived engine. Just sayin'..


Its actually not based on any of the Pre SAGE engines, it is in fact a new engine and only contains some code from the WWLib, mostly the VQA lib.

Yeah, most people don't seem to know that D2k and E:BFD were made by external studios contracted by WW (just like Kane's Wrath). That's why the D2k engine is more advanced than TS in some areas (scrolling while selecting, 24-bit images).

Back to top
View user's profile Send private message Send e-mail
pd
Laser Commando


Joined: 19 Jun 2005
Location: Gone

PostPosted: Fri Nov 22, 2013 6:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Gee, I find it weird how this format practically does a two-layer runtime length encoding... anyway, I got it decoded, thanks again! Smile
Frame #35 is all black, I suppose that is correct?  Confused

Back to top
View user's profile Send private message
Matthias M.
Stealth Laser Trooper


Joined: 15 Jun 2012
Location: Germany

PostPosted: Mon Dec 23, 2013 11:14 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1519s ][ Queries: 11 (0.0075s) ][ Debug on ]