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 Small banner for links to this site: |
1 #include "grpapi_no-lib.h"
3 struct GRPAPIMODULE {
4 GRPAPIMODULE();
5 ~GRPAPIMODULE();
6 } GrpApi;
8 HINSTANCE hGrpApi = 0;
10 funcLoadPalette LoadPalette = 0;
11 funcLoadGrp LoadGrp = 0;
12 funcDestroyGrp DestroyGrp = 0;
13 funcDrawGrp DrawGrp = 0;
14 funcGetGrpInfo GetGrpInfo = 0;
15 funcGetGrpFrameInfo GetGrpFrameInfo = 0;
16 funcCreateGrp CreateGrp = 0;
17 funcSetFunctionGetPixel SetFunctionGetPixel = 0;
18 funcSetFunctionSetPixel SetFunctionSetPixel = 0;
19 funcSetMpqDll SetMpqDll = 0;
20 funcLoadGrpApi LoadGrpApi = 0;
21 funcFreeGrpApi FreeGrpApi = 0;
23 GRPAPIMODULE::GRPAPIMODULE()
24 {
25 if (hGrpApi!=0) return;
26 hGrpApi = LoadLibrary("grpapi.dll");
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 }
44 GRPAPIMODULE::~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;
59 if (hGrpApi==0) return;
60 FreeLibrary(hGrpApi);
61 hGrpApi = 0;
62 }
64 void LoadGrpApiLib()
65 {
66 }
68 void FreeGrpApiLib()
69 {
70 }
|