2 * Implementation of IDirect3DRMFrame Interface
4 * Copyright 2011, 2012 André Hentschel
5 * Copyright 2012 Christian Costa
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/debug.h"
30 #include "d3drm_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
34 static D3DRMMATRIX4D identity = {
35 { 1.0f, 0.0f, 0.0f, 0.0f },
36 { 0.0f, 1.0f, 0.0f, 0.0f },
37 { 0.0f, 0.0f, 1.0f, 0.0f },
38 { 0.0f, 0.0f, 0.0f, 1.0f }
41 typedef struct IDirect3DRMFrameImpl IDirect3DRMFrameImpl;
43 struct IDirect3DRMFrameImpl {
44 IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
45 IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
47 IDirect3DRMFrameImpl* parent;
49 ULONG children_capacity;
50 IDirect3DRMFrame3** children;
52 ULONG visuals_capacity;
53 IDirect3DRMVisual** visuals;
55 ULONG lights_capacity;
56 IDirect3DRMLight** lights;
57 D3DRMMATRIX4D transform;
61 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
64 LPDIRECT3DRMFRAME* frames;
65 } IDirect3DRMFrameArrayImpl;
68 IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
71 LPDIRECT3DRMVISUAL* visuals;
72 } IDirect3DRMVisualArrayImpl;
74 HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj);
75 HRESULT Direct3DRMVisualArray_create(IDirect3DRMVisualArray** ret_iface);
77 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
79 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame2_iface);
82 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
84 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame3_iface);
87 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface);
88 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
90 /*** IUnknown methods ***/
91 static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
92 REFIID riid, void** object)
94 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
96 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
100 if(IsEqualGUID(riid, &IID_IUnknown) ||
101 IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
102 IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
104 *object = &This->IDirect3DRMFrame2_iface;
106 else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
108 *object = &This->IDirect3DRMFrame3_iface;
112 FIXME("interface %s not implemented\n", debugstr_guid(riid));
113 return E_NOINTERFACE;
116 IDirect3DRMFrame2_AddRef(iface);
120 static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
122 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
123 ULONG ref = InterlockedIncrement(&This->ref);
125 TRACE("(%p)->(): new ref = %d\n", This, ref);
130 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
132 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
133 ULONG ref = InterlockedDecrement(&This->ref);
136 TRACE("(%p)->(): new ref = %d\n", This, ref);
140 for (i = 0; i < This->nb_children; i++)
141 IDirect3DRMFrame3_Release(This->children[i]);
142 HeapFree(GetProcessHeap(), 0, This->children);
143 for (i = 0; i < This->nb_visuals; i++)
144 IDirect3DRMVisual_Release(This->visuals[i]);
145 HeapFree(GetProcessHeap(), 0, This->visuals);
146 for (i = 0; i < This->nb_lights; i++)
147 IDirect3DRMLight_Release(This->lights[i]);
148 HeapFree(GetProcessHeap(), 0, This->lights);
149 HeapFree(GetProcessHeap(), 0, This);
155 /*** IDirect3DRMObject methods ***/
156 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
157 LPUNKNOWN unkwn, REFIID riid,
160 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
162 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
167 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
168 D3DRMOBJECTCALLBACK cb,
171 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
173 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
178 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
179 D3DRMOBJECTCALLBACK cb,
182 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
184 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
189 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
192 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
194 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
199 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
201 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
203 FIXME("(%p/%p)->(): stub\n", iface, This);
208 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2* iface, LPCSTR name)
210 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
212 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
217 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2* iface,
218 LPDWORD size, LPSTR name)
220 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
222 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
227 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2* iface,
228 LPDWORD size, LPSTR name)
230 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
232 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
237 /*** IDirect3DRMFrame methods ***/
238 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2* iface,
239 LPDIRECT3DRMFRAME child)
241 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
242 IDirect3DRMFrameImpl *frame = unsafe_impl_from_IDirect3DRMFrame2((LPDIRECT3DRMFRAME2)child);
244 TRACE("(%p/%p)->(%p)\n", iface, This, child);
247 return D3DRMERR_BADOBJECT;
249 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, &frame->IDirect3DRMFrame3_iface);
252 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
253 LPDIRECT3DRMLIGHT light)
255 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
257 TRACE("(%p/%p)->(%p)\n", iface, This, light);
259 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
262 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
263 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
265 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
267 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
272 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
273 D3DRMCOMBINETYPE type,
274 D3DRMMATRIX4D matrix)
276 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
278 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
280 return IDirect3DRMFrame3_AddTransform(&This->IDirect3DRMFrame3_iface, type, matrix);
283 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
284 D3DRMCOMBINETYPE type,
285 D3DVALUE x, D3DVALUE y, D3DVALUE z)
287 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
289 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
294 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
295 D3DRMCOMBINETYPE type,
296 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
298 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
300 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
305 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
306 D3DRMCOMBINETYPE type,
307 D3DVALUE x, D3DVALUE y, D3DVALUE z,
310 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
312 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
317 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2* iface,
318 LPDIRECT3DRMVISUAL vis)
320 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
322 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
324 return IDirect3DRMFrame3_AddVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
327 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2* iface,
328 LPDIRECT3DRMFRAMEARRAY *children)
330 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
332 TRACE("(%p/%p)->(%p)\n", iface, This, children);
334 return IDirect3DRMFrame3_GetChildren(&This->IDirect3DRMFrame3_iface, children);
337 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
339 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
341 FIXME("(%p/%p)->(): stub\n", iface, This);
346 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
347 LPDIRECT3DRMLIGHTARRAY *lights)
349 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
351 FIXME("(%p/%p)->(%p): stub\n", iface, This, lights);
356 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
358 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
360 FIXME("(%p/%p)->(): stub\n", iface, This);
362 return D3DRMMATERIAL_FROMPARENT;
365 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2* iface,
366 LPDIRECT3DRMFRAME * frame)
368 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
370 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
373 return D3DRMERR_BADVALUE;
377 *frame = (LPDIRECT3DRMFRAME)&This->parent->IDirect3DRMFrame2_iface;
378 IDirect3DRMFrame_AddRef(*frame);
388 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2* iface,
389 LPDIRECT3DRMFRAME reference,
390 LPD3DVECTOR return_position)
392 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
394 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
399 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2* iface,
400 LPDIRECT3DRMFRAME reference,
401 LPD3DVECTOR axis, LPD3DVALUE return_theta)
403 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
405 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
410 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2* iface,
411 LPDIRECT3DRMFRAME * frame)
413 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
415 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
420 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
422 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
424 FIXME("(%p/%p)->(): stub\n", iface, This);
426 return D3DRMSORT_FROMPARENT;
429 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2* iface,
430 LPDIRECT3DRMTEXTURE * tex)
432 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
434 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
439 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
440 D3DRMMATRIX4D return_matrix)
442 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
444 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
446 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
451 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2* iface,
452 LPDIRECT3DRMFRAME reference,
453 LPD3DVECTOR return_velocity,
456 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
458 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
463 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2* iface,
464 LPDIRECT3DRMFRAME reference,
465 LPD3DVECTOR dir, LPD3DVECTOR up)
467 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
469 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
474 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
475 LPDIRECT3DRMVISUALARRAY *visuals)
477 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
478 IDirect3DRMVisualArrayImpl* obj;
481 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
484 return D3DRMERR_BADVALUE;
486 hr = Direct3DRMVisualArray_create(visuals);
491 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
493 obj->size = This->nb_visuals;
494 if (This->nb_visuals)
497 obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(LPDIRECT3DRMVISUAL));
499 return E_OUTOFMEMORY;
500 for (i = 0; i < This->nb_visuals; i++)
502 obj->visuals[i] = This->visuals[i];
503 IDirect3DRMVisual_AddRef(This->visuals[i]);
510 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
511 BOOL *wrap_u, BOOL *wrap_v)
513 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
515 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
520 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
521 D3DVECTOR *d, D3DVECTOR *s)
523 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
525 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
530 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
531 LPVOID name, D3DRMLOADOPTIONS loadflags,
532 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
534 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
536 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
541 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2* iface,
542 LPDIRECT3DRMFRAME target,
543 LPDIRECT3DRMFRAME reference,
544 D3DRMFRAMECONSTRAINT constraint)
546 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
548 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
553 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
555 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
557 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
562 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2* iface,
563 LPDIRECT3DRMFRAME frame)
565 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
566 IDirect3DRMFrameImpl *child = unsafe_impl_from_IDirect3DRMFrame2((LPDIRECT3DRMFRAME2)frame);
568 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
571 return D3DRMERR_BADOBJECT;
573 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, &child->IDirect3DRMFrame3_iface);
576 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
577 LPDIRECT3DRMLIGHT light)
579 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
581 TRACE("(%p/%p)->(%p)\n", iface, This, light);
583 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
586 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
587 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
589 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
591 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
596 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2* iface,
597 LPDIRECT3DRMVISUAL vis)
599 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
601 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
603 return IDirect3DRMFrame3_DeleteVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
606 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
608 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
610 FIXME("(%p/%p)->(): stub\n", iface, This);
615 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
616 LPDIRECTDRAWSURFACE * surface)
618 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
620 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
625 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
627 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
629 FIXME("(%p/%p)->(): stub\n", iface, This);
634 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
636 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
638 FIXME("(%p/%p)->(): stub\n", iface, This);
643 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
645 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
647 FIXME("(%p/%p)->(): stub\n", iface, This);
649 return D3DRMFOG_LINEAR;
652 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
653 D3DVALUE *return_start,
654 D3DVALUE *return_end,
655 D3DVALUE *return_density)
657 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
659 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
664 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
667 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
669 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
674 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
675 D3DVALUE red, D3DVALUE green,
678 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
680 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
685 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
686 LPDIRECTDRAWSURFACE surface)
688 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
690 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
695 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
696 LPDIRECT3DRMTEXTURE texture)
698 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
700 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
705 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
707 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
709 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
714 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
717 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
719 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
724 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
727 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
729 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
734 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
735 D3DVALUE start, D3DVALUE end,
738 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
740 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
745 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
747 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
749 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
754 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
755 D3DVALUE green, D3DVALUE blue)
757 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
759 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
764 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
766 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
768 FIXME("(%p/%p)->(): stub\n", iface, This);
770 return D3DRMZBUFFER_FROMPARENT;
773 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
774 D3DRMMATERIALMODE mode)
776 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
778 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
783 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2* iface,
784 LPDIRECT3DRMFRAME reference,
785 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
786 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
788 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
790 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
791 dx, dy, dz, ux, uy, uz);
796 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2* iface,
797 LPDIRECT3DRMFRAME reference,
798 D3DVALUE x, D3DVALUE y, D3DVALUE z)
800 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
802 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
807 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2* iface,
808 LPDIRECT3DRMFRAME reference,
809 D3DVALUE x, D3DVALUE y, D3DVALUE z,
812 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
814 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
819 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
822 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
824 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
829 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
830 LPDIRECT3DRMTEXTURE texture)
832 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
834 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
839 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
840 BOOL wrap_u, BOOL wrap_v)
842 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
844 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
849 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2* iface,
850 LPDIRECT3DRMFRAME reference,
851 D3DVALUE x, D3DVALUE y, D3DVALUE z,
854 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
856 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
861 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
862 D3DRMZBUFFERMODE mode)
864 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
866 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
871 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
874 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
876 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
881 /*** IDirect3DRMFrame2 methods ***/
882 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
883 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
886 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
888 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
893 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2* iface, LPD3DRMBOX box)
895 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
897 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
902 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
904 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
906 FIXME("(%p/%p)->(): stub\n", iface, This);
911 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2* iface,
912 LPD3DVECTOR dir, LPD3DVECTOR up)
914 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
916 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
921 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
922 LPDIRECT3DRMMATERIAL *material)
924 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
926 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
931 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
933 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
935 FIXME("(%p/%p)->(): stub\n", iface, This);
940 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2* iface,
943 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
945 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
950 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
952 /*** IUnknown methods ***/
953 IDirect3DRMFrame2Impl_QueryInterface,
954 IDirect3DRMFrame2Impl_AddRef,
955 IDirect3DRMFrame2Impl_Release,
956 /*** IDirect3DRMObject methods ***/
957 IDirect3DRMFrame2Impl_Clone,
958 IDirect3DRMFrame2Impl_AddDestroyCallback,
959 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
960 IDirect3DRMFrame2Impl_SetAppData,
961 IDirect3DRMFrame2Impl_GetAppData,
962 IDirect3DRMFrame2Impl_SetName,
963 IDirect3DRMFrame2Impl_GetName,
964 IDirect3DRMFrame2Impl_GetClassName,
965 /*** IDirect3DRMFrame methods ***/
966 IDirect3DRMFrame2Impl_AddChild,
967 IDirect3DRMFrame2Impl_AddLight,
968 IDirect3DRMFrame2Impl_AddMoveCallback,
969 IDirect3DRMFrame2Impl_AddTransform,
970 IDirect3DRMFrame2Impl_AddTranslation,
971 IDirect3DRMFrame2Impl_AddScale,
972 IDirect3DRMFrame2Impl_AddRotation,
973 IDirect3DRMFrame2Impl_AddVisual,
974 IDirect3DRMFrame2Impl_GetChildren,
975 IDirect3DRMFrame2Impl_GetColor,
976 IDirect3DRMFrame2Impl_GetLights,
977 IDirect3DRMFrame2Impl_GetMaterialMode,
978 IDirect3DRMFrame2Impl_GetParent,
979 IDirect3DRMFrame2Impl_GetPosition,
980 IDirect3DRMFrame2Impl_GetRotation,
981 IDirect3DRMFrame2Impl_GetScene,
982 IDirect3DRMFrame2Impl_GetSortMode,
983 IDirect3DRMFrame2Impl_GetTexture,
984 IDirect3DRMFrame2Impl_GetTransform,
985 IDirect3DRMFrame2Impl_GetVelocity,
986 IDirect3DRMFrame2Impl_GetOrientation,
987 IDirect3DRMFrame2Impl_GetVisuals,
988 IDirect3DRMFrame2Impl_GetTextureTopology,
989 IDirect3DRMFrame2Impl_InverseTransform,
990 IDirect3DRMFrame2Impl_Load,
991 IDirect3DRMFrame2Impl_LookAt,
992 IDirect3DRMFrame2Impl_Move,
993 IDirect3DRMFrame2Impl_DeleteChild,
994 IDirect3DRMFrame2Impl_DeleteLight,
995 IDirect3DRMFrame2Impl_DeleteMoveCallback,
996 IDirect3DRMFrame2Impl_DeleteVisual,
997 IDirect3DRMFrame2Impl_GetSceneBackground,
998 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
999 IDirect3DRMFrame2Impl_GetSceneFogColor,
1000 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1001 IDirect3DRMFrame2Impl_GetSceneFogMode,
1002 IDirect3DRMFrame2Impl_GetSceneFogParams,
1003 IDirect3DRMFrame2Impl_SetSceneBackground,
1004 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1005 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1006 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1007 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1008 IDirect3DRMFrame2Impl_SetSceneFogColor,
1009 IDirect3DRMFrame2Impl_SetSceneFogMode,
1010 IDirect3DRMFrame2Impl_SetSceneFogParams,
1011 IDirect3DRMFrame2Impl_SetColor,
1012 IDirect3DRMFrame2Impl_SetColorRGB,
1013 IDirect3DRMFrame2Impl_GetZbufferMode,
1014 IDirect3DRMFrame2Impl_SetMaterialMode,
1015 IDirect3DRMFrame2Impl_SetOrientation,
1016 IDirect3DRMFrame2Impl_SetPosition,
1017 IDirect3DRMFrame2Impl_SetRotation,
1018 IDirect3DRMFrame2Impl_SetSortMode,
1019 IDirect3DRMFrame2Impl_SetTexture,
1020 IDirect3DRMFrame2Impl_SetTextureTopology,
1021 IDirect3DRMFrame2Impl_SetVelocity,
1022 IDirect3DRMFrame2Impl_SetZbufferMode,
1023 IDirect3DRMFrame2Impl_Transform,
1024 /*** IDirect3DRMFrame2 methods ***/
1025 IDirect3DRMFrame2Impl_AddMoveCallback2,
1026 IDirect3DRMFrame2Impl_GetBox,
1027 IDirect3DRMFrame2Impl_GetBoxEnable,
1028 IDirect3DRMFrame2Impl_GetAxes,
1029 IDirect3DRMFrame2Impl_GetMaterial,
1030 IDirect3DRMFrame2Impl_GetInheritAxes,
1031 IDirect3DRMFrame2Impl_GetHierarchyBox
1034 /*** IUnknown methods ***/
1035 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1036 REFIID riid, void** object)
1038 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1039 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1042 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1044 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1045 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1048 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1050 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1051 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1054 /*** IDirect3DRMObject methods ***/
1055 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1056 LPUNKNOWN unkwn, REFIID riid,
1059 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1061 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1066 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1067 D3DRMOBJECTCALLBACK cb,
1070 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1072 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1077 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1078 D3DRMOBJECTCALLBACK cb,
1081 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1083 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1088 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1091 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1093 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1098 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1100 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1102 FIXME("(%p/%p)->(): stub\n", iface, This);
1107 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1109 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1111 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1116 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1117 LPDWORD size, LPSTR name)
1119 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1121 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1126 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1127 LPDWORD size, LPSTR name)
1129 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1131 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1136 /*** IDirect3DRMFrame methods ***/
1137 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3* iface,
1138 LPDIRECT3DRMFRAME3 child)
1140 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1141 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1143 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1146 return D3DRMERR_BADOBJECT;
1148 if (child_obj->parent)
1150 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1152 if (parent == iface)
1154 /* Passed frame is already a child so return success */
1159 /* Remove parent and continue */
1160 IDirect3DRMFrame3_DeleteChild(parent, child);
1164 if ((This->nb_children + 1) > This->children_capacity)
1167 IDirect3DRMFrame3** children;
1169 if (!This->children_capacity)
1172 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1176 new_capacity = This->children_capacity * 2;
1177 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1181 return E_OUTOFMEMORY;
1183 This->children_capacity = new_capacity;
1184 This->children = children;
1187 This->children[This->nb_children++] = child;
1188 IDirect3DRMFrame3_AddRef(child);
1189 child_obj->parent = This;
1194 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
1195 LPDIRECT3DRMLIGHT light)
1197 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1199 IDirect3DRMLight** lights;
1201 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1204 return D3DRMERR_BADOBJECT;
1206 /* Check if already existing and return gracefully without increasing ref count */
1207 for (i = 0; i < This->nb_lights; i++)
1208 if (This->lights[i] == light)
1211 if ((This->nb_lights + 1) > This->lights_capacity)
1215 if (!This->lights_capacity)
1218 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1222 new_capacity = This->lights_capacity * 2;
1223 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1227 return E_OUTOFMEMORY;
1229 This->lights_capacity = new_capacity;
1230 This->lights = lights;
1233 This->lights[This->nb_lights++] = light;
1234 IDirect3DRMLight_AddRef(light);
1239 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1240 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1243 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1245 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1250 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1251 D3DRMCOMBINETYPE type,
1252 D3DRMMATRIX4D matrix)
1254 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1256 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1260 case D3DRMCOMBINE_REPLACE:
1261 memcpy(&This->transform[0][0], &matrix[0][0], sizeof(D3DRMMATRIX4D));
1264 case D3DRMCOMBINE_BEFORE:
1265 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1268 case D3DRMCOMBINE_AFTER:
1269 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1273 WARN("Unknown Combine Type %u\n", type);
1274 return D3DRMERR_BADVALUE;
1280 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1281 D3DRMCOMBINETYPE type,
1282 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1284 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1286 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1291 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1292 D3DRMCOMBINETYPE type,
1293 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1295 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1297 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1302 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1303 D3DRMCOMBINETYPE type,
1304 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1307 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1309 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1314 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1316 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1318 IDirect3DRMVisual** visuals;
1320 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1323 return D3DRMERR_BADOBJECT;
1325 /* Check if already existing and return gracefully without increasing ref count */
1326 for (i = 0; i < This->nb_visuals; i++)
1327 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1330 if ((This->nb_visuals + 1) > This->visuals_capacity)
1334 if (!This->visuals_capacity)
1337 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1341 new_capacity = This->visuals_capacity * 2;
1342 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1346 return E_OUTOFMEMORY;
1348 This->visuals_capacity = new_capacity;
1349 This->visuals = visuals;
1352 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1353 IDirect3DRMVisual_AddRef(vis);
1358 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1359 LPDIRECT3DRMFRAMEARRAY *children)
1361 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1362 IDirect3DRMFrameArrayImpl* obj;
1365 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1368 return D3DRMERR_BADVALUE;
1370 hr = Direct3DRMFrameArray_create(children);
1375 obj = (IDirect3DRMFrameArrayImpl*)*children;
1377 obj->size = This->nb_children;
1378 if (This->nb_children)
1381 obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(LPDIRECT3DRMFRAME));
1383 return E_OUTOFMEMORY;
1384 for (i = 0; i < This->nb_children; i++)
1385 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1391 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1393 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1395 FIXME("(%p/%p)->(): stub\n", iface, This);
1400 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1401 LPDIRECT3DRMLIGHTARRAY *lights)
1403 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1405 FIXME("(%p/%p)->(%p): stub\n", iface, This, lights);
1410 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1412 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1414 FIXME("(%p/%p)->(): stub\n", iface, This);
1416 return D3DRMMATERIAL_FROMPARENT;
1419 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3* iface,
1420 LPDIRECT3DRMFRAME3 * frame)
1422 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1424 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1427 return D3DRMERR_BADVALUE;
1431 *frame = &This->parent->IDirect3DRMFrame3_iface;
1432 IDirect3DRMFrame_AddRef(*frame);
1442 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3* iface,
1443 LPDIRECT3DRMFRAME3 reference,
1444 LPD3DVECTOR return_position)
1446 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1448 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1453 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3* iface,
1454 LPDIRECT3DRMFRAME3 reference,
1455 LPD3DVECTOR axis, LPD3DVALUE return_theta)
1457 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1459 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1464 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3* iface,
1465 LPDIRECT3DRMFRAME3 * frame)
1467 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1469 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
1474 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1476 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1478 FIXME("(%p/%p)->(): stub\n", iface, This);
1480 return D3DRMSORT_FROMPARENT;
1483 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1484 LPDIRECT3DRMTEXTURE3 * tex)
1486 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1488 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1493 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3* iface,
1494 LPDIRECT3DRMFRAME3 reference,
1495 D3DRMMATRIX4D return_matrix)
1497 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1499 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1502 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1504 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
1509 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3* iface,
1510 LPDIRECT3DRMFRAME3 reference,
1511 LPD3DVECTOR return_velocity,
1514 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1516 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1521 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3* iface,
1522 LPDIRECT3DRMFRAME3 reference,
1523 LPD3DVECTOR dir, LPD3DVECTOR up)
1525 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1527 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1532 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1535 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1537 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1542 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1543 D3DVECTOR *d, D3DVECTOR *s)
1545 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1547 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1552 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1553 LPVOID name, D3DRMLOADOPTIONS loadflags,
1554 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1556 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1558 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1563 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3* iface,
1564 LPDIRECT3DRMFRAME3 target,
1565 LPDIRECT3DRMFRAME3 reference,
1566 D3DRMFRAMECONSTRAINT constraint)
1568 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1570 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
1575 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1577 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1579 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1584 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3* iface,
1585 LPDIRECT3DRMFRAME3 frame)
1587 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1588 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1591 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1594 return D3DRMERR_BADOBJECT;
1596 /* Check if child exists */
1597 for (i = 0; i < This->nb_children; i++)
1598 if (This->children[i] == frame)
1601 if (i == This->nb_children)
1602 return D3DRMERR_BADVALUE;
1604 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1605 IDirect3DRMFrame3_Release(frame);
1606 frame_obj->parent = NULL;
1607 This->nb_children--;
1612 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
1613 LPDIRECT3DRMLIGHT light)
1615 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1618 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1621 return D3DRMERR_BADOBJECT;
1623 /* Check if visual exists */
1624 for (i = 0; i < This->nb_lights; i++)
1625 if (This->lights[i] == light)
1628 if (i == This->nb_lights)
1629 return D3DRMERR_BADVALUE;
1631 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1632 IDirect3DRMLight_Release(light);
1638 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1639 D3DRMFRAME3MOVECALLBACK cb,
1642 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1644 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1649 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1651 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1654 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1657 return D3DRMERR_BADOBJECT;
1659 /* Check if visual exists */
1660 for (i = 0; i < This->nb_visuals; i++)
1661 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1664 if (i == This->nb_visuals)
1665 return D3DRMERR_BADVALUE;
1667 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
1668 IDirect3DRMVisual_Release(vis);
1674 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
1676 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1678 FIXME("(%p/%p)->(): stub\n", iface, This);
1683 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
1684 LPDIRECTDRAWSURFACE * surface)
1686 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1688 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1693 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
1695 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1697 FIXME("(%p/%p)->(): stub\n", iface, This);
1702 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
1704 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1706 FIXME("(%p/%p)->(): stub\n", iface, This);
1711 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
1713 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1715 FIXME("(%p/%p)->(): stub\n", iface, This);
1717 return D3DRMFOG_LINEAR;
1720 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
1721 D3DVALUE *return_start,
1722 D3DVALUE *return_end,
1723 D3DVALUE *return_density)
1725 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1727 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1732 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
1735 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1737 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1742 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
1743 D3DVALUE red, D3DVALUE green,
1746 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1748 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1753 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
1754 LPDIRECTDRAWSURFACE surface)
1756 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1758 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1763 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
1764 LPDIRECT3DRMTEXTURE3 texture)
1766 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1768 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1773 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
1775 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1777 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1782 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
1785 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1787 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1792 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
1795 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1797 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1802 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
1803 D3DVALUE start, D3DVALUE end,
1806 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1808 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1813 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
1815 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1817 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1822 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
1823 D3DVALUE green, D3DVALUE blue)
1825 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1827 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1832 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
1834 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1836 FIXME("(%p/%p)->(): stub\n", iface, This);
1838 return D3DRMZBUFFER_FROMPARENT;
1841 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
1842 D3DRMMATERIALMODE mode)
1844 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1846 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1851 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3* iface,
1852 LPDIRECT3DRMFRAME3 reference,
1853 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1854 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
1856 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1858 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
1859 dx, dy, dz, ux, uy, uz);
1864 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3* iface,
1865 LPDIRECT3DRMFRAME3 reference,
1866 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1868 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1870 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
1875 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3* iface,
1876 LPDIRECT3DRMFRAME3 reference,
1877 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1880 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1882 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
1887 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
1890 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1892 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1897 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
1898 LPDIRECT3DRMTEXTURE3 texture)
1900 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1902 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1907 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3* iface,
1908 LPDIRECT3DRMFRAME3 reference,
1909 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1912 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1914 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
1919 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
1920 D3DRMZBUFFERMODE mode)
1922 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1924 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1929 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
1932 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1934 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1939 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
1941 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1943 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1948 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
1950 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1952 FIXME("(%p/%p)->(): stub\n", iface, This);
1957 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3* iface,
1958 LPD3DVECTOR dir, LPD3DVECTOR up)
1960 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1962 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1967 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
1968 LPDIRECT3DRMMATERIAL2 *material)
1970 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1972 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1977 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
1979 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1981 FIXME("(%p/%p)->(): stub\n", iface, This);
1986 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface,
1989 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1991 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1996 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
1998 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2000 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2005 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2007 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2009 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2014 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2015 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2016 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2018 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2020 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2025 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2026 BOOL inherit_from_parent)
2028 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2030 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2035 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
2036 LPDIRECT3DRMMATERIAL2 material)
2038 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2040 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2045 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3* iface,
2046 LPDIRECT3DRMFRAME3 reference,
2049 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2051 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, q);
2056 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3* iface,
2057 LPDIRECT3DRMFRAME3 reference, LPD3DRMRAY ray,
2059 LPDIRECT3DRMPICKED2ARRAY *return_visuals)
2061 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2063 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2068 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2069 D3DRMXOFFORMAT d3dFormat,
2070 D3DRMSAVEOPTIONS d3dSaveFlags)
2072 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2074 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2079 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3* iface,
2080 LPDIRECT3DRMFRAME3 reference,
2081 DWORD num, LPD3DVECTOR dst,
2084 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2086 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2091 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3* iface,
2092 LPDIRECT3DRMFRAME3 reference,
2093 DWORD num, LPD3DVECTOR dst,
2096 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2098 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2103 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2106 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2108 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2113 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2116 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2118 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2123 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2126 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2128 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2133 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2136 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2138 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2143 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3* iface,
2144 LPD3DRMMATERIALOVERRIDE override)
2146 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2148 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2153 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3* iface,
2154 LPD3DRMMATERIALOVERRIDE override)
2156 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2158 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2163 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2165 /*** IUnknown methods ***/
2166 IDirect3DRMFrame3Impl_QueryInterface,
2167 IDirect3DRMFrame3Impl_AddRef,
2168 IDirect3DRMFrame3Impl_Release,
2169 /*** IDirect3DRMObject methods ***/
2170 IDirect3DRMFrame3Impl_Clone,
2171 IDirect3DRMFrame3Impl_AddDestroyCallback,
2172 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2173 IDirect3DRMFrame3Impl_SetAppData,
2174 IDirect3DRMFrame3Impl_GetAppData,
2175 IDirect3DRMFrame3Impl_SetName,
2176 IDirect3DRMFrame3Impl_GetName,
2177 IDirect3DRMFrame3Impl_GetClassName,
2178 /*** IDirect3DRMFrame3 methods ***/
2179 IDirect3DRMFrame3Impl_AddChild,
2180 IDirect3DRMFrame3Impl_AddLight,
2181 IDirect3DRMFrame3Impl_AddMoveCallback,
2182 IDirect3DRMFrame3Impl_AddTransform,
2183 IDirect3DRMFrame3Impl_AddTranslation,
2184 IDirect3DRMFrame3Impl_AddScale,
2185 IDirect3DRMFrame3Impl_AddRotation,
2186 IDirect3DRMFrame3Impl_AddVisual,
2187 IDirect3DRMFrame3Impl_GetChildren,
2188 IDirect3DRMFrame3Impl_GetColor,
2189 IDirect3DRMFrame3Impl_GetLights,
2190 IDirect3DRMFrame3Impl_GetMaterialMode,
2191 IDirect3DRMFrame3Impl_GetParent,
2192 IDirect3DRMFrame3Impl_GetPosition,
2193 IDirect3DRMFrame3Impl_GetRotation,
2194 IDirect3DRMFrame3Impl_GetScene,
2195 IDirect3DRMFrame3Impl_GetSortMode,
2196 IDirect3DRMFrame3Impl_GetTexture,
2197 IDirect3DRMFrame3Impl_GetTransform,
2198 IDirect3DRMFrame3Impl_GetVelocity,
2199 IDirect3DRMFrame3Impl_GetOrientation,
2200 IDirect3DRMFrame3Impl_GetVisuals,
2201 IDirect3DRMFrame3Impl_InverseTransform,
2202 IDirect3DRMFrame3Impl_Load,
2203 IDirect3DRMFrame3Impl_LookAt,
2204 IDirect3DRMFrame3Impl_Move,
2205 IDirect3DRMFrame3Impl_DeleteChild,
2206 IDirect3DRMFrame3Impl_DeleteLight,
2207 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2208 IDirect3DRMFrame3Impl_DeleteVisual,
2209 IDirect3DRMFrame3Impl_GetSceneBackground,
2210 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2211 IDirect3DRMFrame3Impl_GetSceneFogColor,
2212 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2213 IDirect3DRMFrame3Impl_GetSceneFogMode,
2214 IDirect3DRMFrame3Impl_GetSceneFogParams,
2215 IDirect3DRMFrame3Impl_SetSceneBackground,
2216 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2217 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2218 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2219 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2220 IDirect3DRMFrame3Impl_SetSceneFogColor,
2221 IDirect3DRMFrame3Impl_SetSceneFogMode,
2222 IDirect3DRMFrame3Impl_SetSceneFogParams,
2223 IDirect3DRMFrame3Impl_SetColor,
2224 IDirect3DRMFrame3Impl_SetColorRGB,
2225 IDirect3DRMFrame3Impl_GetZbufferMode,
2226 IDirect3DRMFrame3Impl_SetMaterialMode,
2227 IDirect3DRMFrame3Impl_SetOrientation,
2228 IDirect3DRMFrame3Impl_SetPosition,
2229 IDirect3DRMFrame3Impl_SetRotation,
2230 IDirect3DRMFrame3Impl_SetSortMode,
2231 IDirect3DRMFrame3Impl_SetTexture,
2232 IDirect3DRMFrame3Impl_SetVelocity,
2233 IDirect3DRMFrame3Impl_SetZbufferMode,
2234 IDirect3DRMFrame3Impl_Transform,
2235 IDirect3DRMFrame3Impl_GetBox,
2236 IDirect3DRMFrame3Impl_GetBoxEnable,
2237 IDirect3DRMFrame3Impl_GetAxes,
2238 IDirect3DRMFrame3Impl_GetMaterial,
2239 IDirect3DRMFrame3Impl_GetInheritAxes,
2240 IDirect3DRMFrame3Impl_GetHierarchyBox,
2241 IDirect3DRMFrame3Impl_SetBox,
2242 IDirect3DRMFrame3Impl_SetBoxEnable,
2243 IDirect3DRMFrame3Impl_SetAxes,
2244 IDirect3DRMFrame3Impl_SetInheritAxes,
2245 IDirect3DRMFrame3Impl_SetMaterial,
2246 IDirect3DRMFrame3Impl_SetQuaternion,
2247 IDirect3DRMFrame3Impl_RayPick,
2248 IDirect3DRMFrame3Impl_Save,
2249 IDirect3DRMFrame3Impl_TransformVectors,
2250 IDirect3DRMFrame3Impl_InverseTransformVectors,
2251 IDirect3DRMFrame3Impl_SetTraversalOptions,
2252 IDirect3DRMFrame3Impl_GetTraversalOptions,
2253 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2254 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2255 IDirect3DRMFrame3Impl_SetMaterialOverride,
2256 IDirect3DRMFrame3Impl_GetMaterialOverride
2259 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
2263 assert(iface->lpVtbl == &Direct3DRMFrame2_Vtbl);
2265 return impl_from_IDirect3DRMFrame2(iface);
2268 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2272 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2274 return impl_from_IDirect3DRMFrame3(iface);
2277 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2279 IDirect3DRMFrameImpl* object;
2281 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2283 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2286 ERR("Out of memory\n");
2287 return E_OUTOFMEMORY;
2290 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2291 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2294 memcpy(&object->transform[0][0], &identity[0][0], sizeof(D3DRMMATRIX4D));
2296 if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
2299 IDirect3DRMFrame3_AddChild((IDirect3DRMFrame3*)parent, &object->IDirect3DRMFrame3_iface);
2300 *ret_iface = (IUnknown*)&object->IDirect3DRMFrame3_iface;
2305 IDirect3DRMFrame2_AddChild((IDirect3DRMFrame2*)parent, (IDirect3DRMFrame*)&object->IDirect3DRMFrame2_iface);
2306 *ret_iface = (IUnknown*)&object->IDirect3DRMFrame2_iface;
2312 /*** IUnknown methods ***/
2313 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_QueryInterface(IDirect3DRMFrameArray* iface,
2314 REFIID riid, void** object)
2316 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2318 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
2322 if (IsEqualGUID(riid, &IID_IUnknown) ||
2323 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
2325 *object = &This->IDirect3DRMFrameArray_iface;
2329 FIXME("interface %s not implemented\n", debugstr_guid(riid));
2330 return E_NOINTERFACE;
2333 IDirect3DRMFrameArray_AddRef(iface);
2337 static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
2339 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2340 ULONG ref = InterlockedIncrement(&This->ref);
2342 TRACE("(%p)->(): new ref = %u\n", This, ref);
2347 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
2349 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2350 ULONG ref = InterlockedDecrement(&This->ref);
2353 TRACE("(%p)->(): new ref = %u\n", This, ref);
2357 for (i = 0; i < This->size; i++)
2358 IDirect3DRMFrame_Release(This->frames[i]);
2359 HeapFree(GetProcessHeap(), 0, This->frames);
2360 HeapFree(GetProcessHeap(), 0, This);
2366 /*** IDirect3DRMArray methods ***/
2367 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
2369 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2371 TRACE("(%p)->() = %d\n", This, This->size);
2376 /*** IDirect3DRMFrameArray methods ***/
2377 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray* iface, DWORD index, LPDIRECT3DRMFRAME* frame)
2379 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2381 TRACE("(%p)->(%u, %p)\n", This, index, frame);
2384 return D3DRMERR_BADVALUE;
2388 if (index >= This->size)
2389 return D3DRMERR_BADVALUE;
2391 IDirect3DRMFrame_AddRef(This->frames[index]);
2392 *frame = This->frames[index];
2397 static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
2399 /*** IUnknown methods ***/
2400 IDirect3DRMFrameArrayImpl_QueryInterface,
2401 IDirect3DRMFrameArrayImpl_AddRef,
2402 IDirect3DRMFrameArrayImpl_Release,
2403 /*** IDirect3DRMArray methods ***/
2404 IDirect3DRMFrameArrayImpl_GetSize,
2405 /*** IDirect3DRMFrameArray methods ***/
2406 IDirect3DRMFrameArrayImpl_GetElement
2409 HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
2411 IDirect3DRMFrameArrayImpl* object;
2413 TRACE("(%p)\n", obj);
2417 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
2420 ERR("Out of memory\n");
2421 return E_OUTOFMEMORY;
2424 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
2427 *obj = &object->IDirect3DRMFrameArray_iface;
2432 /*** IUnknown methods ***/
2433 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_QueryInterface(IDirect3DRMVisualArray* iface,
2434 REFIID riid, void** ret_iface)
2436 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
2438 if (IsEqualGUID(riid, &IID_IUnknown) ||
2439 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
2442 IDirect3DRMVisualArray_AddRef(iface);
2448 WARN("Interface %s not implemented\n", debugstr_guid(riid));
2450 return E_NOINTERFACE;
2453 static ULONG WINAPI IDirect3DRMVisualArrayImpl_AddRef(IDirect3DRMVisualArray* iface)
2455 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
2456 ULONG ref = InterlockedIncrement(&This->ref);
2458 TRACE("(%p)->(): new ref = %u\n", iface, ref);
2463 static ULONG WINAPI IDirect3DRMVisualArrayImpl_Release(IDirect3DRMVisualArray* iface)
2465 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
2466 ULONG ref = InterlockedDecrement(&This->ref);
2469 TRACE("(%p)->(): new ref = %u\n", iface, ref);
2473 for (i = 0; i < This->size; i++)
2474 IDirect3DRMVisual_Release(This->visuals[i]);
2475 HeapFree(GetProcessHeap(), 0, This->visuals);
2476 HeapFree(GetProcessHeap(), 0, This);
2482 /*** IDirect3DRMArray methods ***/
2483 static DWORD WINAPI IDirect3DRMVisualArrayImpl_GetSize(IDirect3DRMVisualArray* iface)
2485 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
2487 TRACE("(%p)->() = %d\n", iface, This->size);
2492 /*** IDirect3DRMVisualArray methods ***/
2493 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_GetElement(IDirect3DRMVisualArray* iface, DWORD index, LPDIRECT3DRMVISUAL* visual)
2495 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
2497 TRACE("(%p)->(%u, %p)\n", iface, index, visual);
2500 return D3DRMERR_BADVALUE;
2504 if (index >= This->size)
2505 return D3DRMERR_BADVALUE;
2507 IDirect3DRMVisual_AddRef(This->visuals[index]);
2508 *visual = This->visuals[index];
2513 static const struct IDirect3DRMVisualArrayVtbl Direct3DRMVisualArray_Vtbl =
2515 /*** IUnknown methods ***/
2516 IDirect3DRMVisualArrayImpl_QueryInterface,
2517 IDirect3DRMVisualArrayImpl_AddRef,
2518 IDirect3DRMVisualArrayImpl_Release,
2519 /*** IDirect3DRMArray methods ***/
2520 IDirect3DRMVisualArrayImpl_GetSize,
2521 /*** IDirect3DRMVisualArray methods ***/
2522 IDirect3DRMVisualArrayImpl_GetElement
2525 HRESULT Direct3DRMVisualArray_create(IDirect3DRMVisualArray** ret_iface)
2527 IDirect3DRMVisualArrayImpl* object;
2529 TRACE("(%p)\n", ret_iface);
2533 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMVisualArrayImpl));
2536 ERR("Out of memory\n");
2537 return E_OUTOFMEMORY;
2540 object->IDirect3DRMVisualArray_iface.lpVtbl = &Direct3DRMVisualArray_Vtbl;
2543 *ret_iface = &object->IDirect3DRMVisualArray_iface;