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