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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT
Notices


 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old October 18th, 2024, 09:12 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,376
Thanks: 101
Thanked 618 Times in 409 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

I think I may have finally generated correct working SHP decompilation code. It correctly renders a lot of stuff including AOR and PG SHPs which did not render correctly before.

EDIT: It all comes down to the SHP header data.

xStart and yStart in the SHP Icon Headers are irrelevant in Steel Panthers; because everything always begins in the upper left corner of the SHP file, whether it's a screen image, button, or unit icon.

But in Age of Rifles; because of the extensive use of paperdolls with multiple SHP images overlaid over each other; some way of "offsetting" x/y had to be done:



AHA!

It's because Steel Panthers uses the xStart and yStart SHP header variables differently than other SSI programs -- in Steel Panthers, this is used to place the turret and hull offsets to place icons centered on the battlefield.

I need to go look deeper into Fred's code; to see if he had any flags that recognized a Steel Panthers SHP image and treated it differently than a "regular" SSI SHP

EDIT: I figured it out.

SHPs that are used in transparent "paper dolls" have POSITIVE numbers for xStart + yStart.

SHPs that use xStart + yStart to store centroid information for turret placement are NEGATIVE numbers; and this is how SSI differentiated between them, while maintaining compatibility

Last edited by MarkSheppard; October 18th, 2024 at 09:59 PM..
Reply With Quote
The Following 2 Users Say Thank You to MarkSheppard For This Useful Post:
 

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 04:44 AM.


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