:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat May 26, 2018 7:14 am
All times are UTC + 0
 Forum index » Featured Tools » Community Tools » SHP Shell Extension
New SHP viewer
Moderators: CnCVK
Post new topic   Reply to topic Page 1 of 1 [20 Posts] View previous topic :: View next topic
Author Message
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Sun Jul 02, 2006 1:51 pm    Post subject:   New SHP viewer Reply with quote

I write SHP Shell Extension for windows
But one problem with palette
How correctly to choose a palette for any shp file
If anybody have any ideas about it, write here


SHPFile2.png
 Description:
 Filesize:  60.17 KB
 Viewed:  13408 Time(s)

SHPFile2.png



Back to top
View user's profile Send private message Skype Account
Clazzy
Karma Police


Joined: 26 Nov 2002
Location: Algae Colony On Mars

PostPosted: Sun Jul 02, 2006 4:45 pm    Post subject: Reply with quote

I think the best method would be to guess based on what certain SHPs are like. For example, RA2 cameos are always 60x48 and TS ones are always 64x48. Anything with a huge amount of frames (i.e. above 300) is always an infantry unit (I've yet to encounter an SHP with so many frames that isn't), so it can default to unittem.pal. Naming patterns could be used, too. na***.shp or nt***.shp can differentiate between snow and temperate structures. Anything else with lots of frames that doesn't match anything of the above could just default to anim.pal, and certain specific things (i.e. mouse.shp, sidebar stuff) could just work by filename.
_________________
Quote:
This is sexier than what this forum was supposed to tolerate. - Banshee

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Jul 02, 2006 5:00 pm    Post subject: Reply with quote

The guess method is used in the OS SHP Builder 3.35. If you to read the code from it, its near the bottom of the SHP_Engine.pas file.

Back to top
View user's profile Send private message Visit poster's website Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Sun Jul 02, 2006 8:40 pm    Post subject: Reply with quote

Now I use:

LPSTR lpPreDef[] =
{"GLSLMD.SHP", "RADAR.SHP", "RADARY.SHP", "BKGDLGY.SHP", "BKGDMDY.SHP", "BKGDSMY.SHP",
"PUDLGBGN.SHP", "PUDLGBGY.SHP", "GRFXTXT.SHP"};
// Pre-defined palette file names
LPSTR lpPreDefPal[] =
{"\\GLSMD.PAL", "\\SIDEBAR.PAL", "\\RADARYURI.PAL", "\\UIBKGDY.PAL", "\\UIBKGDY.PAL", "\\UIBKGDY.PAL",
"\\DIALOGN.PAL", "\\DIALOGY.PAL", "\\GRFXTXT.PAL"};

static VOID GetPaletteName(LPSTR szTemp, LPSTR szFileName, INT dx, INT dy, INT frames)
{
BOOL b = FALSE;
CHAR szBuf[MAX_PATH];

GetFileName(szFileName, szBuf);
GetPathName(szFileName, szTemp);
for (INT i = 0; i < ARRAYSIZE(lpPreDef); i++)
{
if (lstrcmpi(szBuf, lpPreDef[i]) == 0)
{
lstrcat(szTemp, lpPreDefPal[i]);
b = TRUE;
break;
}
}
if (IsFileExist(szTemp) == FALSE)
b = FALSE;

if (b == FALSE)
{
CharUpper(szBuf);
lstrcpy(szTemp, szPath);
if (dx == 60 && dy == 48 && frames == 1) // RA2 Cameo
{
lstrcat(szTemp, "RA2\\Cameo.pal");
}
else if (dx == 64 && dy == 48 && frames == 1)
{
lstrcat(szTemp, "TS\\Cameo.pal");
}
else if ((szBuf[0] == 'G' || szBuf[0] == 'N' || szBuf[0] == 'C' || szBuf[0] == 'Y')
&&
(szBuf[1] == 'A' || szBuf[1] == 'G' || szBuf[1] == 'L' ||
szBuf[1] == 'D' || szBuf[1] == 'N' || szBuf[1] == 'T' || szBuf[1] == 'U'))
{
lstrcat(szTemp, "RA2\\unitsno.pal");
}
else
{
lstrcat(szTemp, "RA2\\Anim.Pal");
}
}
}

Back to top
View user's profile Send private message Skype Account
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Tue Jul 04, 2006 6:35 am    Post subject: Reply with quote

woah... awesome. Can't wait until you release this.

Would be more awesome if it includes SHP (TD) format though *hint* *hint* Wink


(as for making the difference between RA and C&C1 icons - the border is different, so the colour of the 1st pixel is palette entry 193 for C&C, and palette entry 15 for RA1. Of course in C&C1 you also have the Temperate/Desert problem...)
_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Tue Jul 04, 2006 10:56 am    Post subject: Reply with quote

