2 * Implementation of IDirect3DRMFrame Interface
4 * Copyright 2011, 2012 André Hentschel
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
22 #include "wine/debug.h"
29 #include "d3drm_private.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
33 static D3DRMMATRIX4D identity = {
34 { 1.0f, 0.0f, 0.0f, 0.0f },
35 { 0.0f, 1.0f, 0.0f, 0.0f },
36 { 0.0f, 0.0f, 1.0f, 0.0f },
37 { 0.0f, 0.0f, 0.0f, 1.0f }
40 typedef struct IDirect3DRMFrameImpl IDirect3DRMFrameImpl;
42 struct IDirect3DRMFrameImpl {
43 IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
44 IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
46 IDirect3DRMFrameImpl* parent;
48 ULONG children_capacity;
49 IDirect3DRMFrame3** children;
51 ULONG visuals_capacity;
52 IDirect3DRMVisual** visuals;
54 ULONG lights_capacity;
55 IDirect3DRMLight** lights;
56 D3DRMMATRIX4D transform;
60 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
63 LPDIRECT3DRMFRAME* frames;
64 } IDirect3DRMFrameArrayImpl;
66 HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj);
68 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
70 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame2_iface);
73 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
75 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame3_iface);
78 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface);
79 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
81 /*** IUnknown methods ***/
82 static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
83 REFIID riid, void** object)
85 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
87 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
91 if(IsEqualGUID(riid, &IID_IUnknown) ||
92 IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
93 IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
95 *object = &This->IDirect3DRMFrame2_iface;
97 else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
99 *object = &This->IDirect3DRMFrame3_iface;
103 FIXME("interface %s not implemented\n", debugstr_guid(riid));
104 return E_NOINTERFACE;
107 IDirect3DRMFrame2_AddRef(iface);
111 static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
113 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
114 ULONG ref = InterlockedIncrement(&This->ref);
116 TRACE("(%p)->(): new ref = %d\n", This, ref);
121 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
123 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
124 ULONG ref = InterlockedDecrement(&This->ref);
127 TRACE("(%p)->(): new ref = %d\n", This, ref);
131 for (i = 0; i < This->nb_children; i++)
132 IDirect3DRMFrame3_Release(This->children[i]);
133 HeapFree(GetProcessHeap(), 0, This->children);
134 HeapFree(GetProcessHeap(), 0, This);
140 /*** IDirect3DRMObject methods ***/
141 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
142 LPUNKNOWN unkwn, REFIID riid,
145 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
147 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
152 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
153 D3DRMOBJECTCALLBACK cb,
156 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
158 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
163 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
164 D3DRMOBJECTCALLBACK cb,
167 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
169 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
174 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
177 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
179 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
184 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
186 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
188 FIXME("(%p/%p)->(): stub\n", iface, This);
193 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2* iface, LPCSTR name)
195 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
197 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
202 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2* iface,
203 LPDWORD size, LPSTR name)
205 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
207 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
212 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2* iface,
213 LPDWORD size, LPSTR name)
215 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
217 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
222 /*** IDirect3DRMFrame methods ***/
223 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2* iface,
224 LPDIRECT3DRMFRAME child)
226 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
227 IDirect3DRMFrameImpl *frame;
229 TRACE("(%p/%p)->(%p)\n", iface, This, child);
231 frame = unsafe_impl_from_IDirect3DRMFrame2((LPDIRECT3DRMFRAME2)child);
234 return D3DRMERR_BADOBJECT;
236 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, &frame->IDirect3DRMFrame3_iface);
239 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
240 LPDIRECT3DRMLIGHT light)
242 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
244 TRACE("(%p/%p)->(%p)\n", iface, This, light);
246 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
249 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
250 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
252 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
254 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
259 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
260 D3DRMCOMBINETYPE type,
261 D3DRMMATRIX4D matrix)
263 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
265 FIXME("(%p/%p)->(%u,%p): stub\n", iface, This, type, matrix);
270 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
271 D3DRMCOMBINETYPE type,
272 D3DVALUE x, D3DVALUE y, D3DVALUE z)
274 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
276 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
281 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
282 D3DRMCOMBINETYPE type,
283 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
285 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
287 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
292 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
293 D3DRMCOMBINETYPE type,
294 D3DVALUE x, D3DVALUE y, D3DVALUE z,
297 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
299 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
304 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2* iface,
305 LPDIRECT3DRMVISUAL vis)
307 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
309 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
311 return IDirect3DRMFrame3_AddVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
314 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2* iface,
315 LPDIRECT3DRMFRAMEARRAY *children)
317 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
319 TRACE("(%p/%p)->(%p)\n", iface, This, children);
321 return IDirect3DRMFrame3_GetChildren(&This->IDirect3DRMFrame3_iface, children);
324 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
326 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
328 FIXME("(%p/%p)->(): stub\n", iface, This);
333 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
334 LPDIRECT3DRMLIGHTARRAY *lights)
336 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
338 FIXME("(%p/%p)->(%p): stub\n", iface, This, lights);
343 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
345 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
347 FIXME("(%p/%p)->(): stub\n", iface, This);
349 return D3DRMMATERIAL_FROMPARENT;
352 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2* iface,
353 LPDIRECT3DRMFRAME * frame)
355 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
357 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
360 return D3DRMERR_BADVALUE;
364 *frame = (LPDIRECT3DRMFRAME)&This->parent->IDirect3DRMFrame2_iface;
365 IDirect3DRMFrame_AddRef(*frame);
375 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2* iface,
376 LPDIRECT3DRMFRAME reference,
377 LPD3DVECTOR return_position)
379 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
381 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
386 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2* iface,
387 LPDIRECT3DRMFRAME reference,
388 LPD3DVECTOR axis, LPD3DVALUE return_theta)
390 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
392 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
397 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2* iface,
398 LPDIRECT3DRMFRAME * frame)
400 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
402 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
407 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
409 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
411 FIXME("(%p/%p)->(): stub\n", iface, This);
413 return D3DRMSORT_FROMPARENT;
416 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2* iface,
417 LPDIRECT3DRMTEXTURE * tex)
419 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
421 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
426 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
427 D3DRMMATRIX4D return_matrix)
429 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
431 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
433 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
438 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2* iface,
439 LPDIRECT3DRMFRAME reference,
440 LPD3DVECTOR return_velocity,
443 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
445 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
450 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2* iface,
451 LPDIRECT3DRMFRAME reference,
452 LPD3DVECTOR dir, LPD3DVECTOR up)
454 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
456 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
461 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
462 LPDIRECT3DRMVISUALARRAY *visuals)
464 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
466 FIXME("(%p/%p)->(%p): stub\n", iface, This, visuals);
471 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
472 BOOL *wrap_u, BOOL *wrap_v)
474 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
476 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
481 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
482 D3DVECTOR *d, D3DVECTOR *s)
484 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
486 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
491 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
492 LPVOID name, D3DRMLOADOPTIONS loadflags,
493 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
495 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
497 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
502 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2* iface,
503 LPDIRECT3DRMFRAME target,
504 LPDIRECT3DRMFRAME reference,
505 D3DRMFRAMECONSTRAINT constraint)
507 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
509 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
514 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
516 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
518 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
523 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2* iface,
524 LPDIRECT3DRMFRAME frame)
526 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
527 IDirect3DRMFrameImpl *child;
529 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
531 child = unsafe_impl_from_IDirect3DRMFrame2((LPDIRECT3DRMFRAME2)frame);
534 return D3DRMERR_BADOBJECT;
536 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, &child->IDirect3DRMFrame3_iface);
539 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
540 LPDIRECT3DRMLIGHT light)
542 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
544 TRACE("(%p/%p)->(%p)\n", iface, This, light);
546 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
549 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
550 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
552 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
554 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
559 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2* iface,
560 LPDIRECT3DRMVISUAL vis)
562 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
564 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
566 return IDirect3DRMFrame3_DeleteVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
569 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
571 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
573 FIXME("(%p/%p)->(): stub\n", iface, This);
578 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
579 LPDIRECTDRAWSURFACE * surface)
581 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
583 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
588 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
590 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
592 FIXME("(%p/%p)->(): stub\n", iface, This);
597 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
599 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
601 FIXME("(%p/%p)->(): stub\n", iface, This);
606 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
608 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
610 FIXME("(%p/%p)->(): stub\n", iface, This);
612 return D3DRMFOG_LINEAR;
615 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
616 D3DVALUE *return_start,
617 D3DVALUE *return_end,
618 D3DVALUE *return_density)
620 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
622 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
627 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
630 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
632 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
637 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
638 D3DVALUE red, D3DVALUE green,
641 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
643 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
648 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
649 LPDIRECTDRAWSURFACE surface)
651 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
653 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
658 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
659 LPDIRECT3DRMTEXTURE texture)
661 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
663 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
668 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
670 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
672 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
677 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
680 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
682 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
687 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
690 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
692 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
697 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
698 D3DVALUE start, D3DVALUE end,
701 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
703 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
708 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
710 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
712 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
717 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
718 D3DVALUE green, D3DVALUE blue)
720 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
722 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
727 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
729 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
731 FIXME("(%p/%p)->(): stub\n", iface, This);
733 return D3DRMZBUFFER_FROMPARENT;
736 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
737 D3DRMMATERIALMODE mode)
739 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
741 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
746 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2* iface,
747 LPDIRECT3DRMFRAME reference,
748 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
749 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
751 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
753 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
754 dx, dy, dz, ux, uy, uz);
759 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2* iface,
760 LPDIRECT3DRMFRAME reference,
761 D3DVALUE x, D3DVALUE y, D3DVALUE z)
763 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
765 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
770 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2* iface,
771 LPDIRECT3DRMFRAME reference,
772 D3DVALUE x, D3DVALUE y, D3DVALUE z,
775 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
777 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
782 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
785 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
787 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
792 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
793 LPDIRECT3DRMTEXTURE texture)
795 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
797 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
802 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
803 BOOL wrap_u, BOOL wrap_v)
805 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
807 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
812 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2* iface,
813 LPDIRECT3DRMFRAME reference,
814 D3DVALUE x, D3DVALUE y, D3DVALUE z,
817 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
819 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
824 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
825 D3DRMZBUFFERMODE mode)
827 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
829 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
834 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
837 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
839 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
844 /*** IDirect3DRMFrame2 methods ***/
845 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
846 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
849 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
851 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
856 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2* iface, LPD3DRMBOX box)
858 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
860 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
865 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
867 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
869 FIXME("(%p/%p)->(): stub\n", iface, This);
874 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2* iface,
875 LPD3DVECTOR dir, LPD3DVECTOR up)
877 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
879 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
884 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
885 LPDIRECT3DRMMATERIAL *material)
887 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
889 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
894 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
896 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
898 FIXME("(%p/%p)->(): stub\n", iface, This);
903 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2* iface,
906 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
908 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
913 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
915 /*** IUnknown methods ***/
916 IDirect3DRMFrame2Impl_QueryInterface,
917 IDirect3DRMFrame2Impl_AddRef,
918 IDirect3DRMFrame2Impl_Release,
919 /*** IDirect3DRMObject methods ***/
920 IDirect3DRMFrame2Impl_Clone,
921 IDirect3DRMFrame2Impl_AddDestroyCallback,
922 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
923 IDirect3DRMFrame2Impl_SetAppData,
924 IDirect3DRMFrame2Impl_GetAppData,
925 IDirect3DRMFrame2Impl_SetName,
926 IDirect3DRMFrame2Impl_GetName,
927 IDirect3DRMFrame2Impl_GetClassName,
928 /*** IDirect3DRMFrame methods ***/
929 IDirect3DRMFrame2Impl_AddChild,
930 IDirect3DRMFrame2Impl_AddLight,
931 IDirect3DRMFrame2Impl_AddMoveCallback,
932 IDirect3DRMFrame2Impl_AddTransform,
933 IDirect3DRMFrame2Impl_AddTranslation,
934 IDirect3DRMFrame2Impl_AddScale,
935 IDirect3DRMFrame2Impl_AddRotation,
936 IDirect3DRMFrame2Impl_AddVisual,
937 IDirect3DRMFrame2Impl_GetChildren,
938 IDirect3DRMFrame2Impl_GetColor,
939 IDirect3DRMFrame2Impl_GetLights,
940 IDirect3DRMFrame2Impl_GetMaterialMode,
941 IDirect3DRMFrame2Impl_GetParent,
942 IDirect3DRMFrame2Impl_GetPosition,
943 IDirect3DRMFrame2Impl_GetRotation,
944 IDirect3DRMFrame2Impl_GetScene,
945 IDirect3DRMFrame2Impl_GetSortMode,
946 IDirect3DRMFrame2Impl_GetTexture,
947 IDirect3DRMFrame2Impl_GetTransform,
948 IDirect3DRMFrame2Impl_GetVelocity,
949 IDirect3DRMFrame2Impl_GetOrientation,
950 IDirect3DRMFrame2Impl_GetVisuals,
951 IDirect3DRMFrame2Impl_GetTextureTopology,
952 IDirect3DRMFrame2Impl_InverseTransform,
953 IDirect3DRMFrame2Impl_Load,
954 IDirect3DRMFrame2Impl_LookAt,
955 IDirect3DRMFrame2Impl_Move,
956 IDirect3DRMFrame2Impl_DeleteChild,
957 IDirect3DRMFrame2Impl_DeleteLight,
958 IDirect3DRMFrame2Impl_DeleteMoveCallback,
959 IDirect3DRMFrame2Impl_DeleteVisual,
960 IDirect3DRMFrame2Impl_GetSceneBackground,
961 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
962 IDirect3DRMFrame2Impl_GetSceneFogColor,
963 IDirect3DRMFrame2Impl_GetSceneFogEnable,
964 IDirect3DRMFrame2Impl_GetSceneFogMode,
965 IDirect3DRMFrame2Impl_GetSceneFogParams,
966 IDirect3DRMFrame2Impl_SetSceneBackground,
967 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
968 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
969 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
970 IDirect3DRMFrame2Impl_SetSceneFogEnable,
971 IDirect3DRMFrame2Impl_SetSceneFogColor,
972 IDirect3DRMFrame2Impl_SetSceneFogMode,
973 IDirect3DRMFrame2Impl_SetSceneFogParams,
974 IDirect3DRMFrame2Impl_SetColor,
975 IDirect3DRMFrame2Impl_SetColorRGB,
976 IDirect3DRMFrame2Impl_GetZbufferMode,
977 IDirect3DRMFrame2Impl_SetMaterialMode,
978 IDirect3DRMFrame2Impl_SetOrientation,
979 IDirect3DRMFrame2Impl_SetPosition,
980 IDirect3DRMFrame2Impl_SetRotation,
981 IDirect3DRMFrame2Impl_SetSortMode,
982 IDirect3DRMFrame2Impl_SetTexture,
983 IDirect3DRMFrame2Impl_SetTextureTopology,
984 IDirect3DRMFrame2Impl_SetVelocity,
985 IDirect3DRMFrame2Impl_SetZbufferMode,
986 IDirect3DRMFrame2Impl_Transform,
987 /*** IDirect3DRMFrame2 methods ***/
988 IDirect3DRMFrame2Impl_AddMoveCallback2,
989 IDirect3DRMFrame2Impl_GetBox,
990 IDirect3DRMFrame2Impl_GetBoxEnable,
991 IDirect3DRMFrame2Impl_GetAxes,
992 IDirect3DRMFrame2Impl_GetMaterial,
993 IDirect3DRMFrame2Impl_GetInheritAxes,
994 IDirect3DRMFrame2Impl_GetHierarchyBox
997 /*** IUnknown methods ***/
998 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
999 REFIID riid, void** object)
1001 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1002 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1005 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1007 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1008 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1011 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1013 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1014 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1017 /*** IDirect3DRMObject methods ***/
1018 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1019 LPUNKNOWN unkwn, REFIID riid,
1022 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1024 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1029 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1030 D3DRMOBJECTCALLBACK cb,
1033 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1035 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1040 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1041 D3DRMOBJECTCALLBACK cb,
1044 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1046 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1051 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1054 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1056 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1061 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1063 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1065 FIXME("(%p/%p)->(): stub\n", iface, This);
1070 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1072 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1074 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1079 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1080 LPDWORD size, LPSTR name)
1082 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1084 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1089 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1090 LPDWORD size, LPSTR name)
1092 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1094 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1099 /*** IDirect3DRMFrame methods ***/
1100 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3* iface,
1101 LPDIRECT3DRMFRAME3 child)
1103 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1104 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1106 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1109 return D3DRMERR_BADOBJECT;
1111 if (child_obj->parent)
1113 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1115 if (parent == iface)
1117 /* Passed frame is already a child so return success */
1122 /* Remove parent and continue */
1123 IDirect3DRMFrame3_DeleteChild(parent, child);
1127 if ((This->nb_children + 1) > This->children_capacity)
1130 IDirect3DRMFrame3** children;
1132 if (!This->children_capacity)
1135 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1139 new_capacity = This->children_capacity * 2;
1140 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1144 return E_OUTOFMEMORY;
1146 This->children_capacity = new_capacity;
1147 This->children = children;
1150 This->children[This->nb_children++] = child;
1151 IDirect3DRMFrame3_AddRef(child);
1152 child_obj->parent = This;
1157 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
1158 LPDIRECT3DRMLIGHT light)
1160 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1162 IDirect3DRMLight** lights;
1164 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1167 return D3DRMERR_BADOBJECT;
1169 /* Check if already existing and return gracefully without increasing ref count */
1170 for (i = 0; i < This->nb_lights; i++)
1171 if (This->lights[i] == light)
1174 if ((This->nb_lights + 1) > This->lights_capacity)
1178 if (!This->lights_capacity)
1181 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1185 new_capacity = This->lights_capacity * 2;
1186 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1190 return E_OUTOFMEMORY;
1192 This->lights_capacity = new_capacity;
1193 This->lights = lights;
1196 This->lights[This->nb_lights++] = light;
1197 IDirect3DRMLight_AddRef(light);
1202 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1203 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1206 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1208 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1213 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1214 D3DRMCOMBINETYPE type,
1215 D3DRMMATRIX4D matrix)
1217 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1219 FIXME("(%p/%p)->(%u,%p): stub\n", iface, This, type, matrix);
1224 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1225 D3DRMCOMBINETYPE type,
1226 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1228 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1230 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1235 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1236 D3DRMCOMBINETYPE type,
1237 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1239 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1241 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1246 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1247 D3DRMCOMBINETYPE type,
1248 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1251 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1253 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1258 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1260 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1262 IDirect3DRMVisual** visuals;
1264 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1267 return D3DRMERR_BADOBJECT;
1269 /* Check if already existing and return gracefully without increasing ref count */
1270 for (i = 0; i < This->nb_visuals; i++)
1271 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1274 if ((This->nb_visuals + 1) > This->visuals_capacity)
1278 if (!This->visuals_capacity)
1281 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1285 new_capacity = This->visuals_capacity * 2;
1286 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1290 return E_OUTOFMEMORY;
1292 This->visuals_capacity = new_capacity;
1293 This->visuals = visuals;
1296 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1297 IDirect3DRMVisual_AddRef(vis);
1302 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1303 LPDIRECT3DRMFRAMEARRAY *children)
1305 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1306 IDirect3DRMFrameArrayImpl* obj;
1309 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1312 return D3DRMERR_BADVALUE;
1314 hr = Direct3DRMFrameArray_create(children);
1319 obj = (IDirect3DRMFrameArrayImpl*)*children;
1321 obj->size = This->nb_children;
1322 if (This->nb_children)
1325 obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(LPDIRECT3DRMFRAME));
1327 return E_OUTOFMEMORY;
1328 for (i = 0; i < This->nb_children; i++)
1329 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1335 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1337 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1339 FIXME("(%p/%p)->(): stub\n", iface, This);
1344 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1345 LPDIRECT3DRMLIGHTARRAY *lights)
1347 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1349 FIXME("(%p/%p)->(%p): stub\n", iface, This, lights);
1354 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1356 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1358 FIXME("(%p/%p)->(): stub\n", iface, This);
1360 return D3DRMMATERIAL_FROMPARENT;
1363 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3* iface,
1364 LPDIRECT3DRMFRAME3 * frame)
1366 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1368 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1371 return D3DRMERR_BADVALUE;
1375 *frame = &This->parent->IDirect3DRMFrame3_iface;
1376 IDirect3DRMFrame_AddRef(*frame);
1386 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3* iface,
1387 LPDIRECT3DRMFRAME3 reference,
1388 LPD3DVECTOR return_position)
1390 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1392 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1397 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3* iface,
1398 LPDIRECT3DRMFRAME3 reference,
1399 LPD3DVECTOR axis, LPD3DVALUE return_theta)
1401 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1403 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1408 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3* iface,
1409 LPDIRECT3DRMFRAME3 * frame)
1411 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1413 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
1418 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1420 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1422 FIXME("(%p/%p)->(): stub\n", iface, This);
1424 return D3DRMSORT_FROMPARENT;
1427 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1428 LPDIRECT3DRMTEXTURE3 * tex)
1430 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1432 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1437 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3* iface,
1438 LPDIRECT3DRMFRAME3 reference,
1439 D3DRMMATRIX4D return_matrix)
1441 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1443 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1446 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1448 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
1453 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3* iface,
1454 LPDIRECT3DRMFRAME3 reference,
1455 LPD3DVECTOR return_velocity,
1458 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1460 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1465 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3* iface,
1466 LPDIRECT3DRMFRAME3 reference,
1467 LPD3DVECTOR dir, LPD3DVECTOR up)
1469 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1471 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1476 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1479 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1481 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1486 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1487 D3DVECTOR *d, D3DVECTOR *s)
1489 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1491 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1496 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1497 LPVOID name, D3DRMLOADOPTIONS loadflags,
1498 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1500 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1502 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1507 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3* iface,
1508 LPDIRECT3DRMFRAME3 target,
1509 LPDIRECT3DRMFRAME3 reference,
1510 D3DRMFRAMECONSTRAINT constraint)
1512 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1514 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
1519 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1521 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1523 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1528 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3* iface,
1529 LPDIRECT3DRMFRAME3 frame)
1531 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1532 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1535 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1538 return D3DRMERR_BADOBJECT;
1540 /* Check if child exists */
1541 for (i = 0; i < This->nb_children; i++)
1542 if (This->children[i] == frame)
1545 if (i == This->nb_children)
1546 return D3DRMERR_BADVALUE;
1548 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1549 IDirect3DRMFrame3_Release(frame);
1550 frame_obj->parent = NULL;
1551 This->nb_children--;
1556 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
1557 LPDIRECT3DRMLIGHT light)
1559 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1562 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1565 return D3DRMERR_BADOBJECT;
1567 /* Check if visual exists */
1568 for (i = 0; i < This->nb_lights; i++)
1569 if (This->lights[i] == light)
1572 if (i == This->nb_lights)
1573 return D3DRMERR_BADVALUE;
1575 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1576 IDirect3DRMLight_Release(light);
1582 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1583 D3DRMFRAME3MOVECALLBACK cb,
1586 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1588 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1593 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1595 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1598 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1601 return D3DRMERR_BADOBJECT;
1603 /* Check if visual exists */
1604 for (i = 0; i < This->nb_visuals; i++)
1605 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1608 if (i == This->nb_visuals)
1609 return D3DRMERR_BADVALUE;
1611 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
1612 IDirect3DRMVisual_Release(vis);
1618 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
1620 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1622 FIXME("(%p/%p)->(): stub\n", iface, This);
1627 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
1628 LPDIRECTDRAWSURFACE * surface)
1630 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1632 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1637 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
1639 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1641 FIXME("(%p/%p)->(): stub\n", iface, This);
1646 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
1648 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1650 FIXME("(%p/%p)->(): stub\n", iface, This);
1655 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
1657 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1659 FIXME("(%p/%p)->(): stub\n", iface, This);
1661 return D3DRMFOG_LINEAR;
1664 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
1665 D3DVALUE *return_start,
1666 D3DVALUE *return_end,
1667 D3DVALUE *return_density)
1669 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1671 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1676 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
1679 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1681 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1686 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
1687 D3DVALUE red, D3DVALUE green,
1690 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1692 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1697 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
1698 LPDIRECTDRAWSURFACE surface)
1700 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1702 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1707 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
1708 LPDIRECT3DRMTEXTURE3 texture)
1710 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1712 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1717 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
1719 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1721 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1726 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
1729 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1731 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1736 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
1739 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1741 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1746 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
1747 D3DVALUE start, D3DVALUE end,
1750 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1752 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1757 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
1759 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1761 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1766 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
1767 D3DVALUE green, D3DVALUE blue)
1769 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1771 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1776 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
1778 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1780 FIXME("(%p/%p)->(): stub\n", iface, This);
1782 return D3DRMZBUFFER_FROMPARENT;
1785 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
1786 D3DRMMATERIALMODE mode)
1788 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1790 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1795 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3* iface,
1796 LPDIRECT3DRMFRAME3 reference,
1797 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1798 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
1800 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1802 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
1803 dx, dy, dz, ux, uy, uz);
1808 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3* iface,
1809 LPDIRECT3DRMFRAME3 reference,
1810 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1812 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1814 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
1819 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3* iface,
1820 LPDIRECT3DRMFRAME3 reference,
1821 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1824 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1826 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
1831 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
1834 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1836 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1841 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
1842 LPDIRECT3DRMTEXTURE3 texture)
1844 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1846 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1851 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3* iface,
1852 LPDIRECT3DRMFRAME3 reference,
1853 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1856 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1858 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
1863 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
1864 D3DRMZBUFFERMODE mode)
1866 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1868 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1873 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
1876 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1878 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1883 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
1885 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1887 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1892 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
1894 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1896 FIXME("(%p/%p)->(): stub\n", iface, This);
1901 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3* iface,
1902 LPD3DVECTOR dir, LPD3DVECTOR up)
1904 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1906 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1911 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
1912 LPDIRECT3DRMMATERIAL2 *material)
1914 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1916 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1921 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
1923 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1925 FIXME("(%p/%p)->(): stub\n", iface, This);
1930 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface,
1933 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1935 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1940 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
1942 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1944 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1949 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
1951 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1953 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
1958 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
1959 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1960 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1962 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1964 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
1969 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
1970 BOOL inherit_from_parent)
1972 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1974 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
1979 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
1980 LPDIRECT3DRMMATERIAL2 material)
1982 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1984 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1989 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3* iface,
1990 LPDIRECT3DRMFRAME3 reference,
1993 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1995 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, q);
2000 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3* iface,
2001 LPDIRECT3DRMFRAME3 reference, LPD3DRMRAY ray,
2003 LPDIRECT3DRMPICKED2ARRAY *return_visuals)
2005 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2007 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2012 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2013 D3DRMXOFFORMAT d3dFormat,
2014 D3DRMSAVEOPTIONS d3dSaveFlags)
2016 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2018 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2023 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3* iface,
2024 LPDIRECT3DRMFRAME3 reference,
2025 DWORD num, LPD3DVECTOR dst,
2028 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2030 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2035 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3* iface,
2036 LPDIRECT3DRMFRAME3 reference,
2037 DWORD num, LPD3DVECTOR dst,
2040 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2042 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2047 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2050 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2052 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2057 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2060 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2062 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2067 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2070 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2072 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2077 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2080 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2082 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2087 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3* iface,
2088 LPD3DRMMATERIALOVERRIDE override)
2090 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2092 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2097 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3* iface,
2098 LPD3DRMMATERIALOVERRIDE override)
2100 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2102 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2107 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2109 /*** IUnknown methods ***/
2110 IDirect3DRMFrame3Impl_QueryInterface,
2111 IDirect3DRMFrame3Impl_AddRef,
2112 IDirect3DRMFrame3Impl_Release,
2113 /*** IDirect3DRMObject methods ***/
2114 IDirect3DRMFrame3Impl_Clone,
2115 IDirect3DRMFrame3Impl_AddDestroyCallback,
2116 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2117 IDirect3DRMFrame3Impl_SetAppData,
2118 IDirect3DRMFrame3Impl_GetAppData,
2119 IDirect3DRMFrame3Impl_SetName,
2120 IDirect3DRMFrame3Impl_GetName,
2121 IDirect3DRMFrame3Impl_GetClassName,
2122 /*** IDirect3DRMFrame3 methods ***/
2123 IDirect3DRMFrame3Impl_AddChild,
2124 IDirect3DRMFrame3Impl_AddLight,
2125 IDirect3DRMFrame3Impl_AddMoveCallback,
2126 IDirect3DRMFrame3Impl_AddTransform,
2127 IDirect3DRMFrame3Impl_AddTranslation,
2128 IDirect3DRMFrame3Impl_AddScale,
2129 IDirect3DRMFrame3Impl_AddRotation,
2130 IDirect3DRMFrame3Impl_AddVisual,
2131 IDirect3DRMFrame3Impl_GetChildren,
2132 IDirect3DRMFrame3Impl_GetColor,
2133 IDirect3DRMFrame3Impl_GetLights,
2134 IDirect3DRMFrame3Impl_GetMaterialMode,
2135 IDirect3DRMFrame3Impl_GetParent,
2136 IDirect3DRMFrame3Impl_GetPosition,
2137 IDirect3DRMFrame3Impl_GetRotation,
2138 IDirect3DRMFrame3Impl_GetScene,
2139 IDirect3DRMFrame3Impl_GetSortMode,
2140 IDirect3DRMFrame3Impl_GetTexture,
2141 IDirect3DRMFrame3Impl_GetTransform,
2142 IDirect3DRMFrame3Impl_GetVelocity,
2143 IDirect3DRMFrame3Impl_GetOrientation,
2144 IDirect3DRMFrame3Impl_GetVisuals,
2145 IDirect3DRMFrame3Impl_InverseTransform,
2146 IDirect3DRMFrame3Impl_Load,
2147 IDirect3DRMFrame3Impl_LookAt,
2148 IDirect3DRMFrame3Impl_Move,
2149 IDirect3DRMFrame3Impl_DeleteChild,
2150 IDirect3DRMFrame3Impl_DeleteLight,
2151 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2152 IDirect3DRMFrame3Impl_DeleteVisual,
2153 IDirect3DRMFrame3Impl_GetSceneBackground,
2154 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2155 IDirect3DRMFrame3Impl_GetSceneFogColor,
2156 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2157 IDirect3DRMFrame3Impl_GetSceneFogMode,
2158 IDirect3DRMFrame3Impl_GetSceneFogParams,
2159 IDirect3DRMFrame3Impl_SetSceneBackground,
2160 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2161 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2162 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2163 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2164 IDirect3DRMFrame3Impl_SetSceneFogColor,
2165 IDirect3DRMFrame3Impl_SetSceneFogMode,
2166 IDirect3DRMFrame3Impl_SetSceneFogParams,
2167 IDirect3DRMFrame3Impl_SetColor,
2168 IDirect3DRMFrame3Impl_SetColorRGB,
2169 IDirect3DRMFrame3Impl_GetZbufferMode,
2170 IDirect3DRMFrame3Impl_SetMaterialMode,
2171 IDirect3DRMFrame3Impl_SetOrientation,
2172 IDirect3DRMFrame3Impl_SetPosition,
2173 IDirect3DRMFrame3Impl_SetRotation,
2174 IDirect3DRMFrame3Impl_SetSortMode,
2175 IDirect3DRMFrame3Impl_SetTexture,
2176 IDirect3DRMFrame3Impl_SetVelocity,
2177 IDirect3DRMFrame3Impl_SetZbufferMode,
2178 IDirect3DRMFrame3Impl_Transform,
2179 IDirect3DRMFrame3Impl_GetBox,
2180 IDirect3DRMFrame3Impl_GetBoxEnable,
2181 IDirect3DRMFrame3Impl_GetAxes,
2182 IDirect3DRMFrame3Impl_GetMaterial,
2183 IDirect3DRMFrame3Impl_GetInheritAxes,
2184 IDirect3DRMFrame3Impl_GetHierarchyBox,
2185 IDirect3DRMFrame3Impl_SetBox,
2186 IDirect3DRMFrame3Impl_SetBoxEnable,
2187 IDirect3DRMFrame3Impl_SetAxes,
2188 IDirect3DRMFrame3Impl_SetInheritAxes,
2189 IDirect3DRMFrame3Impl_SetMaterial,
2190 IDirect3DRMFrame3Impl_SetQuaternion,
2191 IDirect3DRMFrame3Impl_RayPick,
2192 IDirect3DRMFrame3Impl_Save,
2193 IDirect3DRMFrame3Impl_TransformVectors,
2194 IDirect3DRMFrame3Impl_InverseTransformVectors,
2195 IDirect3DRMFrame3Impl_SetTraversalOptions,
2196 IDirect3DRMFrame3Impl_GetTraversalOptions,
2197 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2198 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2199 IDirect3DRMFrame3Impl_SetMaterialOverride,
2200 IDirect3DRMFrame3Impl_GetMaterialOverride
2203 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
2207 assert(iface->lpVtbl == &Direct3DRMFrame2_Vtbl);
2209 return impl_from_IDirect3DRMFrame2(iface);
2212 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2216 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2218 return impl_from_IDirect3DRMFrame3(iface);
2221 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown** ppObj)
2223 IDirect3DRMFrameImpl* object;
2225 TRACE("(%p)\n", ppObj);
2227 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2230 ERR("Out of memory\n");
2231 return E_OUTOFMEMORY;
2234 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2235 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2238 memcpy(&object->transform[0][0], &identity[0][0], sizeof(D3DRMMATRIX4D));
2240 if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
2241 *ppObj = (IUnknown*)&object->IDirect3DRMFrame3_iface;
2243 *ppObj = (IUnknown*)&object->IDirect3DRMFrame2_iface;
2248 /*** IUnknown methods ***/
2249 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_QueryInterface(IDirect3DRMFrameArray* iface,
2250 REFIID riid, void** object)
2252 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2254 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
2258 if (IsEqualGUID(riid, &IID_IUnknown) ||
2259 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
2261 *object = &This->IDirect3DRMFrameArray_iface;
2265 FIXME("interface %s not implemented\n", debugstr_guid(riid));
2266 return E_NOINTERFACE;
2269 IDirect3DRMFrameArray_AddRef(iface);
2273 static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
2275 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2276 ULONG ref = InterlockedIncrement(&This->ref);
2278 TRACE("(%p)->(): new ref = %u\n", This, ref);
2283 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
2285 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2286 ULONG ref = InterlockedDecrement(&This->ref);
2289 TRACE("(%p)->(): new ref = %u\n", This, ref);
2293 for (i = 0; i < This->size; i++)
2294 IDirect3DRMFrame_Release(This->frames[i]);
2295 HeapFree(GetProcessHeap(), 0, This->frames);
2296 HeapFree(GetProcessHeap(), 0, This);
2302 /*** IDirect3DRMArray methods ***/
2303 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
2305 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2307 TRACE("(%p)->() = %d\n", This, This->size);
2312 /*** IDirect3DRMFrameArray methods ***/
2313 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray* iface, DWORD index, LPDIRECT3DRMFRAME* frame)
2315 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2317 TRACE("(%p)->(%u, %p)\n", This, index, frame);
2320 return D3DRMERR_BADVALUE;
2324 if (index >= This->size)
2325 return D3DRMERR_BADVALUE;
2327 IDirect3DRMFrame_AddRef(This->frames[index]);
2328 *frame = This->frames[index];
2333 static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
2335 /*** IUnknown methods ***/
2336 IDirect3DRMFrameArrayImpl_QueryInterface,
2337 IDirect3DRMFrameArrayImpl_AddRef,
2338 IDirect3DRMFrameArrayImpl_Release,
2339 /*** IDirect3DRMArray methods ***/
2340 IDirect3DRMFrameArrayImpl_GetSize,
2341 /*** IDirect3DRMFrameArray methods ***/
2342 IDirect3DRMFrameArrayImpl_GetElement
2345 HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
2347 IDirect3DRMFrameArrayImpl* object;
2349 TRACE("(%p)\n", obj);
2353 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
2356 ERR("Out of memory\n");
2357 return E_OUTOFMEMORY;
2360 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
2363 *obj = &object->IDirect3DRMFrameArray_iface;