X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=blobdiff_plain;f=grpapi%2Fgrpapi.h;h=2f48cef5fe531129d1a228cd7f18bf19664bd661;hb=ecca31ff6c588a09592e9a0ca08180828ab8a5a7;hp=8fc78cbe3a8dff5a75ae36a5375018c697e973cf;hpb=6de6dcc6d47a9e193b5a7a312fd54fbe04478592;p=grpapi.git diff --git a/grpapi/grpapi.h b/grpapi/grpapi.h index 8fc78cb..2f48cef 100644 --- a/grpapi/grpapi.h +++ b/grpapi/grpapi.h @@ -1,6 +1,6 @@ /* - ShadowFlare GRP Library. (c) ShadowFlare Software 2002 + ShadowFlare GRP Library. (c) ShadowFlare Software 2002-2006 Any comments or suggestions are accepted at blakflare@hotmail.com (ShadowFlare) */ @@ -55,6 +55,30 @@ 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); +typedef COLORREF (WINAPI* GETPIXELPROC)( + HDC hDC, // same value as hdcDest from DrawGrp, + // does not need to be used as an HDC, + // can be used for any other type of pointer + int X, // x-coordinate of pixel + int Y // y-coordinate of pixel +); +typedef void (WINAPI* SETPIXELPROC)( + HDC hDC, // same value as hdcDest from DrawGrp, + // does not need to be used as an HDC, + // can be used for any other type of pointer + int X, // x-coordinate of pixel + int Y, // y-coordinate of pixel + COLORREF clrColor // new pixel color +); + +// 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 SetFunctionSetPixel(SETPIXELPROC lpSetPixelProc); + +// Call this to make a different Storm.dll-compatible MPQ library be used (like SFMPQ). +BOOL GRPAPI WINAPI SetMpqDll(LPCSTR lpDllFileName); + // These no longer need to be called BOOL GRPAPI WINAPI LoadGrpApi(); void GRPAPI WINAPI FreeGrpApi();