X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=blobdiff_plain;f=grpapi%2Fgrpapi_no-lib.h;h=8698fd19f9f93a6aa43dff66270b5680effde71f;hb=561c0942c0bb8e6dcfcc3616a5b89123cadd9ce1;hp=a252519bb200c956d1116689a4ae49bf545dc301;hpb=14362b19599627313cd243bdbc404dc2087d4422;p=grpapi.git diff --git a/grpapi/grpapi_no-lib.h b/grpapi/grpapi_no-lib.h index a252519..8698fd1 100644 --- a/grpapi/grpapi_no-lib.h +++ b/grpapi/grpapi_no-lib.h @@ -58,6 +58,33 @@ extern funcDestroyGrp DestroyGrp; extern funcDrawGrp DrawGrp; extern funcGetGrpInfo GetGrpInfo; +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. +typedef void (WINAPI* funcSetFunctionGetPixel)(GETPIXELPROC lpGetPixelProc); +typedef void (WINAPI* funcSetFunctionSetPixel)(SETPIXELPROC lpSetPixelProc); +extern funcSetFunctionGetPixel SetFunctionGetPixel; +extern funcSetFunctionSetPixel SetFunctionSetPixel; + +// Call this to make a different Storm.dll-compatible MPQ library be used (like SFMPQ). +typedef BOOL (WINAPI* funcSetMpqDll)(LPCSTR lpDllFileName); +extern funcSetMpqDll SetMpqDll; + // These no longer need to be called typedef BOOL (WINAPI* funcLoadGrpApi)(); typedef void (WINAPI* funcFreeGrpApi)();