Commit | Line | Data |
14362b19 |
1 | #include "grpapi_no-lib.h"\r |
2 | \r |
3 | struct GRPAPIMODULE {\r |
4 | GRPAPIMODULE();\r |
5 | ~GRPAPIMODULE();\r |
6 | } GrpApi;\r |
7 | \r |
8 | HINSTANCE hGrpApi = 0;\r |
9 | \r |
10 | funcLoadPalette LoadPalette = 0;\r |
11 | funcLoadGrp LoadGrp = 0;\r |
12 | funcDestroyGrp DestroyGrp = 0;\r |
13 | funcDrawGrp DrawGrp = 0;\r |
14 | funcGetGrpInfo GetGrpInfo = 0;\r |
c483a082 |
15 | funcCreateGrp CreateGrp = 0;\r |
7f7b4247 |
16 | funcSetFunctionGetPixel SetFunctionGetPixel = 0;\r |
17 | funcSetFunctionSetPixel SetFunctionSetPixel = 0;\r |
18 | funcSetMpqDll SetMpqDll = 0;\r |
14362b19 |
19 | funcLoadGrpApi LoadGrpApi = 0;\r |
20 | funcFreeGrpApi FreeGrpApi = 0;\r |
21 | \r |
22 | GRPAPIMODULE::GRPAPIMODULE()\r |
23 | {\r |
24 | if (hGrpApi!=0) return;\r |
25 | hGrpApi = LoadLibrary("grpapi.dll");\r |
26 | \r |
27 | if (hGrpApi!=0) {\r |
28 | LoadPalette = (funcLoadPalette)GetProcAddress(hGrpApi,"LoadPalette");\r |
29 | LoadGrp = (funcLoadGrp)GetProcAddress(hGrpApi,"LoadGrp");\r |
30 | DestroyGrp = (funcDestroyGrp)GetProcAddress(hGrpApi,"DestroyGrp");\r |
31 | DrawGrp = (funcDrawGrp)GetProcAddress(hGrpApi,"DrawGrp");\r |
32 | GetGrpInfo = (funcGetGrpInfo)GetProcAddress(hGrpApi,"GetGrpInfo");\r |
c483a082 |
33 | CreateGrp = (funcCreateGrp)GetProcAddress(hGrpApi,"CreateGrp");\r |
7f7b4247 |
34 | SetFunctionGetPixel = (funcSetFunctionGetPixel)GetProcAddress(hGrpApi,"SetFunctionGetPixel");\r |
35 | SetFunctionSetPixel = (funcSetFunctionSetPixel)GetProcAddress(hGrpApi,"SetFunctionSetPixel");\r |
36 | SetMpqDll = (funcSetMpqDll)GetProcAddress(hGrpApi,"SetMpqDll");\r |
14362b19 |
37 | LoadGrpApi = (funcLoadGrpApi)GetProcAddress(hGrpApi,"LoadGrpApi");\r |
38 | FreeGrpApi = (funcFreeGrpApi)GetProcAddress(hGrpApi,"FreeGrpApi");\r |
39 | }\r |
40 | }\r |
41 | \r |
42 | GRPAPIMODULE::~GRPAPIMODULE()\r |
43 | {\r |
44 | LoadPalette = 0;\r |
45 | LoadGrp = 0;\r |
46 | DestroyGrp = 0;\r |
47 | DrawGrp = 0;\r |
48 | GetGrpInfo = 0;\r |
c483a082 |
49 | CreateGrp = 0;\r |
7f7b4247 |
50 | SetFunctionGetPixel = 0;\r |
51 | SetFunctionSetPixel = 0;\r |
52 | SetMpqDll = 0;\r |
14362b19 |
53 | LoadGrpApi = 0;\r |
54 | FreeGrpApi = 0;\r |
55 | \r |
56 | if (hGrpApi==0) return;\r |
57 | FreeLibrary(hGrpApi);\r |
58 | hGrpApi = 0;\r |
59 | }\r |
60 | \r |
61 | void LoadGrpApiLib()\r |
62 | {\r |
63 | }\r |
64 | \r |
65 | void FreeGrpApiLib()\r |
66 | {\r |
67 | }\r |