X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=blobdiff_plain;f=grpapi%2Fgrpapi_no-lib.h;h=9dc9baaef7fb2f1aada4ea5e89e2744e5e52caed;hb=72c72f15ec4375bf64517c7526fce3510b6729c8;hp=2af7eecf6e9dbcff3847c41ff17fcd6aa307b07a;hpb=03269fee39ef66bca887d4be10b93ab6995a12a4;p=grpapi.git diff --git a/grpapi/grpapi_no-lib.h b/grpapi/grpapi_no-lib.h index 2af7eec..9dc9baa 100644 --- a/grpapi/grpapi_no-lib.h +++ b/grpapi/grpapi_no-lib.h @@ -60,12 +60,29 @@ typedef HANDLE (WINAPI* funcLoadGrp)(LPCSTR lpFileName); typedef BOOL (WINAPI* funcDestroyGrp)(HANDLE hGrp); typedef BOOL (WINAPI* funcDrawGrp)(HANDLE hGrp, HDC hdcDest, int nXDest, int nYDest, WORD nFrame, DWORD *dwPalette, DWORD dwFlags, DWORD dwAlpha); typedef BOOL (WINAPI* funcGetGrpInfo)(HANDLE hGrp, GRPHEADER *GrpInfo); +typedef BOOL (WINAPI* funcGetGrpFrameInfo)(HANDLE hGrp, WORD nFrame, DWORD *nLeft, DWORD *nTop, DWORD *nWidth, DWORD *nHeight); extern funcLoadPalette LoadPalette; extern funcLoadGrp LoadGrp; extern funcDestroyGrp DestroyGrp; extern funcDrawGrp DrawGrp; extern funcGetGrpInfo GetGrpInfo; - +extern funcGetGrpFrameInfo GetGrpFrameInfo; + +// 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) +// and the values should be arranged row by row of the frame, with the top row first. +// After all the rows of a frame have been put into the buffer, the rows of the next frame +// go after it. For transparent pixels, they should be set to -1. All other pixels should +// have the high order byte set to zero, meaning that they should not be negative and the +// values should not exceed 255 (0xFF). The values used for the colors are indexes into the +// color palette. +// Pass TRUE to bNoCompress if you need an uncompressed GRP. +// Pass a pointer to a DWORD value to nGrpSize to receive the size in bytes of the resulting encoded GRP. +// The return value of this function is actually a pointer to the GRP data. This is what your +// program should save to a file. The size of this buffer is the value received by nGrpSize. +// When your program is done with the returned buffer, it should call DestroyGrp on the +// buffer that was returned by this function to free up the memory from it. +// The pointer returned by this function can also be directly used by DrawGrp or GetGrpInfo. typedef HANDLE (WINAPI* funcCreateGrp)(signed short *lpImageData, WORD nFrames, WORD wMaxWidth, WORD wMaxHeight, BOOL bNoCompress, DWORD *nGrpSize); extern funcCreateGrp CreateGrp; @@ -107,4 +124,3 @@ extern funcFreeGrpApi FreeGrpApi; #endif #endif -