X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=blobdiff_plain;f=grpapi%2Fgrpapi.h;h=bfa686496acb45abc7462ec0d621901b461610af;hb=03269fee39ef66bca887d4be10b93ab6995a12a4;hp=2f48cef5fe531129d1a228cd7f18bf19664bd661;hpb=ecca31ff6c588a09592e9a0ca08180828ab8a5a7;p=grpapi.git diff --git a/grpapi/grpapi.h b/grpapi/grpapi.h index 2f48cef..bfa6864 100644 --- a/grpapi/grpapi.h +++ b/grpapi/grpapi.h @@ -39,12 +39,20 @@ typedef struct { // the shadow's color, third byte is green, // fourth byte is blue; like this: // SHADOW_COLOR|0xBBGGRR00 + // This can be accomplished by using the left shift + // operator like this: SHADOW_COLOR|(color << 8) #define ALPHA_BLEND 0x00000008 // Blends the graphic with what it is being drawn over. // The dwAlpha parameter will only be used when this // flag is specified. dwAlpha is an RGB value // (0xBBGGRR). // Note: Because of the extra calculations required, // alpha blended graphics take longer to draw +#define USE_INDEX 0x00000010 // Only valid when used with a custom SetPixel function. + // This flag cannot be used in combination with + // ALPHA_BLEND or SHADOW_COLOR + // When this flag is used, the index to a color in the + // palette will be passed to your custom SetPixel + // function instead of the actual color. // Palette is an array of 256 DWORD's // For LoadPalette and LoadGrp, lpFileName may be a file in an open mpq archive @@ -55,6 +63,8 @@ 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); +HANDLE GRPAPI WINAPI CreateGrp(signed short *lpImageData, WORD nFrames, WORD wMaxWidth, WORD wMaxHeight, BOOL bNoCompress, DWORD *nGrpSize); + typedef COLORREF (WINAPI* GETPIXELPROC)( HDC hDC, // same value as hdcDest from DrawGrp, // does not need to be used as an HDC, @@ -73,7 +83,7 @@ typedef void (WINAPI* SETPIXELPROC)( // Call these to have DrawGrp use custom functions for reading and drawing pixels // so that you can have it read from and write to a buffer, for example. -void GRPAPI WINAPI SetFunctionGetPixel(GETPIXELPROC lpGetPixelProc); +void GRPAPI WINAPI SetFunctionGetPixel(GETPIXELPROC lpGetPixelProc); // Only used with ALPHA_BLEND void GRPAPI WINAPI SetFunctionSetPixel(SETPIXELPROC lpSetPixelProc); // Call this to make a different Storm.dll-compatible MPQ library be used (like SFMPQ).