From: ShadowFlare Date: Tue, 28 Nov 2006 01:11:33 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=commitdiff_plain;h=6ae306569505e091aa7f5415ce26ee920bff2f5c;p=grpapi.git --- diff --git a/grpapi/grpapi.cpp b/grpapi/grpapi.cpp index 6e6b3ff..d206614 100644 --- a/grpapi/grpapi.cpp +++ b/grpapi/grpapi.cpp @@ -401,6 +401,19 @@ BOOL GRPAPI WINAPI GetGrpInfo(HANDLE hGrp, GRPHEADER *GrpInfo) return TRUE; } +BOOL GRPAPI WINAPI GetGrpFrameInfo(HANDLE hGrp, WORD nFrame, DWORD *nLeft, DWORD *nTop, DWORD *nWidth, DWORD *nHeight) +{ + if (!hGrp || hGrp==INVALID_HANDLE_VALUE) return FALSE; + FRAMEHEADER *GrpFrame = &((FRAMEHEADER *)(((char *)hGrp)+6))[nFrame]; + + if (nLeft) *nLeft = GrpFrame->Left; + if (nTop) *nTop = GrpFrame->Top; + if (nWidth) *nWidth = GrpFrame->Width; + if (nHeight) *nHeight = GrpFrame->Height; + + return TRUE; +} + void GRPAPI WINAPI SetFunctionGetPixel(GETPIXELPROC lpGetPixelProc) { if (!lpGetPixelProc) diff --git a/grpapi/grpapi.def b/grpapi/grpapi.def index c791491..74872fc 100644 --- a/grpapi/grpapi.def +++ b/grpapi/grpapi.def @@ -10,3 +10,4 @@ EXPORTS SetFunctionSetPixel @9 SetMpqDll @10 CreateGrp @11 + GetGrpFrameInfo @12 diff --git a/grpapi/grpapi.h b/grpapi/grpapi.h index ca5262c..5bdbe94 100644 --- a/grpapi/grpapi.h +++ b/grpapi/grpapi.h @@ -62,6 +62,7 @@ HANDLE GRPAPI WINAPI LoadGrp(LPCSTR lpFileName); BOOL GRPAPI WINAPI DestroyGrp(HANDLE hGrp); BOOL GRPAPI WINAPI DrawGrp(HANDLE hGrp, HDC hdcDest, int nXDest, int nYDest, WORD nFrame, DWORD *dwPalette, DWORD dwFlags, DWORD dwAlpha); BOOL GRPAPI WINAPI GetGrpInfo(HANDLE hGrp, GRPHEADER *GrpInfo); +BOOL GRPAPI WINAPI GetGrpFrameInfo(HANDLE hGrp, WORD nFrame, DWORD *nLeft, DWORD *nTop, DWORD *nWidth, DWORD *nHeight); // A pointer to the raw image data to encode should be passed to lpImageData. The size of // the buffer containing the data should be nFrames * wMaxWidth * wMaxHeight * sizeof(short) diff --git a/grpapi/grpapi.rc b/grpapi/grpapi.rc index 0d904a9..30a813d 100644 --- a/grpapi/grpapi.rc +++ b/grpapi/grpapi.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,1,1,2 - PRODUCTVERSION 1,1,1,2 + FILEVERSION 1,1,1,3 + PRODUCTVERSION 1,1,1,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -76,7 +76,7 @@ BEGIN VALUE "LegalCopyright", "Copyright © ShadowFlare Software 2002-2006" VALUE "OriginalFilename", "grpapi.dll" VALUE "ProductName", "GRP Library" - VALUE "ProductVersion", "1, 1, 1, 2" + VALUE "ProductVersion", "1, 1, 1, 3" VALUE "Web Address", "http://shadowflare.samods.org/" END END