2 * Copyright (C) 2005 Peter Berg Larsen
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.
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.
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
26 /* Direct3DRM Object CLSID */
27 DEFINE_GUID(CLSID_CDirect3DRM
, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
29 /* Direct3DRM Interface GUIDs */
30 DEFINE_GUID(IID_IDirect3DRM
, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
31 DEFINE_GUID(IID_IDirect3DRM2
, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
32 DEFINE_GUID(IID_IDirect3DRM3
, 0x4516ec83, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
34 typedef void *LPDIRECT3DRM
;
36 HRESULT WINAPI
Direct3DRMCreate(LPDIRECT3DRM
* ppDirect3DRM
);
38 /*****************************************************************************
39 * IDirect3DRMObject interface
41 #ifdef WINE_NO_UNICODE_MACROS
44 #define INTERFACE IDirect3DRM
45 DECLARE_INTERFACE_(IDirect3DRM
,IUnknown
)
47 /*** IUnknown methods ***/
48 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, void** ppvObject
) PURE
;
49 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
50 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
51 /*** IDirect3DRM methods ***/
52 STDMETHOD(CreateObject
)(THIS_ REFCLSID rclsid
, LPUNKNOWN pUnkOuter
, REFIID riid
, LPVOID
*ppvObj
) PURE
;
53 STDMETHOD(CreateFrame
)(THIS_ LPDIRECT3DRMFRAME
, LPDIRECT3DRMFRAME
*) PURE
;
54 STDMETHOD(CreateMesh
)(THIS_ LPDIRECT3DRMMESH
*) PURE
;
55 STDMETHOD(CreateMeshBuilder
)(THIS_ LPDIRECT3DRMMESHBUILDER
*) PURE
;
56 STDMETHOD(CreateFace
)(THIS_ LPDIRECT3DRMFACE
*) PURE
;
57 STDMETHOD(CreateAnimation
)(THIS_ LPDIRECT3DRMANIMATION
*) PURE
;
58 STDMETHOD(CreateAnimationSet
)(THIS_ LPDIRECT3DRMANIMATIONSET
*) PURE
;
59 STDMETHOD(CreateTexture
)(THIS_ LPD3DRMIMAGE
, LPDIRECT3DRMTEXTURE
*) PURE
;
60 STDMETHOD(CreateLight
)(THIS_ D3DRMLIGHTTYPE
, D3DCOLOR
, LPDIRECT3DRMLIGHT
*) PURE
;
61 STDMETHOD(CreateLightRGB
)(THIS_ D3DRMLIGHTTYPE
, D3DVALUE
, D3DVALUE
, D3DVALUE
, LPDIRECT3DRMLIGHT
*) PURE
;
62 STDMETHOD(CreateMaterial
)(THIS_ D3DVALUE
, LPDIRECT3DRMMATERIAL
*) PURE
;
63 STDMETHOD(CreateDevice
)(THIS_ DWORD
, DWORD
, LPDIRECT3DRMDEVICE
*) PURE
;
64 STDMETHOD(CreateDeviceFromSurface
)(THIS_ LPGUID pGUID
, LPDIRECTDRAW pDD
, LPDIRECTDRAWSURFACE pDDSBack
,
65 LPDIRECT3DRMDEVICE
*) PURE
;
66 STDMETHOD(CreateDeviceFromD3D
)(THIS_ LPDIRECT3D pD3D
, LPDIRECT3DDEVICE pD3DDev
, LPDIRECT3DRMDEVICE
*) PURE
;
67 STDMETHOD(CreateDeviceFromClipper
)(THIS_ LPDIRECTDRAWCLIPPER pDDClipper
, LPGUID pGUID
, int width
, int height
,
68 LPDIRECT3DRMDEVICE
*) PURE
;
69 STDMETHOD(CreateShadow
)(THIS_ LPDIRECT3DRMVISUAL
, LPDIRECT3DRMLIGHT
, D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
,
70 D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
, LPDIRECT3DRMVISUAL
*) PURE
;
71 STDMETHOD(CreateTextureFromSurface
)(THIS_ LPDIRECTDRAWSURFACE pDDS
, LPDIRECT3DRMTEXTURE
*) PURE
;
72 STDMETHOD(CreateViewport
)(THIS_ LPDIRECT3DRMDEVICE
, LPDIRECT3DRMFRAME
, DWORD
, DWORD
, DWORD
, DWORD
,
73 LPDIRECT3DRMVIEWPORT
*) PURE
;
74 STDMETHOD(CreateWrap
)(THIS_ D3DRMWRAPTYPE
, LPDIRECT3DRMFRAME
, D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
,
75 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
, D3DVALUE ou
, D3DVALUE ov
,
76 D3DVALUE su
, D3DVALUE sv
, LPDIRECT3DRMWRAP
*) PURE
;
77 STDMETHOD(CreateUserVisual
)(THIS_ D3DRMUSERVISUALCALLBACK
, LPVOID pArg
, LPDIRECT3DRMUSERVISUAL
*) PURE
;
78 STDMETHOD(LoadTexture
)(THIS_
const char *, LPDIRECT3DRMTEXTURE
*) PURE
;
79 STDMETHOD(LoadTextureFromResource
)(THIS_ HRSRC rs
, LPDIRECT3DRMTEXTURE
*) PURE
;
80 STDMETHOD(SetSearchPath
)(THIS_ LPCSTR
) PURE
;
81 STDMETHOD(AddSearchPath
)(THIS_ LPCSTR
) PURE
;
82 STDMETHOD(GetSearchPath
)(THIS_ DWORD
*size_return
, LPSTR path_return
) PURE
;
83 STDMETHOD(SetDefaultTextureColors
)(THIS_ DWORD
) PURE
;
84 STDMETHOD(SetDefaultTextureShades
)(THIS_ DWORD
) PURE
;
85 STDMETHOD(GetDevices
)(THIS_ LPDIRECT3DRMDEVICEARRAY
*) PURE
;
86 STDMETHOD(GetNamedObject
)(THIS_
const char *, LPDIRECT3DRMOBJECT
*) PURE
;
87 STDMETHOD(EnumerateObjects
)(THIS_ D3DRMOBJECTCALLBACK
, LPVOID
) PURE
;
88 STDMETHOD(Load
)(THIS_ LPVOID
, LPVOID
, LPIID
*, DWORD
, D3DRMLOADOPTIONS
, D3DRMLOADCALLBACK
, LPVOID
,
89 D3DRMLOADTEXTURECALLBACK
, LPVOID
, LPDIRECT3DRMFRAME
) PURE
;
90 STDMETHOD(Tick
)(THIS_ D3DVALUE
) PURE
;
94 #if !defined(__cplusplus) || defined(CINTERFACE)
95 /*** IUnknown methods ***/
96 #define IDirect3DRM_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
97 #define IDirect3DRM_AddRef(p) (p)->lpVtbl->AddRef(p)
98 #define IDirect3DRM_Release(p) (p)->lpVtbl->Release(p)
99 /*** IDirect3DRM methods ***/
100 #define IDirect3DRM_CreateObject(p,a,b,c,d) (p)->lpVtbl->CreateObject(p,a,b,d)
101 #define IDirect3DRM_CreateFrame(p,a,b) (p)->lpVtbl->CreateFrame(p,a,b)
102 #define IDirect3DRM_CreateMesh(p,a) (p)->lpVtbl->CreateMesh(p,a)
103 #define IDirect3DRM_CreateMeshBuilder(p,a) (p)->lpVtbl->CreateMeshBuilder(p,a)
104 #define IDirect3DRM_CreateFace(p,a) (p)->lpVtbl->CreateFace(p,a)
105 #define IDirect3DRM_CreateAnimation(p,a) (p)->lpVtbl->CreateAnimation(p,a)
106 #define IDirect3DRM_CreateAnimationSet(p,a) (p)->lpVtbl->CreateAnimationSet(p,a)
107 #define IDirect3DRM_CreateTexture(p,a,b) (p)->lpVtbl->CreateTexture(p,a,b)
108 #define IDirect3DRM_CreateLight(p,a,b,c) (p)->lpVtbl->CreateLight(p,a,b,c)
109 #define IDirect3DRM_CreateLightRGB(p,a,b,c,d,e) (p)->lpVtbl->CreateLightRGB(p,a,b,c,d,e)
110 #define IDirect3DRM_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
111 #define IDirect3DRM_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
112 #define IDirect3DRM_CreateDeviceFromSurface(p,a,b,c,d) (p)->lpVtbl->CreateDeviceFromSurface(p,a,b,c,d)
113 #define IDirect3DRM_CreateDeviceFromD3D(p,a,b,c) (p)->lpVtbl->CreateDeviceFromD3D(p,a,b,c)
114 #define IDirect3DRM_CreateDeviceFromClipper(p,a,b,c,d,e) (p)->lpVtbl->CreateDeviceFromClipper(p,a,b,c,d,e)
115 #define IDirect3DRM_CreateTextureFromSurface(p,a,b) (p)->lpVtbl->CreateTextureFromSurface(p,a,b)
116 #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)
117 #define IDirect3DRM_CreateViewport(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateViewport(p,a,b,c,d,e,f,g)
118 #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)
119 #define IDirect3DRM_CreateUserVisual(p,a,b,c) (p)->lpVtbl->CreateUserVisual(p,a,b,c)
120 #define IDirect3DRM_LoadTexture(p,a,b) (p)->lpVtbl->LoadTexture(p,a,b)
121 #define IDirect3DRM_LoadTextureFromResource(p,a,b) (p)->lpVtbl->LoadTextureFromResource(p,a,b)
122 #define IDirect3DRM_SetSearchPath(p,a) (p)->lpVtbl->SetSearchPath(p,a)
123 #define IDirect3DRM_AddSearchPath(p,a) (p)->lpVtbl->AddSearchPath(p,a)
124 #define IDirect3DRM_GetSearchPath(p,a,b) (p)->lpVtbl->GetSearchPath(p,a,b)
125 #define IDirect3DRM_SetDefaultTextureColors(p,a) (p)->lpVtbl->SetDefaultTextureColors(p,a)
126 #define IDirect3DRM_SetDefaultTextureShades(p,a) (p)->lpVtbl->SetDefaultTextureShades(p,a)
127 #define IDirect3DRM_GetDevices(p,a) (p)->lpVtbl->GetDevices(p,a)
128 #define IDirect3DRM_GetNamedObject(p,a,b) (p)->lpVtbl->GetNamedObject(p,a,b)
129 #define IDirect3DRM_EnumerateObjects(p,a,b) (p)->lpVtbl->EnumerateObjects(p,a,b)
130 #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)
131 #define IDirect3DRM_Tick(p,a) (p)->lpVtbl->Tick(p,a)
133 /*** IUnknown methods ***/
134 #define IDirect3DRM_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
135 #define IDirect3DRM_AddRef(p) (p)->AddRef()
136 #define IDirect3DRM_Release(p) (p)->Release()
137 /*** IDirect3DRM methods ***/
138 #define IDirect3DRM_CreateObject(p,a,b,c,d) (p)->CreateObject(a,b,d)
139 #define IDirect3DRM_CreateFrame(p,a,b) (p)->CreateFrame(a,b)
140 #define IDirect3DRM_CreateMesh(p,a) (p)->CreateMesh(a)
141 #define IDirect3DRM_CreateMeshBuilder(p,a) (p)->CreateMeshBuilder(a)
142 #define IDirect3DRM_CreateFace(p,a) (p)->CreateFace(a)
143 #define IDirect3DRM_CreateAnimation(p,a) (p)->CreateAnimation(a)
144 #define IDirect3DRM_CreateAnimationSet(p,a) (p)->CreateAnimationSet(a)
145 #define IDirect3DRM_CreateTexture(p,a,b) (p)->CreateTexture(a,b)
146 #define IDirect3DRM_CreateLight(p,a,b,c) (p)->CreateLight(a,b,c)
147 #define IDirect3DRM_CreateLightRGB(p,a,b,c,d,e) (p)->CreateLightRGB(a,b,c,d,e)
148 #define IDirect3DRM_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
149 #define IDirect3DRM_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
150 #define IDirect3DRM_CreateDeviceFromSurface(p,a,b,c,d) (p)->CreateDeviceFromSurface(a,b,c,d)
151 #define IDirect3DRM_CreateDeviceFromD3D(p,a,b,c) (p)->CreateDeviceFromD3D(a,b,c)
152 #define IDirect3DRM_CreateDeviceFromClipper(p,a,b,c,d,e) (p)->CreateDeviceFromClipper(a,b,c,d,e)
153 #define IDirect3DRM_CreateTextureFromSurface(p,a,b) (p)->CreateTextureFromSurface(a,b)
154 #define IDirect3DRM_CreateShadow(p,a,b,c,d,e,f,g,h,i) (p)->CreateShadow(a,b,c,d,e,f,g,h,i)
155 #define IDirect3DRM_CreateViewport(p,a,b,c,d,e,f,g) (p)->CreateViewport(a,b,c,d,e,f,g)
156 #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)
157 #define IDirect3DRM_CreateUserVisual(p,a,b,c) (p)->CreateUserVisual(a,b,c)
158 #define IDirect3DRM_LoadTexture(p,a,b) (p)->LoadTexture(a,b)
159 #define IDirect3DRM_LoadTextureFromResource(p,a,b) (p)->LoadTextureFromResource(a,b)
160 #define IDirect3DRM_SetSearchPath(p,a) (p)->SetSearchPath(a)
161 #define IDirect3DRM_AddSearchPath(p,a) (p)->AddSearchPath(a)
162 #define IDirect3DRM_GetSearchPath(p,a,b) (p)->GetSearchPath(a,b)
163 #define IDirect3DRM_SetDefaultTextureColors(p,a) (p)->SetDefaultTextureColors(a)
164 #define IDirect3DRM_SetDefaultTextureShades(p,a) (p)->SetDefaultTextureShades(a)
165 #define IDirect3DRM_GetDevices(p,a) (p)->GetDevices(a)
166 #define IDirect3DRM_GetNamedObject(p,a,b) (p)->GetNamedObject(a,b)
167 #define IDirect3DRM_EnumerateObjects(p,a,b) (p)->EnumerateObjects(a,b)
168 #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)
169 #define IDirect3DRM_Tick(p,a) (p)->Tick(a)
172 #define D3DRM_OK DD_OK
173 #define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
174 #define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
175 #define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
176 #define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
177 #define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
178 #define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
179 #define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
180 #define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
181 #define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
182 #define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
183 #define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
184 #define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
185 #define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
186 #define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
187 #define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
188 #define D3DRMERR_PENDING MAKE_DDHRESULT(796)
189 #define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
190 #define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
191 #define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
192 #define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
193 #define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
194 #define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
195 #define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
196 #define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
197 #define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
198 #define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806)
199 #define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807)
200 #define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808)
201 #define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809)
202 #define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810)
203 #define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811)
204 #define D3DRMERR_NOTAGGREGATED MAKE_DDHRESULT(812)
206 #endif /* __D3DRM_H__ */