X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=blobdiff_plain;f=grpapi%2Fgrpapi_no-lib.h;h=190beb5a5f19e993ebdd77001f9cbe341ce4df85;hb=ec6375429d9d1f0450df767144f93bdb6c0ca261;hp=8698fd19f9f93a6aa43dff66270b5680effde71f;hpb=7f7b4247b021a783cbba059c344ddcdc1a80e58f;p=grpapi.git diff --git a/grpapi/grpapi_no-lib.h b/grpapi/grpapi_no-lib.h index 8698fd1..190beb5 100644 --- a/grpapi/grpapi_no-lib.h +++ b/grpapi/grpapi_no-lib.h @@ -37,12 +37,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 @@ -58,6 +66,9 @@ extern funcDestroyGrp DestroyGrp; extern funcDrawGrp DrawGrp; extern funcGetGrpInfo GetGrpInfo; +typedef HANDLE (WINAPI* funcCreateGrp)(signed short *lpImageData, WORD nFrames, WORD wMaxWidth, WORD wMaxHeight, DWORD *nGrpSize); +extern funcCreateGrp CreateGrp; + typedef COLORREF (WINAPI* GETPIXELPROC)( HDC hDC, // same value as hdcDest from DrawGrp, // does not need to be used as an HDC, @@ -78,7 +89,7 @@ typedef void (WINAPI* SETPIXELPROC)( // so that you can have it read from and write to a buffer, for example. typedef void (WINAPI* funcSetFunctionGetPixel)(GETPIXELPROC lpGetPixelProc); typedef void (WINAPI* funcSetFunctionSetPixel)(SETPIXELPROC lpSetPixelProc); -extern funcSetFunctionGetPixel SetFunctionGetPixel; +extern funcSetFunctionGetPixel SetFunctionGetPixel; // Only used with ALPHA_BLEND extern funcSetFunctionSetPixel SetFunctionSetPixel; // Call this to make a different Storm.dll-compatible MPQ library be used (like SFMPQ).