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

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







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


Reply
 
Thread Tools Display Modes
  #1  
Old October 29th, 2024, 07:33 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,415
Thanks: 103
Thanked 649 Times in 433 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

Thanks for the testing; I've been so focused on making sure that everything decompresses/compresses in SHPEd as a "major sanity check"; that I haven't done testing in the actual game(s) yet.

Did a slight detour away from file compression issues (after spending so long bashing my head against it) and went back into designing usability features.

EDIT:

I think I may have fixed the distorted images:

In my SHPView_sHeaders.js file I had this:

Quote:
function readImageHeader(dataView, offset, imageNumber)
{
// SHP Image Header: 24 bytes long

const height = dataView.getUint16(offset + 0, true) +1;
const width = dataView.getUint16(offset + 2, true) +1;

const var1 = dataView.getInt32(offset + 4, true); // Use getInt32 to allow for negative numbers
const xStart = dataView.getInt32(offset + 8, true); // Use getInt32 to allow for negative numbers
const yStart = dataView.getInt32(offset + 12, true); // Use getInt32 to allow for negative numbers
const xEnd = dataView.getInt32(offset + 16, true); // Use getInt32 to allow for negative numbers
const yEnd = dataView.getInt32(offset + 20, true); // Use getInt32 to allow for negative numbers

// Include the image number in the log message
conditionalLog(`Image ${imageNumber} Header - Height: ${height}, Width: ${width}, Var1: ${var1}, xStart: ${xStart}, yStart: ${yStart}, xEnd: ${xEnd}, yEnd: ${yEnd}`); // only if verbose logging included.

return { height, width, var1, xStart, yStart, xEnd, yEnd };
}
Removing the +1 from height & width in that function made things show up inside the game + MOBHack for me with no skewed icons.

I then rewrote Icon0128.shp for MBT; doing a test with replacing

{12800, 12801}, //4948. SPW-60PB DDR *********NEW

with a Caesar like SPH icon



Transparency no good in the "zoom out" icon, but seems to work in the zoom in feature.

I then skipped down to an icon in Icon0128.shp that I did not edit:

{12810, 12811}, //4953. 2S1 Gvozdika Ukraine *********NEW winSPMBT v16

It exhibits the same issue:



So I guess I need to look at palette mapping codes....

Last edited by MarkSheppard; October 29th, 2024 at 08:06 PM..
Reply With Quote
  #2  
Old October 29th, 2024, 08:06 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,415
Thanks: 103
Thanked 649 Times in 433 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

Some more investigation...

At one specific zoom level; I get the flashing/cycling gray box where it should be transparent, but at all other zoom levels (I think) I have transparency:



Also, if you rotate the unit; the flashing area disappears:



Current code is attached (As always, password is SPCAMO)
Attached Files
File Type: zip SHPView_v0-83-5_29-OCT-24.zip (84.2 KB, 84 views)

Last edited by MarkSheppard; October 29th, 2024 at 08:17 PM..
Reply With Quote
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 05:19 PM.


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