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
a215f7be 15funcGetGrpFrameInfo GetGrpFrameInfo = 0;\r
c483a082 16funcCreateGrp CreateGrp = 0;\r
7f7b4247 17funcSetFunctionGetPixel SetFunctionGetPixel = 0;\r
18funcSetFunctionSetPixel SetFunctionSetPixel = 0;\r
19funcSetMpqDll SetMpqDll = 0;\r
14362b19 20funcLoadGrpApi LoadGrpApi = 0;\r
21funcFreeGrpApi FreeGrpApi = 0;\r
22\r
23GRPAPIMODULE::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
44GRPAPIMODULE::~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
64void LoadGrpApiLib()\r
65{\r
66}\r
67\r
68void FreeGrpApiLib()\r
69{\r
70}\r