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 |
a215f7be |
15 | funcGetGrpFrameInfo GetGrpFrameInfo = 0;\r |
c483a082 |
16 | funcCreateGrp CreateGrp = 0;\r |
7f7b4247 |
17 | funcSetFunctionGetPixel SetFunctionGetPixel = 0;\r |
18 | funcSetFunctionSetPixel SetFunctionSetPixel = 0;\r |
19 | funcSetMpqDll SetMpqDll = 0;\r |
14362b19 |
20 | funcLoadGrpApi LoadGrpApi = 0;\r |
21 | funcFreeGrpApi FreeGrpApi = 0;\r |
22 | \r |
23 | GRPAPIMODULE::GRPAPIMODULE()\r |
24 | {\r |
25 | if (hGrpApi!=0) return;\r |
26 | hGrpApi = LoadLibrary("grpapi.dll");\r |
27 | \r |
28 | if (hGrpApi!=0) {\r |
29 | LoadPalette = (funcLoadPalette)GetProcAddress(hGrpApi,"LoadPalette");\r |
30 | LoadGrp = (funcLoadGrp)GetProcAddress(hGrpApi,"LoadGrp");\r |
31 | DestroyGrp = (funcDestroyGrp)GetProcAddress(hGrpApi,"DestroyGrp");\r |
32 | DrawGrp = (funcDrawGrp)GetProcAddress(hGrpApi,"DrawGrp");\r |
33 | GetGrpInfo = (funcGetGrpInfo)GetProcAddress(hGrpApi,"GetGrpInfo");\r |
a215f7be |
34 | GetGrpFrameInfo = (funcGetGrpFrameInfo)GetProcAddress(hGrpApi,"GetGrpFrameInfo");\r |
c483a082 |
35 | CreateGrp = (funcCreateGrp)GetProcAddress(hGrpApi,"CreateGrp");\r |
7f7b4247 |
36 | SetFunctionGetPixel = (funcSetFunctionGetPixel)GetProcAddress(hGrpApi,"SetFunctionGetPixel");\r |
37 | SetFunctionSetPixel = (funcSetFunctionSetPixel)GetProcAddress(hGrpApi,"SetFunctionSetPixel");\r |
38 | SetMpqDll = (funcSetMpqDll)GetProcAddress(hGrpApi,"SetMpqDll");\r |
14362b19 |
39 | LoadGrpApi = (funcLoadGrpApi)GetProcAddress(hGrpApi,"LoadGrpApi");\r |
40 | FreeGrpApi = (funcFreeGrpApi)GetProcAddress(hGrpApi,"FreeGrpApi");\r |
41 | }\r |
42 | }\r |
43 | \r |
44 | GRPAPIMODULE::~GRPAPIMODULE()\r |
45 | {\r |
46 | LoadPalette = 0;\r |
47 | LoadGrp = 0;\r |
48 | DestroyGrp = 0;\r |
49 | DrawGrp = 0;\r |
50 | GetGrpInfo = 0;\r |
a215f7be |
51 | GetGrpFrameInfo = 0;\r |
c483a082 |
52 | CreateGrp = 0;\r |
7f7b4247 |
53 | SetFunctionGetPixel = 0;\r |
54 | SetFunctionSetPixel = 0;\r |
55 | SetMpqDll = 0;\r |
14362b19 |
56 | LoadGrpApi = 0;\r |
57 | FreeGrpApi = 0;\r |
58 | \r |
59 | if (hGrpApi==0) return;\r |
60 | FreeLibrary(hGrpApi);\r |
61 | hGrpApi = 0;\r |
62 | }\r |
63 | \r |
64 | void LoadGrpApiLib()\r |
65 | {\r |
66 | }\r |
67 | \r |
68 | void FreeGrpApiLib()\r |
69 | {\r |
70 | }\r |