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_no-lib.h b/grpapi/grpapi_no-lib.h
--- a/grpapi/grpapi_no-lib.h
+++ b/grpapi/grpapi_no-lib.h
typedef BOOL (WINAPI* funcDestroyGrp)(HANDLE hGrp);\r
typedef BOOL (WINAPI* funcDrawGrp)(HANDLE hGrp, HDC hdcDest, int nXDest, int nYDest, WORD nFrame, DWORD *dwPalette, DWORD dwFlags, DWORD dwAlpha);\r
typedef BOOL (WINAPI* funcGetGrpInfo)(HANDLE hGrp, GRPHEADER *GrpInfo);\r
+typedef BOOL (WINAPI* funcGetGrpFrameInfo)(HANDLE hGrp, WORD nFrame, DWORD *nLeft, DWORD *nTop, DWORD *nWidth, DWORD *nHeight);\r
extern funcLoadPalette LoadPalette;\r
extern funcLoadGrp LoadGrp;\r
extern funcDestroyGrp DestroyGrp;\r
extern funcDrawGrp DrawGrp;\r
extern funcGetGrpInfo GetGrpInfo;\r
+extern funcGetGrpFrameInfo GetGrpFrameInfo;\r
+\r
+// A pointer to the raw image data to encode should be passed to lpImageData. The size of\r
+// the buffer containing the data should be nFrames * wMaxWidth * wMaxHeight * sizeof(short)\r
+// and the values should be arranged row by row of the frame, with the top row first.\r
+// After all the rows of a frame have been put into the buffer, the rows of the next frame\r
+// go after it. For transparent pixels, they should be set to -1. All other pixels should\r
+// have the high order byte set to zero, meaning that they should not be negative and the\r
+// values should not exceed 255 (0xFF). The values used for the colors are indexes into the\r
+// color palette.\r
+// Pass TRUE to bNoCompress if you need an uncompressed GRP.\r
+// Pass a pointer to a DWORD value to nGrpSize to receive the size in bytes of the resulting encoded GRP.\r
+// The return value of this function is actually a pointer to the GRP data. This is what your\r
+// program should save to a file. The size of this buffer is the value received by nGrpSize.\r
+// When your program is done with the returned buffer, it should call DestroyGrp on the\r
+// buffer that was returned by this function to free up the memory from it.\r
+// The pointer returned by this function can also be directly used by DrawGrp or GetGrpInfo.\r
+typedef HANDLE (WINAPI* funcCreateGrp)(signed short *lpImageData, WORD nFrames, WORD wMaxWidth, WORD wMaxHeight, BOOL bNoCompress, DWORD *nGrpSize);\r
+extern funcCreateGrp CreateGrp;\r
\r
typedef COLORREF (WINAPI* GETPIXELPROC)(\r
HDC hDC, // same value as hdcDest from DrawGrp,\r
#endif\r
\r
#endif\r
-\r
|