-
Notifications
You must be signed in to change notification settings - Fork 2
/
myIDDraw.h
211 lines (183 loc) · 9.28 KB
/
myIDDraw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#pragma once
class myIDDrawInterface
{
public:
virtual LPDIRECTDRAW getAsDirectDraw() = 0;
};
class myIDDraw1 : public IDirectDraw, public myIDDrawInterface
{
public:
myIDDraw1(LPDIRECTDRAW pOriginal);
virtual ~myIDDraw1(void);
// The original DDraw function definitions BEGIN
HRESULT __stdcall QueryInterface (REFIID a, LPVOID FAR * b);
ULONG __stdcall AddRef(void);
ULONG __stdcall Release(void);
HRESULT __stdcall Compact(void);
HRESULT __stdcall CreateClipper(DWORD a, LPDIRECTDRAWCLIPPER FAR* b, IUnknown FAR* c);
HRESULT __stdcall CreatePalette(DWORD a, LPPALETTEENTRY b, LPDIRECTDRAWPALETTE FAR* c, IUnknown FAR* d);
HRESULT __stdcall CreateSurface(LPDDSURFACEDESC a, LPDIRECTDRAWSURFACE FAR* b, IUnknown FAR* c);
HRESULT __stdcall DuplicateSurface(LPDIRECTDRAWSURFACE a, LPDIRECTDRAWSURFACE FAR* b);
HRESULT __stdcall EnumDisplayModes(DWORD a, LPDDSURFACEDESC b, LPVOID c, LPDDENUMMODESCALLBACK d);
HRESULT __stdcall EnumSurfaces(DWORD a, LPDDSURFACEDESC b, LPVOID c, LPDDENUMSURFACESCALLBACK d);
HRESULT __stdcall FlipToGDISurface(void);
HRESULT __stdcall GetCaps(LPDDCAPS a, LPDDCAPS b);
HRESULT __stdcall GetDisplayMode(LPDDSURFACEDESC a);
HRESULT __stdcall GetFourCCCodes(LPDWORD a, LPDWORD b);
HRESULT __stdcall GetGDISurface(LPDIRECTDRAWSURFACE FAR * a);
HRESULT __stdcall GetMonitorFrequency(LPDWORD a);
HRESULT __stdcall GetScanLine(LPDWORD a);
HRESULT __stdcall GetVerticalBlankStatus(LPBOOL a);
HRESULT __stdcall Initialize(GUID FAR* a);
HRESULT __stdcall RestoreDisplayMode(void);
HRESULT __stdcall SetCooperativeLevel(HWND a, DWORD b);
HRESULT __stdcall SetDisplayMode(DWORD a, DWORD b, DWORD c);
HRESULT __stdcall WaitForVerticalBlank(DWORD a, HANDLE b);
virtual LPDIRECTDRAW getAsDirectDraw()
{
return m_pIDDraw;
}
LPDIRECTDRAW FAR m_pIDDraw;
};
class myIDDraw2 : public IDirectDraw2, public myIDDrawInterface
{
public:
myIDDraw2(LPDIRECTDRAW2 pOriginal);
virtual ~myIDDraw2(void);
// The original DDraw function definitions BEGIN
HRESULT __stdcall QueryInterface (REFIID a, LPVOID FAR * b);
ULONG __stdcall AddRef(void);
ULONG __stdcall Release(void);
HRESULT __stdcall Compact(void);
HRESULT __stdcall CreateClipper(DWORD a, LPDIRECTDRAWCLIPPER FAR* b, IUnknown FAR* c);
HRESULT __stdcall CreatePalette(DWORD a, LPPALETTEENTRY b, LPDIRECTDRAWPALETTE FAR* c, IUnknown FAR* d);
HRESULT __stdcall CreateSurface(LPDDSURFACEDESC a, LPDIRECTDRAWSURFACE FAR* b, IUnknown FAR* c);
HRESULT __stdcall DuplicateSurface(LPDIRECTDRAWSURFACE a, LPDIRECTDRAWSURFACE FAR* b);
HRESULT __stdcall EnumDisplayModes(DWORD a, LPDDSURFACEDESC b, LPVOID c, LPDDENUMMODESCALLBACK d);
HRESULT __stdcall EnumSurfaces(DWORD a, LPDDSURFACEDESC b, LPVOID c, LPDDENUMSURFACESCALLBACK d);
HRESULT __stdcall FlipToGDISurface(void);
HRESULT __stdcall GetCaps(LPDDCAPS a, LPDDCAPS b);
HRESULT __stdcall GetDisplayMode(LPDDSURFACEDESC a);
HRESULT __stdcall GetFourCCCodes(LPDWORD a, LPDWORD b);
HRESULT __stdcall GetGDISurface(LPDIRECTDRAWSURFACE FAR * a);
HRESULT __stdcall GetMonitorFrequency(LPDWORD a);
HRESULT __stdcall GetScanLine(LPDWORD a);
HRESULT __stdcall GetVerticalBlankStatus(LPBOOL a);
HRESULT __stdcall Initialize(GUID FAR* a);
HRESULT __stdcall RestoreDisplayMode(void);
HRESULT __stdcall SetCooperativeLevel(HWND a, DWORD b);
HRESULT __stdcall SetDisplayMode(DWORD a, DWORD b, DWORD c, DWORD d, DWORD e);
HRESULT __stdcall WaitForVerticalBlank(DWORD a, HANDLE b);
/*** Added in the v2 interface ***/
HRESULT __stdcall GetAvailableVidMem(LPDDSCAPS a, LPDWORD b, LPDWORD c);
virtual LPDIRECTDRAW getAsDirectDraw()
{
return (LPDIRECTDRAW)m_pIDDraw;
}
LPDIRECTDRAW2 FAR m_pIDDraw;
};
class myIDDrawSurface1 : public IDirectDrawSurface
{
public:
myIDDrawSurface1(LPDIRECTDRAWSURFACE pOriginal);
virtual ~myIDDrawSurface1(void);
// The original DDraw function definitions BEGIN
HRESULT __stdcall QueryInterface (REFIID a, LPVOID FAR * b);
ULONG __stdcall AddRef(void);
ULONG __stdcall Release(void);
/*** IDirectDrawSurface methods ***/
HRESULT __stdcall AddAttachedSurface(LPDIRECTDRAWSURFACE);
HRESULT __stdcall AddOverlayDirtyRect(LPRECT);
HRESULT __stdcall Blt(LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX);
HRESULT __stdcall BltBatch(LPDDBLTBATCH, DWORD, DWORD );
HRESULT __stdcall BltFast(DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD);
HRESULT __stdcall DeleteAttachedSurface(DWORD,LPDIRECTDRAWSURFACE);
HRESULT __stdcall EnumAttachedSurfaces(LPVOID,LPDDENUMSURFACESCALLBACK);
HRESULT __stdcall EnumOverlayZOrders(DWORD,LPVOID,LPDDENUMSURFACESCALLBACK);
HRESULT __stdcall Flip(LPDIRECTDRAWSURFACE, DWORD);
HRESULT __stdcall GetAttachedSurface(LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *);
HRESULT __stdcall GetBltStatus(DWORD);
HRESULT __stdcall GetCaps(LPDDSCAPS);
HRESULT __stdcall GetClipper(LPDIRECTDRAWCLIPPER FAR*);
HRESULT __stdcall GetColorKey(DWORD, LPDDCOLORKEY);
HRESULT __stdcall GetDC(HDC FAR *);
HRESULT __stdcall GetFlipStatus(DWORD);
HRESULT __stdcall GetOverlayPosition(LPLONG, LPLONG );
HRESULT __stdcall GetPalette(LPDIRECTDRAWPALETTE FAR*);
HRESULT __stdcall GetPixelFormat(LPDDPIXELFORMAT);
HRESULT __stdcall GetSurfaceDesc(LPDDSURFACEDESC);
HRESULT __stdcall Initialize(LPDIRECTDRAW, LPDDSURFACEDESC);
HRESULT __stdcall IsLost();
HRESULT __stdcall Lock(LPRECT,LPDDSURFACEDESC,DWORD,HANDLE);
HRESULT __stdcall ReleaseDC(HDC);
HRESULT __stdcall Restore();
HRESULT __stdcall SetClipper(LPDIRECTDRAWCLIPPER);
HRESULT __stdcall SetColorKey(DWORD, LPDDCOLORKEY);
HRESULT __stdcall SetOverlayPosition(LONG, LONG );
HRESULT __stdcall SetPalette(LPDIRECTDRAWPALETTE);
HRESULT __stdcall Unlock(LPVOID);
HRESULT __stdcall UpdateOverlay(LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX);
HRESULT __stdcall UpdateOverlayDisplay(DWORD);
HRESULT __stdcall UpdateOverlayZOrder(DWORD, LPDIRECTDRAWSURFACE);
LPDIRECTDRAWSURFACE FAR m_pIDDrawSurface;
};
class myIDDrawPalette : public IDirectDrawPalette
{
public:
myIDDrawPalette(LPDIRECTDRAWPALETTE pOriginal);
virtual ~myIDDrawPalette(void);
// The original DDraw function definitions BEGIN
HRESULT __stdcall QueryInterface (REFIID a, LPVOID FAR * b);
ULONG __stdcall AddRef(void);
ULONG __stdcall Release(void);
/*** IDirectDrawPalette methods ***/
HRESULT __stdcall GetCaps(LPDWORD);
HRESULT __stdcall GetEntries(DWORD,DWORD,DWORD,LPPALETTEENTRY);
HRESULT __stdcall Initialize(LPDIRECTDRAW, DWORD, LPPALETTEENTRY);
HRESULT __stdcall SetEntries(DWORD,DWORD,DWORD,LPPALETTEENTRY);
LPDIRECTDRAWPALETTE FAR m_pIDDrawPalette;
};
class myIDDraw7 : public IDirectDraw7, public myIDDrawInterface
{
public:
myIDDraw7(LPDIRECTDRAW7 pOriginal);
virtual ~myIDDraw7(void);
// The original DDraw function definitions BEGIN
HRESULT __stdcall QueryInterface (REFIID a, LPVOID FAR * b);
ULONG __stdcall AddRef(void);
ULONG __stdcall Release(void);
HRESULT __stdcall Compact(void);
HRESULT __stdcall CreateClipper(DWORD a, LPDIRECTDRAWCLIPPER FAR* b, IUnknown FAR * c);
HRESULT __stdcall CreatePalette(DWORD a, LPPALETTEENTRY b, LPDIRECTDRAWPALETTE FAR* c, IUnknown FAR * d);
HRESULT __stdcall CreateSurface(LPDDSURFACEDESC2 a, LPDIRECTDRAWSURFACE7 FAR * b, IUnknown FAR * c);
HRESULT __stdcall DuplicateSurface(LPDIRECTDRAWSURFACE7 a, LPDIRECTDRAWSURFACE7 FAR * b);
HRESULT __stdcall EnumDisplayModes(DWORD a, LPDDSURFACEDESC2 b, LPVOID c, LPDDENUMMODESCALLBACK2 d);
HRESULT __stdcall EnumSurfaces(DWORD a, LPDDSURFACEDESC2 b, LPVOID c,LPDDENUMSURFACESCALLBACK7 d);
HRESULT __stdcall FlipToGDISurface(void);
HRESULT __stdcall GetCaps(LPDDCAPS a, LPDDCAPS b);
HRESULT __stdcall GetDisplayMode(LPDDSURFACEDESC2 a);
HRESULT __stdcall GetFourCCCodes(LPDWORD a, LPDWORD b);
HRESULT __stdcall GetGDISurface(LPDIRECTDRAWSURFACE7 FAR * a);
HRESULT __stdcall GetMonitorFrequency(LPDWORD a);
HRESULT __stdcall GetScanLine(LPDWORD a);
HRESULT __stdcall GetVerticalBlankStatus(LPBOOL a);
HRESULT __stdcall Initialize(GUID FAR * a);
HRESULT __stdcall RestoreDisplayMode(void);
HRESULT __stdcall SetCooperativeLevel(HWND a, DWORD b);
HRESULT __stdcall SetDisplayMode(DWORD a, DWORD b,DWORD c, DWORD d, DWORD e);
HRESULT __stdcall WaitForVerticalBlank(DWORD a, HANDLE b);
/*** Added in the v2 interface ***/
HRESULT __stdcall GetAvailableVidMem(LPDDSCAPS2 a, LPDWORD b, LPDWORD c);
/*** Added in the V4 Interface ***/
HRESULT __stdcall GetSurfaceFromDC(HDC a, LPDIRECTDRAWSURFACE7 * b);
HRESULT __stdcall RestoreAllSurfaces(void);
HRESULT __stdcall TestCooperativeLevel(void);
HRESULT __stdcall GetDeviceIdentifier(LPDDDEVICEIDENTIFIER2 a, DWORD b);
HRESULT __stdcall StartModeTest(LPSIZE a, DWORD b, DWORD c);
HRESULT __stdcall EvaluateMode(DWORD a, DWORD * b);
virtual LPDIRECTDRAW getAsDirectDraw()
{
return (LPDIRECTDRAW)m_pIDDraw;
}
LPDIRECTDRAW7 FAR m_pIDDraw;
};