First, I release Beta version for error fixing Sad
After two days it will be ready Smile

Back to top
View user's profile Send private message Skype Account
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Tue Jul 04, 2006 3:34 pm    Post subject: Reply with quote

I'm looking forward to it Smile
_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Tue Jul 04, 2006 3:49 pm    Post subject: Reply with quote

I add settings dialog Smile


settings.png
 Description:
 Filesize:  12.14 KB
 Viewed:  13242 Time(s)

settings.png



Back to top
View user's profile Send private message Skype Account
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Wed Jul 05, 2006 2:38 pm    Post subject: Reply with quote

awesome...

one thing though, could you please NOT zoom the SHP picture in the Properties window? It deforms the image.

It would be cool if you could change zoom from 100% to 200%, but I don't think many people will need more than that.
_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
ChielScape
General


Joined: 07 Mar 2006
Location: In ur BIOS, Steeln ur Megahurtz!

PostPosted: Wed Jul 05, 2006 3:41 pm    Post subject: Reply with quote

maybe 300, but thats already a bit excessive
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Thu Jul 06, 2006 7:57 pm    Post subject: Reply with quote

What do you think about two zoom stages: 100% and Fill in preview window Smile
Now I testing different SHP files ....
Fix two errors Smile

Back to top
View user's profile Send private message Skype Account
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Wed Jul 12, 2006 10:14 am    Post subject: Reply with quote

C&CVK wrote:
What do you think about two zoom stages: 100% and Fill in preview window Smile

that sounds great Smile
_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Wed Jul 12, 2006 7:53 pm    Post subject: Reply with quote

Now I have some problem with BitsPerPixel value
SHP Shell Ext work fine with BitPerPixel = 32bit Smile
But if I switch to 16bit it show all SHP as black rectangle Sad
SHP Shell Ext willNOT support 256 colors, 16 colors, and 2 colors mode

Back to top
View user's profile Send private message Skype Account
DuplExxx
Vehicle Drone


Joined: 09 Apr 2006
Location: Somewhere in the south of norway

PostPosted: Thu Jul 13, 2006 12:59 pm    Post subject: Reply with quote

So, my screen have to bee in 32-bit mode to use it??? Strange, but ist OK for me:D
_________________
Sorry about my english, I am a Norwegian(and proud of it Very Happy )!

Why shoud I become the leader of one nation, when I can control the entire world?
-Yuri

Back to top
View user's profile Send private message Visit poster's website
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Thu Jul 13, 2006 1:13 pm    Post subject: Reply with quote

Sounds OK to me.. everyone has 32bps nowadays anyway.
_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Thu Jul 13, 2006 8:08 pm    Post subject: Reply with quote

It is necessary SHP Shell Ext be compatible with 16, 24, 32 bit per pixel Sad For example TS, FS, RA2, YR use 16 bit per pixel modes
But I now fixed it already and it work even 8 bit pre pixel Laughing

Now I test my final beta-version and now I make installing program(script)

Back to top
View user's profile Send private message Skype Account
Anderwin
General


Joined: 16 May 2005

PostPosted: Sat Jul 15, 2006 9:52 pm    Post subject: Reply with quote

How will u use this programm i mean is it install file or just like HVA program ?
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Titan
Cyborg Commando


Joined: 12 Dec 2005
Location: Netherlands

PostPosted: Sat Jul 15, 2006 10:43 pm    Post subject: Reply with quote

It's a shell extension for Windows, so that you can view shp files as if they're Bmp's and Gif's, without having to open them up in the SHP builder.

Back to top
View user's profile Send private message
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Sun Jul 16, 2006 10:36 am    Post subject: Reply with quote

Now I downloaded NullSoft instll system and I make installing program Smile

Back to top
View user's profile Send private message Skype Account
DuplExxx1
Guest




PostPosted: Wed Aug 02, 2006 12:13 am    Post subject: Reply with quote

Lovely! I'm using the newest (beta 2?), and moast times, it workes great!

It's only on thing, If an SHP has 6 frames, unittep.pla That is "ALWAYS (i hope) buidings. Els, this is a small, easy, needed and god Shell Extension. ME LIKE

(yes, I'm the true DuplExxx, for some strange reason, I cant log on anny more)

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [20 Posts] View previous topic :: View next topic
 Forum index » Featured Tools » Community Tools » SHP Shell Extension
Jump to:  
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 one of the following words: 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

Wildcard SSL Certificates
[ Time: 0.1443s ][ Queries: 15 (0.0154s) ][ Debug on ]