1 | /*
|
---|
2 | * Copyright (C) 2005 Peter Berg Larsen
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __D3DRM_H__
|
---|
29 | #define __D3DRM_H__
|
---|
30 |
|
---|
31 | #include <ddraw.h>
|
---|
32 | #include <d3drmobj.h>
|
---|
33 |
|
---|
34 |
|
---|
35 | /* Direct3DRM Object CLSID */
|
---|
36 | DEFINE_GUID(CLSID_CDirect3DRM, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
---|
37 |
|
---|
38 | /* Direct3DRM Interface GUIDs */
|
---|
39 | DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
|
---|
40 | DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
---|
41 | DEFINE_GUID(IID_IDirect3DRM3, 0x4516ec83, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
---|
42 |
|
---|
43 | typedef void *LPDIRECT3DRM;
|
---|
44 |
|
---|
45 | HRESULT WINAPI Direct3DRMCreate(LPDIRECT3DRM* ppDirect3DRM);
|
---|
46 |
|
---|
47 | /*****************************************************************************
|
---|
48 | * IDirect3DRMObject interface
|
---|
49 | */
|
---|
50 | #ifdef WINE_NO_UNICODE_MACROS
|
---|
51 | #undef GetClassName
|
---|
52 | #endif
|
---|
53 | #define INTERFACE IDirect3DRM
|
---|
54 | DECLARE_INTERFACE_(IDirect3DRM,IUnknown)
|
---|
55 | {
|
---|
56 | /*** IUnknown methods ***/
|
---|
57 | STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
|
---|
58 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
59 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
60 | /*** IDirect3DRM methods ***/
|
---|
61 | STDMETHOD(CreateObject)(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) PURE;
|
---|
62 | STDMETHOD(CreateFrame)(THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
|
---|
63 | STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH *) PURE;
|
---|
64 | STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
|
---|
65 | STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE *) PURE;
|
---|
66 | STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION *) PURE;
|
---|
67 | STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
|
---|
68 | STDMETHOD(CreateTexture)(THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
|
---|
69 | STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
---|
70 | STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
---|
71 | STDMETHOD(CreateMaterial)(THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
|
---|
72 | STDMETHOD(CreateDevice)(THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
|
---|
73 | STDMETHOD(CreateDeviceFromSurface)(THIS_ LPGUID pGUID, LPDIRECTDRAW pDD, LPDIRECTDRAWSURFACE pDDSBack,
|
---|
74 | LPDIRECT3DRMDEVICE *) PURE;
|
---|
75 | STDMETHOD(CreateDeviceFromD3D)(THIS_ LPDIRECT3D pD3D, LPDIRECT3DDEVICE pD3DDev, LPDIRECT3DRMDEVICE *) PURE;
|
---|
76 | STDMETHOD(CreateDeviceFromClipper)(THIS_ LPDIRECTDRAWCLIPPER pDDClipper, LPGUID pGUID, int width, int height,
|
---|
77 | LPDIRECT3DRMDEVICE *) PURE;
|
---|
78 | STDMETHOD(CreateShadow)(THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT, D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
---|
79 | D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, LPDIRECT3DRMVISUAL *) PURE;
|
---|
80 | STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE pDDS, LPDIRECT3DRMTEXTURE *) PURE;
|
---|
81 | STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD, DWORD, DWORD,
|
---|
82 | LPDIRECT3DRMVIEWPORT *) PURE;
|
---|
83 | STDMETHOD(CreateWrap)(THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME, D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
---|
84 | D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov,
|
---|
85 | D3DVALUE su, D3DVALUE sv, LPDIRECT3DRMWRAP *) PURE;
|
---|
86 | STDMETHOD(CreateUserVisual)(THIS_ D3DRMUSERVISUALCALLBACK, LPVOID pArg, LPDIRECT3DRMUSERVISUAL *) PURE;
|
---|
87 | STDMETHOD(LoadTexture)(THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
|
---|
88 | STDMETHOD(LoadTextureFromResource)(THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
|
---|
89 | STDMETHOD(SetSearchPath)(THIS_ LPCSTR) PURE;
|
---|
90 | STDMETHOD(AddSearchPath)(THIS_ LPCSTR) PURE;
|
---|
91 | STDMETHOD(GetSearchPath)(THIS_ DWORD *size_return, LPSTR path_return) PURE;
|
---|
92 | STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
|
---|
93 | STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
|
---|
94 | STDMETHOD(GetDevices)(THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
|
---|
95 | STDMETHOD(GetNamedObject)(THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
|
---|
96 | STDMETHOD(EnumerateObjects)(THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
|
---|
97 | STDMETHOD(Load)(THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS, D3DRMLOADCALLBACK, LPVOID,
|
---|
98 | D3DRMLOADTEXTURECALLBACK, LPVOID, LPDIRECT3DRMFRAME) PURE;
|
---|
99 | STDMETHOD(Tick)(THIS_ D3DVALUE) PURE;
|
---|
100 | };
|
---|
101 | #undef INTERFACE
|
---|
102 |
|
---|
103 | #if !defined(__cplusplus) || defined(CINTERFACE)
|
---|
104 | /*** IUnknown methods ***/
|
---|
105 | #define IDirect3DRM_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
---|
106 | #define IDirect3DRM_AddRef(p) (p)->lpVtbl->AddRef(p)
|
---|
107 | #define IDirect3DRM_Release(p) (p)->lpVtbl->Release(p)
|
---|
108 | /*** IDirect3DRM methods ***/
|
---|
109 | #define IDirect3DRM_CreateObject(p,a,b,c,d) (p)->lpVtbl->CreateObject(p,a,b,d)
|
---|
110 | #define IDirect3DRM_CreateFrame(p,a,b) (p)->lpVtbl->CreateFrame(p,a,b)
|
---|
111 | #define IDirect3DRM_CreateMesh(p,a) (p)->lpVtbl->CreateMesh(p,a)
|
---|
112 | #define IDirect3DRM_CreateMeshBuilder(p,a) (p)->lpVtbl->CreateMeshBuilder(p,a)
|
---|
113 | #define IDirect3DRM_CreateFace(p,a) (p)->lpVtbl->CreateFace(p,a)
|
---|
114 | #define IDirect3DRM_CreateAnimation(p,a) (p)->lpVtbl->CreateAnimation(p,a)
|
---|
115 | #define IDirect3DRM_CreateAnimationSet(p,a) (p)->lpVtbl->CreateAnimationSet(p,a)
|
---|
116 | #define IDirect3DRM_CreateTexture(p,a,b) (p)->lpVtbl->CreateTexture(p,a,b)
|
---|
117 | #define IDirect3DRM_CreateLight(p,a,b,c) (p)->lpVtbl->CreateLight(p,a,b,c)
|
---|
118 | #define IDirect3DRM_CreateLightRGB(p,a,b,c,d,e) (p)->lpVtbl->CreateLightRGB(p,a,b,c,d,e)
|
---|
119 | #define IDirect3DRM_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
|
---|
120 | #define IDirect3DRM_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
|
---|
121 | #define IDirect3DRM_CreateDeviceFromSurface(p,a,b,c,d) (p)->lpVtbl->CreateDeviceFromSurface(p,a,b,c,d)
|
---|
122 | #define IDirect3DRM_CreateDeviceFromD3D(p,a,b,c) (p)->lpVtbl->CreateDeviceFromD3D(p,a,b,c)
|
---|
123 | #define IDirect3DRM_CreateDeviceFromClipper(p,a,b,c,d,e) (p)->lpVtbl->CreateDeviceFromClipper(p,a,b,c,d,e)
|
---|
124 | #define IDirect3DRM_CreateTextureFromSurface(p,a,b) (p)->lpVtbl->CreateTextureFromSurface(p,a,b)
|
---|
125 | #define IDirect3DRM_CreateShadow(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CreateShadow(p,a,b,c,d,e,f,g,h,i)
|
---|
126 | #define IDirect3DRM_CreateViewport(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateViewport(p,a,b,c,d,e,f,g)
|
---|
127 | #define IDirect3DRM_CreateWrap(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q) (p)->lpVtbl->CreateWrap(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q)
|
---|
128 | #define IDirect3DRM_CreateUserVisual(p,a,b,c) (p)->lpVtbl->CreateUserVisual(p,a,b,c)
|
---|
129 | #define IDirect3DRM_LoadTexture(p,a,b) (p)->lpVtbl->LoadTexture(p,a,b)
|
---|
130 | #define IDirect3DRM_LoadTextureFromResource(p,a,b) (p)->lpVtbl->LoadTextureFromResource(p,a,b)
|
---|
131 | #define IDirect3DRM_SetSearchPath(p,a) (p)->lpVtbl->SetSearchPath(p,a)
|
---|
132 | #define IDirect3DRM_AddSearchPath(p,a) (p)->lpVtbl->AddSearchPath(p,a)
|
---|
133 | #define IDirect3DRM_GetSearchPath(p,a,b) (p)->lpVtbl->GetSearchPath(p,a,b)
|
---|
134 | #define IDirect3DRM_SetDefaultTextureColors(p,a) (p)->lpVtbl->SetDefaultTextureColors(p,a)
|
---|
135 | #define IDirect3DRM_SetDefaultTextureShades(p,a) (p)->lpVtbl->SetDefaultTextureShades(p,a)
|
---|
136 | #define IDirect3DRM_GetDevices(p,a) (p)->lpVtbl->GetDevices(p,a)
|
---|
137 | #define IDirect3DRM_GetNamedObject(p,a,b) (p)->lpVtbl->GetNamedObject(p,a,b)
|
---|
138 | #define IDirect3DRM_EnumerateObjects(p,a,b) (p)->lpVtbl->EnumerateObjects(p,a,b)
|
---|
139 | #define IDirect3DRM_Load(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Load(p,a,b,c,d,e,f,g,h,i,j)
|
---|
140 | #define IDirect3DRM_Tick(p,a) (p)->lpVtbl->Tick(p,a)
|
---|
141 | #else
|
---|
142 | /*** IUnknown methods ***/
|
---|
143 | #define IDirect3DRM_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
---|
144 | #define IDirect3DRM_AddRef(p) (p)->AddRef()
|
---|
145 | #define IDirect3DRM_Release(p) (p)->Release()
|
---|
146 | /*** IDirect3DRM methods ***/
|
---|
147 | #define IDirect3DRM_CreateObject(p,a,b,c,d) (p)->CreateObject(a,b,d)
|
---|
148 | #define IDirect3DRM_CreateFrame(p,a,b) (p)->CreateFrame(a,b)
|
---|
149 | #define IDirect3DRM_CreateMesh(p,a) (p)->CreateMesh(a)
|
---|
150 | #define IDirect3DRM_CreateMeshBuilder(p,a) (p)->CreateMeshBuilder(a)
|
---|
151 | #define IDirect3DRM_CreateFace(p,a) (p)->CreateFace(a)
|
---|
152 | #define IDirect3DRM_CreateAnimation(p,a) (p)->CreateAnimation(a)
|
---|
153 | #define IDirect3DRM_CreateAnimationSet(p,a) (p)->CreateAnimationSet(a)
|
---|
154 | #define IDirect3DRM_CreateTexture(p,a,b) (p)->CreateTexture(a,b)
|
---|
155 | #define IDirect3DRM_CreateLight(p,a,b,c) (p)->CreateLight(a,b,c)
|
---|
156 | #define IDirect3DRM_CreateLightRGB(p,a,b,c,d,e) (p)->CreateLightRGB(a,b,c,d,e)
|
---|
157 | #define IDirect3DRM_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
|
---|
158 | #define IDirect3DRM_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
|
---|
159 | #define IDirect3DRM_CreateDeviceFromSurface(p,a,b,c,d) (p)->CreateDeviceFromSurface(a,b,c,d)
|
---|
160 | #define IDirect3DRM_CreateDeviceFromD3D(p,a,b,c) (p)->CreateDeviceFromD3D(a,b,c)
|
---|
161 | #define IDirect3DRM_CreateDeviceFromClipper(p,a,b,c,d,e) (p)->CreateDeviceFromClipper(a,b,c,d,e)
|
---|
162 | #define IDirect3DRM_CreateTextureFromSurface(p,a,b) (p)->CreateTextureFromSurface(a,b)
|
---|
163 | #define IDirect3DRM_CreateShadow(p,a,b,c,d,e,f,g,h,i) (p)->CreateShadow(a,b,c,d,e,f,g,h,i)
|
---|
164 | #define IDirect3DRM_CreateViewport(p,a,b,c,d,e,f,g) (p)->CreateViewport(a,b,c,d,e,f,g)
|
---|
165 | #define IDirect3DRM_CreateWrap(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) (p)->CreateWrap(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)
|
---|
166 | #define IDirect3DRM_CreateUserVisual(p,a,b,c) (p)->CreateUserVisual(a,b,c)
|
---|
167 | #define IDirect3DRM_LoadTexture(p,a,b) (p)->LoadTexture(a,b)
|
---|
168 | #define IDirect3DRM_LoadTextureFromResource(p,a,b) (p)->LoadTextureFromResource(a,b)
|
---|
169 | #define IDirect3DRM_SetSearchPath(p,a) (p)->SetSearchPath(a)
|
---|
170 | #define IDirect3DRM_AddSearchPath(p,a) (p)->AddSearchPath(a)
|
---|
171 | #define IDirect3DRM_GetSearchPath(p,a,b) (p)->GetSearchPath(a,b)
|
---|
172 | #define IDirect3DRM_SetDefaultTextureColors(p,a) (p)->SetDefaultTextureColors(a)
|
---|
173 | #define IDirect3DRM_SetDefaultTextureShades(p,a) (p)->SetDefaultTextureShades(a)
|
---|
174 | #define IDirect3DRM_GetDevices(p,a) (p)->GetDevices(a)
|
---|
175 | #define IDirect3DRM_GetNamedObject(p,a,b) (p)->GetNamedObject(a,b)
|
---|
176 | #define IDirect3DRM_EnumerateObjects(p,a,b) (p)->EnumerateObjects(a,b)
|
---|
177 | #define IDirect3DRM_Load(p,a,b,c,d,e,f,g,h,i,j) (p)->Load(a,b,c,d,e,f,g,h,i,j)
|
---|
178 | #define IDirect3DRM_Tick(p,a) (p)->Tick(a)
|
---|
179 | #endif
|
---|
180 |
|
---|
181 | #define D3DRM_OK DD_OK
|
---|
182 | #define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
|
---|
183 | #define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
|
---|
184 | #define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
|
---|
185 | #define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
|
---|
186 | #define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
|
---|
187 | #define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
|
---|
188 | #define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
|
---|
189 | #define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
|
---|
190 | #define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
|
---|
191 | #define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
|
---|
192 | #define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
|
---|
193 | #define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
|
---|
194 | #define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
|
---|
195 | #define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
|
---|
196 | #define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
|
---|
197 | #define D3DRMERR_PENDING MAKE_DDHRESULT(796)
|
---|
198 | #define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
|
---|
199 | #define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
|
---|
200 | #define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
|
---|
201 | #define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
|
---|
202 | #define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
|
---|
203 | #define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
|
---|
204 | #define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
|
---|
205 | #define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
|
---|
206 | #define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
|
---|
207 | #define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806)
|
---|
208 | #define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807)
|
---|
209 | #define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808)
|
---|
210 | #define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809)
|
---|
211 | #define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810)
|
---|
212 | #define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811)
|
---|
213 | #define D3DRMERR_NOTAGGREGATED MAKE_DDHRESULT(812)
|
---|
214 |
|
---|
215 | #endif /* __D3DRM_H__ */
|
---|