Posted: Sun Jul 02, 2006 1:51 pm Post subject:
New SHP viewer
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
Joined: 26 Nov 2002 Location: Algae Colony On Mars
Posted: Sun Jul 02, 2006 4:45 pm Post subject:
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
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;
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue Jul 04, 2006 6:35 am Post subject:
woah... awesome. Can't wait until you release this.
Would be more awesome if it includes SHP (TD) format though *hint* *hint*
(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...) _________________ QUICK_EDIT
Now I have some problem with BitsPerPixel value
SHP Shell Ext work fine with BitPerPixel = 32bit
But if I switch to 16bit it show all SHP as black rectangle
SHP Shell Ext willNOT support 256 colors, 16 colors, and 2 colors mode QUICK_EDIT
Joined: 09 Apr 2006 Location: Somewhere in the south of norway
Posted: Thu Jul 13, 2006 12:59 pm Post subject:
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 )!
Why shoud I become the leader of one nation, when I can control the entire world?
-Yuri
It is necessary SHP Shell Ext be compatible with 16, 24, 32 bit per pixel 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
Now I test my final beta-version and now I make installing program(script) QUICK_EDIT
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. QUICK_EDIT
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) QUICK_EDIT
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