Commit | Line | Data |
14362b19 |
1 | /*\r |
2 | \r |
3 | ShadowFlare GRP Library. (c) ShadowFlare Software 2002\r |
4 | \r |
5 | Any comments or suggestions are accepted at blakflare@hotmail.com (ShadowFlare)\r |
6 | */\r |
7 | \r |
8 | #ifndef GRPAPI_INCLUDED\r |
9 | #define GRPAPI_INCLUDED\r |
10 | \r |
11 | #include <windows.h>\r |
12 | \r |
13 | #ifdef GRPAPI_EXPORTS\r |
14 | #define GRPAPI __declspec(dllexport)\r |
15 | #else\r |
16 | #define GRPAPI __declspec(dllimport)\r |
17 | #endif\r |
18 | \r |
19 | #ifdef __cplusplus\r |
20 | extern "C" {\r |
21 | #endif\r |
22 | \r |
23 | // These no longer need to be called\r |
24 | extern void LoadGrpApiLib();\r |
25 | extern void FreeGrpApiLib();\r |
26 | \r |
27 | typedef struct {\r |
28 | WORD nFrames;\r |
29 | WORD wMaxWidth;\r |
30 | WORD wMaxHeight;\r |
31 | } GRPHEADER;\r |
32 | \r |
33 | #define HORIZONTAL_FLIP 0x00000001 // Flips the graphic horizontally\r |
34 | #define VERTICAL_FLIP 0x00000002 // Flips the graphic vertically\r |
35 | #define SHADOW_COLOR 0x00000004 // Causes the graphic to be drawn in one color\r |
36 | // Second byte of flags is the red component of\r |
37 | // the shadow's color, third byte is green,\r |
38 | // fourth byte is blue; like this:\r |
39 | // SHADOW_COLOR|0xBBGGRR00\r |
40 | #define ALPHA_BLEND 0x00000008 // Blends the graphic with what it is being drawn over.\r |
41 | // The dwAlpha parameter will only be used when this\r |
42 | // flag is specified. dwAlpha is an RGB value\r |
43 | // (0xBBGGRR).\r |
44 | // Note: Because of the extra calculations required,\r |
45 | // alpha blended graphics take longer to draw\r |
46 | \r |
47 | // Palette is an array of 256 DWORD's\r |
48 | // For LoadPalette and LoadGrp, lpFileName may be a file in an open mpq archive\r |
49 | // or a file not in an archive\r |
50 | typedef BOOL (WINAPI* funcLoadPalette)(LPCSTR lpFileName, DWORD *dwPaletteBuffer);\r |
51 | typedef HANDLE (WINAPI* funcLoadGrp)(LPCSTR lpFileName);\r |
52 | typedef BOOL (WINAPI* funcDestroyGrp)(HANDLE hGrp);\r |
53 | typedef BOOL (WINAPI* funcDrawGrp)(HANDLE hGrp, HDC hdcDest, int nXDest, int nYDest, WORD nFrame, DWORD *dwPalette, DWORD dwFlags, DWORD dwAlpha);\r |
54 | typedef BOOL (WINAPI* funcGetGrpInfo)(HANDLE hGrp, GRPHEADER *GrpInfo);\r |
55 | extern funcLoadPalette LoadPalette;\r |
56 | extern funcLoadGrp LoadGrp;\r |
57 | extern funcDestroyGrp DestroyGrp;\r |
58 | extern funcDrawGrp DrawGrp;\r |
59 | extern funcGetGrpInfo GetGrpInfo;\r |
60 | \r |
61 | // These no longer need to be called\r |
62 | typedef BOOL (WINAPI* funcLoadGrpApi)();\r |
63 | typedef void (WINAPI* funcFreeGrpApi)();\r |
64 | extern funcLoadGrpApi LoadGrpApi;\r |
65 | extern funcFreeGrpApi FreeGrpApi;\r |
66 | \r |
67 | #ifdef __cplusplus\r |
68 | }; // extern "C" \r |
69 | #endif\r |
70 | \r |
71 | #endif\r |
72 | \r |