Current News Archived News Search News Discussion Forum Old Forum Install Programs More Downloads... Troubleshooting Source Code Format Specs. Misc. Information Non-SF Stuff Links Small banner for links to this site: |
diff --git a/grpapi/grpapi.cpp b/grpapi/grpapi.cpp
--- a/grpapi/grpapi.cpp
+++ b/grpapi/grpapi.cpp
@@ -223,24 +223,33 @@ BOOL GRPAPI WINAPI DrawGrp(HANDLE hGrp, HDC hdcDest, int nXDest, int nYDest, WOR
BYTE *GrpRaw = (BYTE *)GrpOffsets;\r
BYTE *RowData;\r
WORD x,ofs;\r
- DWORD y;\r
+ DWORD y, nMaxOffset = 0;\r
WORD i;\r
- int j;\r
- if (nFrame + 1 < GrpFile->nFrames) {\r
- for (i = 0; i + 1 < GrpFile->nFrames; i++) {\r
- j = GrpFrames[i].Offset - GrpFrame->Offset;\r
- if (j > 0 && j < FrameSize)\r
- FrameSize = j;\r
- }\r
+ int j, nFirstNonBlankFrame = 0;\r
+ for (i = 0; i < GrpFile->nFrames; i++) {\r
+ j = GrpFrames[i].Offset - GrpFrame->Offset;\r
+ if (j > 0 && j < FrameSize)\r
+ FrameSize = j;\r
+ if (GrpFrames[i].Offset > nMaxOffset)\r
+ nMaxOffset = GrpFrames[i].Offset;\r
}\r
if (FrameSize == 0xFFFFFF || FrameSize == GrpFrame->Width * GrpFrame->Height) {\r
FrameSize = 0xFFFFFF;\r
- for (i = 0; i + 1 < GrpFile->nFrames; i++) {\r
- j = GrpFrames[i].Offset - GrpFrames[0].Offset;\r
+ for (i = 0; i < GrpFile->nFrames; i++) {\r
+ if (GrpFrames[i].Width != 0 && GrpFrames[i].Height != 0 && GrpFrames[i].Offset != GrpFrame->Offset && GrpFrames[i].Offset != nMaxOffset) {\r
+ nFirstNonBlankFrame = i;\r
+ break;\r
+ }\r
+ }\r
+ if (i == GrpFile->nFrames)\r
+ nFirstNonBlankFrame = nFrame;\r
+\r
+ for (i = 0; i < GrpFile->nFrames; i++) {\r
+ j = GrpFrames[i].Offset - GrpFrames[nFirstNonBlankFrame].Offset;\r
if (j > 0 && j < FrameSize)\r
FrameSize = j;\r
}\r
- if (FrameSize == GrpFrames[0].Width * GrpFrames[0].Height)\r
+ if (FrameSize == GrpFrames[nFirstNonBlankFrame].Width * GrpFrames[nFirstNonBlankFrame].Height)\r
FrameSize = GrpFrame->Width * GrpFrame->Height;\r
}\r
if (!(dwFlags&HORIZONTAL_FLIP) && !(dwFlags&VERTICAL_FLIP)) {\r
diff --git a/grpapi/grpapi.rc b/grpapi/grpapi.rc
--- a/grpapi/grpapi.rc
+++ b/grpapi/grpapi.rc
//\r
\r
VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,1,1,3\r
- PRODUCTVERSION 1,1,1,3\r
+ FILEVERSION 1,1,1,4\r
+ PRODUCTVERSION 1,1,1,4\r
FILEFLAGSMASK 0x3fL\r
#ifdef _DEBUG\r
FILEFLAGS 0x1L\r
VALUE "FileDescription", "ShadowFlare GRP Library"\r
VALUE "FileVersion", "1.11"\r
VALUE "InternalName", "grpapi"\r
- VALUE "LegalCopyright", "Copyright © ShadowFlare Software 2002-2006"\r
+ VALUE "LegalCopyright", "Copyright © ShadowFlare Software 2002-2007"\r
VALUE "OriginalFilename", "grpapi.dll"\r
VALUE "ProductName", "GRP Library"\r
- VALUE "ProductVersion", "1, 1, 1, 3"\r
- VALUE "Web Address", "http://shadowflare.samods.org/"\r
+ VALUE "ProductVersion", "1, 1, 1, 4"\r
+ VALUE "Web Address", "http://sfsrealm.hopto.org/"\r
END\r
END\r
BLOCK "VarFileInfo"\r
|