2 * Implementation of IDirect3DRMTextureX interfaces
4 * Copyright 2012 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/debug.h"
28 #include "d3drm_private.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(d3drm
);
33 IDirect3DRMTexture2 IDirect3DRMTexture2_iface
;
34 IDirect3DRMTexture3 IDirect3DRMTexture3_iface
;
36 } IDirect3DRMTextureImpl
;
38 static inline IDirect3DRMTextureImpl
*impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2
*iface
)
40 return CONTAINING_RECORD(iface
, IDirect3DRMTextureImpl
, IDirect3DRMTexture2_iface
);
43 static inline IDirect3DRMTextureImpl
*impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3
*iface
)
45 return CONTAINING_RECORD(iface
, IDirect3DRMTextureImpl
, IDirect3DRMTexture3_iface
);
48 /*** IUnknown methods ***/
49 static HRESULT WINAPI
IDirect3DRMTexture2Impl_QueryInterface(IDirect3DRMTexture2
* iface
,
50 REFIID riid
, void** object
)
52 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
54 TRACE("(%p)->(%s, %p)\n", iface
, debugstr_guid(riid
), object
);
58 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
59 IsEqualGUID(riid
, &IID_IDirect3DRMTexture
) ||
60 IsEqualGUID(riid
, &IID_IDirect3DRMTexture2
))
62 *object
= &This
->IDirect3DRMTexture2_iface
;
64 else if IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
)
66 *object
= &This
->IDirect3DRMTexture3_iface
;
70 FIXME("Interface %s not implemented\n", debugstr_guid(riid
));
74 IDirect3DRMTexture3_AddRef(iface
);
79 static ULONG WINAPI
IDirect3DRMTexture2Impl_AddRef(IDirect3DRMTexture2
* iface
)
81 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
82 ULONG ref
= InterlockedIncrement(&This
->ref
);
84 TRACE("(%p)->(): new ref = %d\n", iface
, ref
);
89 static ULONG WINAPI
IDirect3DRMTexture2Impl_Release(IDirect3DRMTexture2
* iface
)
91 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
92 ULONG ref
= InterlockedDecrement(&This
->ref
);
94 TRACE("(%p)->(): new ref = %d\n", iface
, ref
);
97 HeapFree(GetProcessHeap(), 0, This
);
102 /*** IDirect3DRMObject methods ***/
103 static HRESULT WINAPI
IDirect3DRMTexture2Impl_Clone(IDirect3DRMTexture2
* iface
,
104 LPUNKNOWN unknown
, REFIID riid
,
107 FIXME("(%p)->(%p, %s, %p): stub\n", iface
, unknown
, debugstr_guid(riid
), object
);
112 static HRESULT WINAPI
IDirect3DRMTexture2Impl_AddDestroyCallback(IDirect3DRMTexture2
* iface
,
113 D3DRMOBJECTCALLBACK cb
,
116 FIXME("(%p)->(%p, %p): stub\n", iface
, cb
, argument
);
121 static HRESULT WINAPI
IDirect3DRMTexture2Impl_DeleteDestroyCallback(IDirect3DRMTexture2
* iface
,
122 D3DRMOBJECTCALLBACK cb
,
125 FIXME("(%p)->(%p, %p): stub\n", iface
, cb
, argument
);
130 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetAppData(IDirect3DRMTexture2
* iface
,
133 FIXME("(%p)->(%u): stub\n", iface
, data
);
138 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetAppData(IDirect3DRMTexture2
* iface
)
140 FIXME("(%p)->(): stub\n", iface
);
145 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetName(IDirect3DRMTexture2
* iface
, LPCSTR name
)
147 FIXME("(%p)->(%s): stub\n", iface
, name
);
152 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetName(IDirect3DRMTexture2
* iface
,
153 LPDWORD size
, LPSTR name
)
155 FIXME("(%p)->(%p, %p): stub\n", iface
, size
, name
);
160 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetClassName(IDirect3DRMTexture2
* iface
,
161 LPDWORD size
, LPSTR name
)
163 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
165 TRACE("(%p/%p)->(%p, %p)\n", iface
, This
, size
, name
);
167 return IDirect3DRMTexture3_GetClassName(&This
->IDirect3DRMTexture3_iface
, size
, name
);
170 /*** IDirect3DRMTexture3 methods ***/
171 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromFile(IDirect3DRMTexture2
* iface
, const char *filename
)
173 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
175 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, debugstr_a(filename
));
180 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromSurface(IDirect3DRMTexture2
* iface
, LPDIRECTDRAWSURFACE surface
)
182 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
184 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, surface
);
189 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromResource(IDirect3DRMTexture2
* iface
, HRSRC resource
)
191 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
193 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, resource
);
198 static HRESULT WINAPI
IDirect3DRMTexture2Impl_Changed(IDirect3DRMTexture2
* iface
, BOOL pixels
, BOOL palette
)
200 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
202 FIXME("(%p/%p)->(%u, %u): stub\n", iface
, This
, pixels
, palette
);
207 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetColors(IDirect3DRMTexture2
* iface
, DWORD max_colors
)
209 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
211 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_colors
);
216 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetShades(IDirect3DRMTexture2
* iface
, DWORD max_shades
)
218 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
220 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_shades
);
225 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalSize(IDirect3DRMTexture2
* iface
, D3DVALUE width
, D3DVALUE height
)
227 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
229 FIXME("(%p/%p)->(%f, %f): stub\n", iface
, This
, width
, height
);
234 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalOrigin(IDirect3DRMTexture2
* iface
, LONG x
, LONG y
)
236 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
238 FIXME("(%p/%p)->(%d, %d): stub\n", iface
, This
, x
, y
);
243 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalScale(IDirect3DRMTexture2
* iface
, DWORD scale
)
245 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
247 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, scale
);
252 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalTransparency(IDirect3DRMTexture2
* iface
, BOOL transparency
)
254 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
256 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, transparency
);
261 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalTransparentColor(IDirect3DRMTexture2
* iface
, D3DCOLOR color
)
263 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
265 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, color
);
270 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetDecalSize(IDirect3DRMTexture2
* iface
, D3DVALUE
* width
, D3DVALUE
* height
)
272 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
274 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, height
, width
);
279 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetDecalOrigin(IDirect3DRMTexture2
* iface
, LONG
* x
, LONG
* y
)
281 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
283 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, x
, y
);
288 static D3DRMIMAGE
* WINAPI
IDirect3DRMTexture2Impl_GetImage(IDirect3DRMTexture2
* iface
)
290 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
292 FIXME("(%p/%p)->(): stub\n", iface
, This
);
297 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetShades(IDirect3DRMTexture2
* iface
)
299 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
301 FIXME("(%p/%p)->(): stub\n", iface
, This
);
306 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetColors(IDirect3DRMTexture2
* iface
)
308 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
310 FIXME("(%p/%p)->(): stub\n", iface
, This
);
315 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetDecalScale(IDirect3DRMTexture2
* iface
)
317 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
319 FIXME("(%p/%p)->(): stub\n", iface
, This
);
324 static BOOL WINAPI
IDirect3DRMTexture2Impl_GetDecalTransparency(IDirect3DRMTexture2
* iface
)
326 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
328 FIXME("(%p/%p)->(): stub\n", iface
, This
);
333 static D3DCOLOR WINAPI
IDirect3DRMTexture2Impl_GetDecalTransparentColor(IDirect3DRMTexture2
* iface
)
335 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
337 FIXME("(%p/%p)->(): stub\n", iface
, This
);
342 /*** IDirect3DRMTexture2 methods ***/
343 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromImage(IDirect3DRMTexture2
* iface
, LPD3DRMIMAGE image
)
345 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
347 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, image
);
352 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromResource2(IDirect3DRMTexture2
* iface
, HMODULE module
,
353 LPCSTR
/* LPCTSTR */ name
, LPCSTR
/* LPCTSTR */ type
)
355 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
357 FIXME("(%p/%p)->(%p, %s, %s): stub\n", iface
, This
, module
, debugstr_a(name
), debugstr_a(type
));
362 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GenerateMIPMap(IDirect3DRMTexture2
* iface
, DWORD flags
)
364 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
366 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, flags
);
371 static const struct IDirect3DRMTexture2Vtbl Direct3DRMTexture2_Vtbl
=
373 /*** IUnknown methods ***/
374 IDirect3DRMTexture2Impl_QueryInterface
,
375 IDirect3DRMTexture2Impl_AddRef
,
376 IDirect3DRMTexture2Impl_Release
,
377 /*** IDirect3DRMObject methods ***/
378 IDirect3DRMTexture2Impl_Clone
,
379 IDirect3DRMTexture2Impl_AddDestroyCallback
,
380 IDirect3DRMTexture2Impl_DeleteDestroyCallback
,
381 IDirect3DRMTexture2Impl_SetAppData
,
382 IDirect3DRMTexture2Impl_GetAppData
,
383 IDirect3DRMTexture2Impl_SetName
,
384 IDirect3DRMTexture2Impl_GetName
,
385 IDirect3DRMTexture2Impl_GetClassName
,
386 /*** IDirect3DRMTexture methods ***/
387 IDirect3DRMTexture2Impl_InitFromFile
,
388 IDirect3DRMTexture2Impl_InitFromSurface
,
389 IDirect3DRMTexture2Impl_InitFromResource
,
390 IDirect3DRMTexture2Impl_Changed
,
391 IDirect3DRMTexture2Impl_SetColors
,
392 IDirect3DRMTexture2Impl_SetShades
,
393 IDirect3DRMTexture2Impl_SetDecalSize
,
394 IDirect3DRMTexture2Impl_SetDecalOrigin
,
395 IDirect3DRMTexture2Impl_SetDecalScale
,
396 IDirect3DRMTexture2Impl_SetDecalTransparency
,
397 IDirect3DRMTexture2Impl_SetDecalTransparentColor
,
398 IDirect3DRMTexture2Impl_GetDecalSize
,
399 IDirect3DRMTexture2Impl_GetDecalOrigin
,
400 IDirect3DRMTexture2Impl_GetImage
,
401 IDirect3DRMTexture2Impl_GetShades
,
402 IDirect3DRMTexture2Impl_GetColors
,
403 IDirect3DRMTexture2Impl_GetDecalScale
,
404 IDirect3DRMTexture2Impl_GetDecalTransparency
,
405 IDirect3DRMTexture2Impl_GetDecalTransparentColor
,
406 /*** IDirect3DRMTexture2 methods ***/
407 IDirect3DRMTexture2Impl_InitFromImage
,
408 IDirect3DRMTexture2Impl_InitFromResource2
,
409 IDirect3DRMTexture2Impl_GenerateMIPMap
412 /*** IUnknown methods ***/
413 static HRESULT WINAPI
IDirect3DRMTexture3Impl_QueryInterface(IDirect3DRMTexture3
* iface
,
414 REFIID riid
, void** object
)
416 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
418 TRACE("(%p)->(%s, %p)\n", iface
, debugstr_guid(riid
), object
);
422 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
423 IsEqualGUID(riid
, &IID_IDirect3DRMTexture
) ||
424 IsEqualGUID(riid
, &IID_IDirect3DRMTexture2
))
426 *object
= &This
->IDirect3DRMTexture2_iface
;
428 else if IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
)
430 *object
= &This
->IDirect3DRMTexture3_iface
;
434 FIXME("Interface %s not implemented\n", debugstr_guid(riid
));
435 return E_NOINTERFACE
;
438 IDirect3DRMTexture3_AddRef(iface
);
443 static ULONG WINAPI
IDirect3DRMTexture3Impl_AddRef(IDirect3DRMTexture3
* iface
)
445 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
446 ULONG ref
= InterlockedIncrement(&This
->ref
);
448 TRACE("(%p)->(): new ref = %d\n", iface
, ref
);
453 static ULONG WINAPI
IDirect3DRMTexture3Impl_Release(IDirect3DRMTexture3
* iface
)
455 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
456 ULONG ref
= InterlockedDecrement(&This
->ref
);
458 TRACE("(%p)->(): new ref = %d\n", iface
, ref
);
461 HeapFree(GetProcessHeap(), 0, This
);
466 /*** IDirect3DRMObject methods ***/
467 static HRESULT WINAPI
IDirect3DRMTexture3Impl_Clone(IDirect3DRMTexture3
* iface
,
468 LPUNKNOWN unknown
, REFIID riid
,
471 FIXME("(%p)->(%p, %s, %p): stub\n", iface
, unknown
, debugstr_guid(riid
), object
);
476 static HRESULT WINAPI
IDirect3DRMTexture3Impl_AddDestroyCallback(IDirect3DRMTexture3
* iface
,
477 D3DRMOBJECTCALLBACK cb
,
480 FIXME("(%p)->(%p, %p): stub\n", iface
, cb
, argument
);
485 static HRESULT WINAPI
IDirect3DRMTexture3Impl_DeleteDestroyCallback(IDirect3DRMTexture3
* iface
,
486 D3DRMOBJECTCALLBACK cb
,
489 FIXME("(%p)->(%p, %p): stub\n", iface
, cb
, argument
);
494 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetAppData(IDirect3DRMTexture3
* iface
,
497 FIXME("(%p)->(%u): stub\n", iface
, data
);
502 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetAppData(IDirect3DRMTexture3
* iface
)
504 FIXME("(%p)->(): stub\n", iface
);
509 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetName(IDirect3DRMTexture3
* iface
, LPCSTR name
)
511 FIXME("(%p)->(%s): stub\n", iface
, name
);
516 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetName(IDirect3DRMTexture3
* iface
,
517 LPDWORD size
, LPSTR name
)
519 FIXME("(%p)->(%p, %p): stub\n", iface
, size
, name
);
524 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetClassName(IDirect3DRMTexture3
* iface
,
525 LPDWORD size
, LPSTR name
)
527 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
529 TRACE("(%p/%p)->(%p, %p)\n", iface
, This
, size
, name
);
531 if (!size
|| *size
< strlen("Texture") || !name
)
534 strcpy(name
, "Texture");
535 *size
= sizeof("Texture");
540 /*** IDirect3DRMTexture3 methods ***/
541 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromFile(IDirect3DRMTexture3
* iface
, const char *filename
)
543 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
545 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, debugstr_a(filename
));
550 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromSurface(IDirect3DRMTexture3
* iface
, LPDIRECTDRAWSURFACE surface
)
552 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
554 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, surface
);
559 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromResource(IDirect3DRMTexture3
* iface
, HRSRC resource
)
561 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
563 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, resource
);
568 static HRESULT WINAPI
IDirect3DRMTexture3Impl_Changed(IDirect3DRMTexture3
* iface
, DWORD flags
, DWORD nb_rects
, LPRECT rects
)
570 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
572 FIXME("(%p/%p)->(%x, %u, %p): stub\n", iface
, This
, flags
, nb_rects
, rects
);
577 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetColors(IDirect3DRMTexture3
* iface
, DWORD max_colors
)
579 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
581 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_colors
);
586 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetShades(IDirect3DRMTexture3
* iface
, DWORD max_shades
)
588 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
590 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_shades
);
595 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalSize(IDirect3DRMTexture3
* iface
, D3DVALUE width
, D3DVALUE height
)
597 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
599 FIXME("(%p/%p)->(%f, %f): stub\n", iface
, This
, width
, height
);
604 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalOrigin(IDirect3DRMTexture3
* iface
, LONG x
, LONG y
)
606 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
608 FIXME("(%p/%p)->(%d, %d): stub\n", iface
, This
, x
, y
);
613 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalScale(IDirect3DRMTexture3
* iface
, DWORD scale
)
615 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
617 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, scale
);
622 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalTransparency(IDirect3DRMTexture3
* iface
, BOOL transparency
)
624 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
626 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, transparency
);
631 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalTransparentColor(IDirect3DRMTexture3
* iface
, D3DCOLOR color
)
633 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
635 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, color
);
640 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetDecalSize(IDirect3DRMTexture3
* iface
, D3DVALUE
* width
, D3DVALUE
* height
)
642 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
644 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, height
, width
);
649 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetDecalOrigin(IDirect3DRMTexture3
* iface
, LONG
* x
, LONG
* y
)
651 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
653 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, x
, y
);
658 static D3DRMIMAGE
* WINAPI
IDirect3DRMTexture3Impl_GetImage(IDirect3DRMTexture3
* iface
)
660 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
662 FIXME("(%p/%p)->(): stub\n", iface
, This
);
667 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetShades(IDirect3DRMTexture3
* iface
)
669 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
671 FIXME("(%p/%p)->(): stub\n", iface
, This
);
676 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetColors(IDirect3DRMTexture3
* iface
)
678 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
680 FIXME("(%p/%p)->(): stub\n", iface
, This
);
685 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetDecalScale(IDirect3DRMTexture3
* iface
)
687 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
689 FIXME("(%p/%p)->(): stub\n", iface
, This
);
694 static BOOL WINAPI
IDirect3DRMTexture3Impl_GetDecalTransparency(IDirect3DRMTexture3
* iface
)
696 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
698 FIXME("(%p/%p)->(): stub\n", iface
, This
);
703 static D3DCOLOR WINAPI
IDirect3DRMTexture3Impl_GetDecalTransparentColor(IDirect3DRMTexture3
* iface
)
705 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
707 FIXME("(%p/%p)->(): stub\n", iface
, This
);
712 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromImage(IDirect3DRMTexture3
* iface
, LPD3DRMIMAGE image
)
714 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
716 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, image
);
721 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromResource2(IDirect3DRMTexture3
* iface
, HMODULE module
,
722 LPCSTR
/* LPCTSTR */ name
, LPCSTR
/* LPCTSTR */ type
)
724 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
726 FIXME("(%p/%p)->(%p, %s, %s): stub\n", iface
, This
, module
, debugstr_a(name
), debugstr_a(type
));
731 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GenerateMIPMap(IDirect3DRMTexture3
* iface
, DWORD flags
)
733 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
735 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, flags
);
740 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetSurface(IDirect3DRMTexture3
* iface
, DWORD flags
, LPDIRECTDRAWSURFACE
* surface
)
742 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
744 FIXME("(%p/%p)->(%x, %p): stub\n", iface
, This
, flags
, surface
);
749 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetCacheOptions(IDirect3DRMTexture3
* iface
, LONG importance
, DWORD flags
)
751 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
753 FIXME("(%p/%p)->(%d, %x): stub\n", iface
, This
, importance
, flags
);
758 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetCacheOptions(IDirect3DRMTexture3
* iface
, LPLONG importance
, LPDWORD flags
)
760 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
762 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, importance
, flags
);
767 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDownsampleCallback(IDirect3DRMTexture3
* iface
, D3DRMDOWNSAMPLECALLBACK callback
, LPVOID arg
)
769 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
771 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, callback
, arg
);
776 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetValidationCallback(IDirect3DRMTexture3
* iface
, D3DRMVALIDATIONCALLBACK callback
, LPVOID arg
)
778 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
780 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, callback
, arg
);
785 static const struct IDirect3DRMTexture3Vtbl Direct3DRMTexture3_Vtbl
=
787 /*** IUnknown methods ***/
788 IDirect3DRMTexture3Impl_QueryInterface
,
789 IDirect3DRMTexture3Impl_AddRef
,
790 IDirect3DRMTexture3Impl_Release
,
791 /*** IDirect3DRMObject methods ***/
792 IDirect3DRMTexture3Impl_Clone
,
793 IDirect3DRMTexture3Impl_AddDestroyCallback
,
794 IDirect3DRMTexture3Impl_DeleteDestroyCallback
,
795 IDirect3DRMTexture3Impl_SetAppData
,
796 IDirect3DRMTexture3Impl_GetAppData
,
797 IDirect3DRMTexture3Impl_SetName
,
798 IDirect3DRMTexture3Impl_GetName
,
799 IDirect3DRMTexture3Impl_GetClassName
,
800 /*** IDirect3DRMTexture3 methods ***/
801 IDirect3DRMTexture3Impl_InitFromFile
,
802 IDirect3DRMTexture3Impl_InitFromSurface
,
803 IDirect3DRMTexture3Impl_InitFromResource
,
804 IDirect3DRMTexture3Impl_Changed
,
805 IDirect3DRMTexture3Impl_SetColors
,
806 IDirect3DRMTexture3Impl_SetShades
,
807 IDirect3DRMTexture3Impl_SetDecalSize
,
808 IDirect3DRMTexture3Impl_SetDecalOrigin
,
809 IDirect3DRMTexture3Impl_SetDecalScale
,
810 IDirect3DRMTexture3Impl_SetDecalTransparency
,
811 IDirect3DRMTexture3Impl_SetDecalTransparentColor
,
812 IDirect3DRMTexture3Impl_GetDecalSize
,
813 IDirect3DRMTexture3Impl_GetDecalOrigin
,
814 IDirect3DRMTexture3Impl_GetImage
,
815 IDirect3DRMTexture3Impl_GetShades
,
816 IDirect3DRMTexture3Impl_GetColors
,
817 IDirect3DRMTexture3Impl_GetDecalScale
,
818 IDirect3DRMTexture3Impl_GetDecalTransparency
,
819 IDirect3DRMTexture3Impl_GetDecalTransparentColor
,
820 IDirect3DRMTexture3Impl_InitFromImage
,
821 IDirect3DRMTexture3Impl_InitFromResource2
,
822 IDirect3DRMTexture3Impl_GenerateMIPMap
,
823 IDirect3DRMTexture3Impl_GetSurface
,
824 IDirect3DRMTexture3Impl_SetCacheOptions
,
825 IDirect3DRMTexture3Impl_GetCacheOptions
,
826 IDirect3DRMTexture3Impl_SetDownsampleCallback
,
827 IDirect3DRMTexture3Impl_SetValidationCallback
830 HRESULT
Direct3DRMTexture_create(REFIID riid
, IUnknown
** ret_iface
)
832 IDirect3DRMTextureImpl
* object
;
834 TRACE("(%p)\n", ret_iface
);
836 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3DRMTextureImpl
));
839 ERR("Out of memory\n");
840 return E_OUTOFMEMORY
;
843 object
->IDirect3DRMTexture2_iface
.lpVtbl
= &Direct3DRMTexture2_Vtbl
;
844 object
->IDirect3DRMTexture3_iface
.lpVtbl
= &Direct3DRMTexture3_Vtbl
;
847 if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
))
848 *ret_iface
= (IUnknown
*)&object
->IDirect3DRMTexture3_iface
;
850 *ret_iface
= (IUnknown
*)&object
->IDirect3DRMTexture2_iface
;