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
;
37 } IDirect3DRMTextureImpl
;
39 static inline IDirect3DRMTextureImpl
*impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2
*iface
)
41 return CONTAINING_RECORD(iface
, IDirect3DRMTextureImpl
, IDirect3DRMTexture2_iface
);
44 static inline IDirect3DRMTextureImpl
*impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3
*iface
)
46 return CONTAINING_RECORD(iface
, IDirect3DRMTextureImpl
, IDirect3DRMTexture3_iface
);
49 /*** IUnknown methods ***/
50 static HRESULT WINAPI
IDirect3DRMTexture2Impl_QueryInterface(IDirect3DRMTexture2
* iface
,
51 REFIID riid
, void** object
)
53 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
55 TRACE("(%p)->(%s, %p)\n", iface
, debugstr_guid(riid
), object
);
59 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
60 IsEqualGUID(riid
, &IID_IDirect3DRMTexture
) ||
61 IsEqualGUID(riid
, &IID_IDirect3DRMTexture2
))
63 *object
= &This
->IDirect3DRMTexture2_iface
;
65 else if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
))
67 *object
= &This
->IDirect3DRMTexture3_iface
;
71 FIXME("Interface %s not implemented\n", debugstr_guid(riid
));
75 IDirect3DRMTexture3_AddRef(iface
);
80 static ULONG WINAPI
IDirect3DRMTexture2Impl_AddRef(IDirect3DRMTexture2
* iface
)
82 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
83 ULONG ref
= InterlockedIncrement(&This
->ref
);
85 TRACE("(%p)->(): new ref = %d\n", iface
, ref
);
90 static ULONG WINAPI
IDirect3DRMTexture2Impl_Release(IDirect3DRMTexture2
* iface
)
92 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
93 ULONG ref
= InterlockedDecrement(&This
->ref
);
95 TRACE("(%p)->(): new ref = %d\n", iface
, ref
);
98 HeapFree(GetProcessHeap(), 0, This
);
103 /*** IDirect3DRMObject methods ***/
104 static HRESULT WINAPI
IDirect3DRMTexture2Impl_Clone(IDirect3DRMTexture2
*iface
,
105 IUnknown
*outer
, REFIID iid
, void **out
)
107 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
112 static HRESULT WINAPI
IDirect3DRMTexture2Impl_AddDestroyCallback(IDirect3DRMTexture2
*iface
,
113 D3DRMOBJECTCALLBACK cb
, void *ctx
)
115 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
120 static HRESULT WINAPI
IDirect3DRMTexture2Impl_DeleteDestroyCallback(IDirect3DRMTexture2
*iface
,
121 D3DRMOBJECTCALLBACK cb
, void *ctx
)
123 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
128 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetAppData(IDirect3DRMTexture2
* iface
,
131 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
133 TRACE("(%p)->(%u)\n", iface
, data
);
135 return IDirect3DRMTexture3_SetAppData(&This
->IDirect3DRMTexture3_iface
, data
);
138 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetAppData(IDirect3DRMTexture2
* iface
)
140 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
142 TRACE("(%p)->()\n", iface
);
144 return IDirect3DRMTexture3_GetAppData(&This
->IDirect3DRMTexture3_iface
);
147 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetName(IDirect3DRMTexture2
*iface
, const char *name
)
149 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
154 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetName(IDirect3DRMTexture2
*iface
, DWORD
*size
, char *name
)
156 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
161 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetClassName(IDirect3DRMTexture2
*iface
, DWORD
*size
, char *name
)
163 IDirect3DRMTextureImpl
*texture
= impl_from_IDirect3DRMTexture2(iface
);
165 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
167 return IDirect3DRMTexture3_GetClassName(&texture
->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
,
181 IDirectDrawSurface
*surface
)
183 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
185 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, surface
);
190 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromResource(IDirect3DRMTexture2
* iface
, HRSRC resource
)
192 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
194 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, resource
);
199 static HRESULT WINAPI
IDirect3DRMTexture2Impl_Changed(IDirect3DRMTexture2
* iface
, BOOL pixels
, BOOL palette
)
201 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
203 FIXME("(%p/%p)->(%u, %u): stub\n", iface
, This
, pixels
, palette
);
208 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetColors(IDirect3DRMTexture2
* iface
, DWORD max_colors
)
210 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
212 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_colors
);
217 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetShades(IDirect3DRMTexture2
* iface
, DWORD max_shades
)
219 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
221 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_shades
);
226 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalSize(IDirect3DRMTexture2
* iface
, D3DVALUE width
, D3DVALUE height
)
228 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
230 FIXME("(%p/%p)->(%f, %f): stub\n", iface
, This
, width
, height
);
235 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalOrigin(IDirect3DRMTexture2
* iface
, LONG x
, LONG y
)
237 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
239 FIXME("(%p/%p)->(%d, %d): stub\n", iface
, This
, x
, y
);
244 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalScale(IDirect3DRMTexture2
* iface
, DWORD scale
)
246 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
248 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, scale
);
253 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalTransparency(IDirect3DRMTexture2
* iface
, BOOL transparency
)
255 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
257 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, transparency
);
262 static HRESULT WINAPI
IDirect3DRMTexture2Impl_SetDecalTransparentColor(IDirect3DRMTexture2
* iface
, D3DCOLOR color
)
264 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
266 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, color
);
271 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetDecalSize(IDirect3DRMTexture2
* iface
, D3DVALUE
* width
, D3DVALUE
* height
)
273 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
275 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, height
, width
);
280 static HRESULT WINAPI
IDirect3DRMTexture2Impl_GetDecalOrigin(IDirect3DRMTexture2
* iface
, LONG
* x
, LONG
* y
)
282 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
284 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, x
, y
);
289 static D3DRMIMAGE
* WINAPI
IDirect3DRMTexture2Impl_GetImage(IDirect3DRMTexture2
* iface
)
291 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
293 FIXME("(%p/%p)->(): stub\n", iface
, This
);
298 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetShades(IDirect3DRMTexture2
* iface
)
300 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
302 FIXME("(%p/%p)->(): stub\n", iface
, This
);
307 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetColors(IDirect3DRMTexture2
* iface
)
309 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
311 FIXME("(%p/%p)->(): stub\n", iface
, This
);
316 static DWORD WINAPI
IDirect3DRMTexture2Impl_GetDecalScale(IDirect3DRMTexture2
* iface
)
318 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
320 FIXME("(%p/%p)->(): stub\n", iface
, This
);
325 static BOOL WINAPI
IDirect3DRMTexture2Impl_GetDecalTransparency(IDirect3DRMTexture2
* iface
)
327 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
329 FIXME("(%p/%p)->(): stub\n", iface
, This
);
334 static D3DCOLOR WINAPI
IDirect3DRMTexture2Impl_GetDecalTransparentColor(IDirect3DRMTexture2
* iface
)
336 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
338 FIXME("(%p/%p)->(): stub\n", iface
, This
);
343 /*** IDirect3DRMTexture2 methods ***/
344 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromImage(IDirect3DRMTexture2
*iface
, D3DRMIMAGE
*image
)
346 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture2(iface
);
348 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, image
);
353 static HRESULT WINAPI
IDirect3DRMTexture2Impl_InitFromResource2(IDirect3DRMTexture2
*iface
,
354 HMODULE module
, const char *name
, const char *type
)
356 FIXME("iface %p, module %p, name %s, type %s stub!\n",
357 iface
, 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 IUnknown
*outer
, REFIID iid
, void **out
)
470 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
475 static HRESULT WINAPI
IDirect3DRMTexture3Impl_AddDestroyCallback(IDirect3DRMTexture3
*iface
,
476 D3DRMOBJECTCALLBACK cb
, void *ctx
)
478 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
483 static HRESULT WINAPI
IDirect3DRMTexture3Impl_DeleteDestroyCallback(IDirect3DRMTexture3
*iface
,
484 D3DRMOBJECTCALLBACK cb
, void *ctx
)
486 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
491 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetAppData(IDirect3DRMTexture3
* iface
,
494 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
496 TRACE("(%p)->(%u)\n", iface
, data
);
498 This
->app_data
= data
;
503 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetAppData(IDirect3DRMTexture3
* iface
)
505 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
507 TRACE("(%p)->()\n", iface
);
509 return This
->app_data
;
512 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetName(IDirect3DRMTexture3
*iface
, const char *name
)
514 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
519 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetName(IDirect3DRMTexture3
*iface
, DWORD
*size
, char *name
)
521 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
526 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetClassName(IDirect3DRMTexture3
*iface
, DWORD
*size
, char *name
)
528 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
530 if (!size
|| *size
< strlen("Texture") || !name
)
533 strcpy(name
, "Texture");
534 *size
= sizeof("Texture");
539 /*** IDirect3DRMTexture3 methods ***/
540 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromFile(IDirect3DRMTexture3
* iface
, const char *filename
)
542 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
544 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, debugstr_a(filename
));
549 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromSurface(IDirect3DRMTexture3
*iface
,
550 IDirectDrawSurface
*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
,
569 DWORD flags
, DWORD rect_count
, RECT
*rects
)
571 FIXME("iface %p, flags %#x, rect_count %u, rects %p stub!\n", iface
, flags
, rect_count
, rects
);
576 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetColors(IDirect3DRMTexture3
* iface
, DWORD max_colors
)
578 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
580 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_colors
);
585 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetShades(IDirect3DRMTexture3
* iface
, DWORD max_shades
)
587 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
589 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, max_shades
);
594 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalSize(IDirect3DRMTexture3
* iface
, D3DVALUE width
, D3DVALUE height
)
596 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
598 FIXME("(%p/%p)->(%f, %f): stub\n", iface
, This
, width
, height
);
603 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalOrigin(IDirect3DRMTexture3
* iface
, LONG x
, LONG y
)
605 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
607 FIXME("(%p/%p)->(%d, %d): stub\n", iface
, This
, x
, y
);
612 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalScale(IDirect3DRMTexture3
* iface
, DWORD scale
)
614 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
616 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, scale
);
621 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalTransparency(IDirect3DRMTexture3
* iface
, BOOL transparency
)
623 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
625 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, transparency
);
630 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDecalTransparentColor(IDirect3DRMTexture3
* iface
, D3DCOLOR color
)
632 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
634 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, color
);
639 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetDecalSize(IDirect3DRMTexture3
* iface
, D3DVALUE
* width
, D3DVALUE
* height
)
641 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
643 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, height
, width
);
648 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetDecalOrigin(IDirect3DRMTexture3
* iface
, LONG
* x
, LONG
* y
)
650 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
652 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, x
, y
);
657 static D3DRMIMAGE
* WINAPI
IDirect3DRMTexture3Impl_GetImage(IDirect3DRMTexture3
* iface
)
659 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
661 FIXME("(%p/%p)->(): stub\n", iface
, This
);
666 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetShades(IDirect3DRMTexture3
* iface
)
668 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
670 FIXME("(%p/%p)->(): stub\n", iface
, This
);
675 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetColors(IDirect3DRMTexture3
* iface
)
677 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
679 FIXME("(%p/%p)->(): stub\n", iface
, This
);
684 static DWORD WINAPI
IDirect3DRMTexture3Impl_GetDecalScale(IDirect3DRMTexture3
* iface
)
686 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
688 FIXME("(%p/%p)->(): stub\n", iface
, This
);
693 static BOOL WINAPI
IDirect3DRMTexture3Impl_GetDecalTransparency(IDirect3DRMTexture3
* iface
)
695 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
697 FIXME("(%p/%p)->(): stub\n", iface
, This
);
702 static D3DCOLOR WINAPI
IDirect3DRMTexture3Impl_GetDecalTransparentColor(IDirect3DRMTexture3
* iface
)
704 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
706 FIXME("(%p/%p)->(): stub\n", iface
, This
);
711 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromImage(IDirect3DRMTexture3
*iface
, D3DRMIMAGE
*image
)
713 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
715 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, image
);
720 static HRESULT WINAPI
IDirect3DRMTexture3Impl_InitFromResource2(IDirect3DRMTexture3
*iface
,
721 HMODULE module
, const char *name
, const char *type
)
723 FIXME("iface %p, module %p, name %s, type %s stub!\n",
724 iface
, module
, debugstr_a(name
), debugstr_a(type
));
729 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GenerateMIPMap(IDirect3DRMTexture3
* iface
, DWORD flags
)
731 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
733 FIXME("(%p/%p)->(%x): stub\n", iface
, This
, flags
);
738 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetSurface(IDirect3DRMTexture3
*iface
,
739 DWORD flags
, IDirectDrawSurface
**surface
)
741 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
743 FIXME("(%p/%p)->(%x, %p): stub\n", iface
, This
, flags
, surface
);
748 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetCacheOptions(IDirect3DRMTexture3
* iface
, LONG importance
, DWORD flags
)
750 IDirect3DRMTextureImpl
*This
= impl_from_IDirect3DRMTexture3(iface
);
752 FIXME("(%p/%p)->(%d, %x): stub\n", iface
, This
, importance
, flags
);
757 static HRESULT WINAPI
IDirect3DRMTexture3Impl_GetCacheOptions(IDirect3DRMTexture3
*iface
,
758 LONG
*importance
, DWORD
*flags
)
760 FIXME("iface %p, importance %p, flags %p stub!\n", iface
, importance
, flags
);
765 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetDownsampleCallback(IDirect3DRMTexture3
*iface
,
766 D3DRMDOWNSAMPLECALLBACK cb
, void *ctx
)
768 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
773 static HRESULT WINAPI
IDirect3DRMTexture3Impl_SetValidationCallback(IDirect3DRMTexture3
*iface
,
774 D3DRMVALIDATIONCALLBACK cb
, void *ctx
)
776 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
781 static const struct IDirect3DRMTexture3Vtbl Direct3DRMTexture3_Vtbl
=
783 /*** IUnknown methods ***/
784 IDirect3DRMTexture3Impl_QueryInterface
,
785 IDirect3DRMTexture3Impl_AddRef
,
786 IDirect3DRMTexture3Impl_Release
,
787 /*** IDirect3DRMObject methods ***/
788 IDirect3DRMTexture3Impl_Clone
,
789 IDirect3DRMTexture3Impl_AddDestroyCallback
,
790 IDirect3DRMTexture3Impl_DeleteDestroyCallback
,
791 IDirect3DRMTexture3Impl_SetAppData
,
792 IDirect3DRMTexture3Impl_GetAppData
,
793 IDirect3DRMTexture3Impl_SetName
,
794 IDirect3DRMTexture3Impl_GetName
,
795 IDirect3DRMTexture3Impl_GetClassName
,
796 /*** IDirect3DRMTexture3 methods ***/
797 IDirect3DRMTexture3Impl_InitFromFile
,
798 IDirect3DRMTexture3Impl_InitFromSurface
,
799 IDirect3DRMTexture3Impl_InitFromResource
,
800 IDirect3DRMTexture3Impl_Changed
,
801 IDirect3DRMTexture3Impl_SetColors
,
802 IDirect3DRMTexture3Impl_SetShades
,
803 IDirect3DRMTexture3Impl_SetDecalSize
,
804 IDirect3DRMTexture3Impl_SetDecalOrigin
,
805 IDirect3DRMTexture3Impl_SetDecalScale
,
806 IDirect3DRMTexture3Impl_SetDecalTransparency
,
807 IDirect3DRMTexture3Impl_SetDecalTransparentColor
,
808 IDirect3DRMTexture3Impl_GetDecalSize
,
809 IDirect3DRMTexture3Impl_GetDecalOrigin
,
810 IDirect3DRMTexture3Impl_GetImage
,
811 IDirect3DRMTexture3Impl_GetShades
,
812 IDirect3DRMTexture3Impl_GetColors
,
813 IDirect3DRMTexture3Impl_GetDecalScale
,
814 IDirect3DRMTexture3Impl_GetDecalTransparency
,
815 IDirect3DRMTexture3Impl_GetDecalTransparentColor
,
816 IDirect3DRMTexture3Impl_InitFromImage
,
817 IDirect3DRMTexture3Impl_InitFromResource2
,
818 IDirect3DRMTexture3Impl_GenerateMIPMap
,
819 IDirect3DRMTexture3Impl_GetSurface
,
820 IDirect3DRMTexture3Impl_SetCacheOptions
,
821 IDirect3DRMTexture3Impl_GetCacheOptions
,
822 IDirect3DRMTexture3Impl_SetDownsampleCallback
,
823 IDirect3DRMTexture3Impl_SetValidationCallback
826 HRESULT
Direct3DRMTexture_create(REFIID riid
, IUnknown
** ret_iface
)
828 IDirect3DRMTextureImpl
* object
;
830 TRACE("(%p)\n", ret_iface
);
832 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3DRMTextureImpl
));
834 return E_OUTOFMEMORY
;
836 object
->IDirect3DRMTexture2_iface
.lpVtbl
= &Direct3DRMTexture2_Vtbl
;
837 object
->IDirect3DRMTexture3_iface
.lpVtbl
= &Direct3DRMTexture3_Vtbl
;
840 if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
))
841 *ret_iface
= (IUnknown
*)&object
->IDirect3DRMTexture3_iface
;
843 *ret_iface
= (IUnknown
*)&object
->IDirect3DRMTexture2_iface
;