Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




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 #ifndef GRPAPI_STATIC\r
14 \r
15 #ifdef GRPAPI_EXPORTS\r
16 #define GRPAPI __declspec(dllexport)\r
17 #else\r
18 #define GRPAPI __declspec(dllimport)\r
19 #endif\r
20 \r
21 #else\r
22 #define GRPAPI\r
23 #endif\r
24 \r
25 #ifdef __cplusplus\r
26 extern "C" {\r
27 #endif\r
28 \r
29 typedef struct {\r
30         WORD nFrames;\r
31         WORD wMaxWidth;\r
32         WORD wMaxHeight;\r
33 } GRPHEADER;\r
34 \r
35 #define HORIZONTAL_FLIP 0x00000001 // Flips the graphic horizontally\r
36 #define VERTICAL_FLIP   0x00000002 // Flips the graphic vertically\r
37 #define SHADOW_COLOR    0x00000004 // Causes the graphic to be drawn in one color\r
38                                    // Second byte of flags is the red component of\r
39                                    // the shadow's color, third byte is green,\r
40                                    // fourth byte is blue; like this:\r
41                                    // SHADOW_COLOR|0xBBGGRR00\r
42 #define ALPHA_BLEND     0x00000008 // Blends the graphic with what it is being drawn over.\r
43                                    // The dwAlpha parameter will only be used when this\r
44                                    // flag is specified.  dwAlpha is an RGB value\r
45                                    // (0xBBGGRR).\r
46                                    // Note: Because of the extra calculations required,\r
47                                    // alpha blended graphics take longer to draw\r
48 \r
49 // Palette is an array of 256 DWORD's\r
50 // For LoadPalette and LoadGrp, lpFileName may be a file in an open mpq archive\r
51 // or a file not in an archive\r
52 BOOL   GRPAPI WINAPI LoadPalette(LPCSTR lpFileName, DWORD *dwPaletteBuffer);\r
53 HANDLE GRPAPI WINAPI LoadGrp(LPCSTR lpFileName);\r
54 BOOL   GRPAPI WINAPI DestroyGrp(HANDLE hGrp);\r
55 BOOL   GRPAPI WINAPI DrawGrp(HANDLE hGrp, HDC hdcDest, int nXDest, int nYDest, WORD nFrame, DWORD *dwPalette, DWORD dwFlags, DWORD dwAlpha);\r
56 BOOL   GRPAPI WINAPI GetGrpInfo(HANDLE hGrp, GRPHEADER *GrpInfo);\r
57 \r
58 // These no longer need to be called\r
59 BOOL   GRPAPI WINAPI LoadGrpApi();\r
60 void   GRPAPI WINAPI FreeGrpApi();\r
61 \r
62 #ifdef __cplusplus\r
63 };  // extern "C" \r
64 #endif\r
65 \r
66 #endif\r
67 \r