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

This Month's Specials

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

   







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


Reply
 
Thread Tools Display Modes
  #1  
Old October 21st, 2024, 07:31 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is online now
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,407
Thanks: 103
Thanked 641 Times in 427 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

Still haven't cracked the SHP recompression code; but I'm close to cracking the SPHeader fix code.

As requested, you can double click on the location to get into the gross area of where you want your new centroid to be; and then use the +/- buttons to dial in the exact location.

The "write header to all icons" is for when you have a massive collection of 40 x P-51 mustang icons in that SHP and they all have the same basic centroid.

EDIT: Further work will have to wait for later; everything here so far is a proof of concept working on a massively kludged system; I have to go back and refactor more code to make storing/editing the new header data easier and actually doable.


Last edited by MarkSheppard; October 21st, 2024 at 07:54 PM..
Reply With Quote
The Following 2 Users Say Thank You to MarkSheppard For This Useful Post:
  #2  
Old October 21st, 2024, 09:18 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,610
Thanks: 4,053
Thanked 5,808 Times in 2,865 Posts
DRG will become famous soon enough
Default Re: Next Generation SHP Viewer

Quote:
Originally Posted by MarkSheppard View Post
; everything here so far is a proof of concept working on a massively kludged system
Funnily enough if it was not for kludges made to work the game would not exist
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc
Reply With Quote
  #3  
Old October 22nd, 2024, 09:31 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is online now
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,407
Thanks: 103
Thanked 641 Times in 427 Posts
MarkSheppard is on a distinguished road
Potion Re: Next Generation SHP Viewer

Here's version 0.80 -- chosen because it's 80% of the way there; that last 20% will be probably quite difficult.

As before, the password is SPCAMO.

Changes with this version:

1.) More accurate SHP file decoding than previous versions.

2.) You can now edit SP Header files; either by typing in the data yourself, double clicking on the general area you want the centroid to be, and/or using the buttons to fine tune the centroid placement.

BIG NOTE: Currently, the SP Header edit (right click and choose SHOW ICON SP HEADER DATA) has options that are not data friendly.

For example, we have

Write Header to this Icon
Write Header to 'N' Icons
Write Header to This + Alternating Icons

Buttons.

The last two are "extras" to make writing 35 icons of the same exact type (i.e. 35 versions of the same P-51D Mustang) simpler and save you time.

The current implementation when it's used for write header to 'N' icons just copies the "bounding box" -- the last two variables in the SHP header -- xEnd and yEnd -- from the icon in the pop up menu to the next 'N' icons.

It works great if the bounding boxes (i.e. rightmost+bottom-most pixel that is not transparent) are the same. But what happen if the bounding boxes are not the same; i.e. we take the bounding box from a hull icon and paste it over a turret icon?


(Image from SHPEd)

Yeah, that happens.

I need to revise (in the future) the "paste into N" buttons to include a 'recalculate bounding boxes on the fly' function to eliminate this possible failure mode.

But I wanted to get this out for input and testing.
Attached Files
File Type: zip SHPView_v0-80.zip (72.8 KB, 229 views)

Last edited by MarkSheppard; October 22nd, 2024 at 09:48 PM..
Reply With Quote
The Following 2 Users Say Thank You to MarkSheppard For This Useful Post:
  #4  
Old October 22nd, 2024, 09:47 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is online now
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,407
Thanks: 103
Thanked 641 Times in 427 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

Sharp eyed people may notice a "Replace SHP Image" option in the right click menu that has functionality that lets you select images to replace an existing SHP icon with.

You can then set the replacement SHP image's header with SHOW SHP HEADER DATA.

What's remaining to do is the last major hurdle -- trying to figure out how to get this thing to do correct SHP compression and then reassembly so that the Replace SHP Image is actually useful, and not just a tech demo.

Last edited by MarkSheppard; October 22nd, 2024 at 10:11 PM..
Reply With Quote
The Following 2 Users Say Thank You to MarkSheppard For This Useful Post:
Reply

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 10:29 PM.


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