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




CommitLineData
14362b19 1#include "grpapi_no-lib.h"\r
2\r
3struct GRPAPIMODULE {\r
4 GRPAPIMODULE();\r
5 ~GRPAPIMODULE();\r
6} GrpApi;\r
7\r
8HINSTANCE hGrpApi = 0;\r
9\r
10funcLoadPalette LoadPalette = 0;\r
11funcLoadGrp LoadGrp = 0;\r
12funcDestroyGrp DestroyGrp = 0;\r
13funcDrawGrp DrawGrp = 0;\r
14funcGetGrpInfo GetGrpInfo = 0;\r
c483a082 15funcCreateGrp CreateGrp = 0;\r
7f7b4247 16funcSetFunctionGetPixel SetFunctionGetPixel = 0;\r
17funcSetFunctionSetPixel SetFunctionSetPixel = 0;\r
18funcSetMpqDll SetMpqDll = 0;\r
14362b19 19funcLoadGrpApi LoadGrpApi = 0;\r
20funcFreeGrpApi FreeGrpApi = 0;\r
21\r
22GRPAPIMODULE::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
42GRPAPIMODULE::~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
61void LoadGrpApiLib()\r
62{\r
63}\r
64\r
65void FreeGrpApiLib()\r
66{\r
67}\r