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 = unsafe_impl_from_IDirect3DRMFrame2((LPDIRECT3DRMFRAME2)child);
229 TRACE("(%p/%p)->(%p)\n", iface, This, child);
232 return D3DRMERR_BADOBJECT;
234 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, &frame->IDirect3DRMFrame3_iface);
237 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
238 LPDIRECT3DRMLIGHT light)
240 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
242 TRACE("(%p/%p)->(%p)\n", iface, This, light);
244 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
247 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
248 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
250 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
252 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
257 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
258 D3DRMCOMBINETYPE type,
259 D3DRMMATRIX4D matrix)
261 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
263 FIXME("(%p/%p)->(%u,%p): stub\n", iface, This, type, matrix);
268 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
269 D3DRMCOMBINETYPE type,
270 D3DVALUE x, D3DVALUE y, D3DVALUE z)
272 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
274 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
279 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
280 D3DRMCOMBINETYPE type,
281 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
283 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
285 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
290 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
291 D3DRMCOMBINETYPE type,
292 D3DVALUE x, D3DVALUE y, D3DVALUE z,
295 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
297 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
302 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2* iface,
303 LPDIRECT3DRMVISUAL vis)
305 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
307 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
309 return IDirect3DRMFrame3_AddVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
312 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2* iface,
313 LPDIRECT3DRMFRAMEARRAY *children)
315 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
317 TRACE("(%p/%p)->(%p)\n", iface, This, children);
319 return IDirect3DRMFrame3_GetChildren(&This->IDirect3DRMFrame3_iface, children);
322 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
324 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
326 FIXME("(%p/%p)->(): stub\n", iface, This);
331 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
332 LPDIRECT3DRMLIGHTARRAY *lights)
334 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
336 FIXME("(%p/%p)->(%p): stub\n", iface, This, lights);
341 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
343 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
345 FIXME("(%p/%p)->(): stub\n", iface, This);
347 return D3DRMMATERIAL_FROMPARENT;
350 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2* iface,
351 LPDIRECT3DRMFRAME * frame)
353 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
355 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
358 return D3DRMERR_BADVALUE;
362 *frame = (LPDIRECT3DRMFRAME)&This->parent->IDirect3DRMFrame2_iface;
363 IDirect3DRMFrame_AddRef(*frame);
373 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2* iface,
374 LPDIRECT3DRMFRAME reference,
375 LPD3DVECTOR return_position)
377 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
379 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
384 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2* iface,
385 LPDIRECT3DRMFRAME reference,
386 LPD3DVECTOR axis, LPD3DVALUE return_theta)
388 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
390 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
395 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2* iface,
396 LPDIRECT3DRMFRAME * frame)
398 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
400 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
405 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
407 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
409 FIXME("(%p/%p)->(): stub\n", iface, This);
411 return D3DRMSORT_FROMPARENT;
414 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2* iface,
415 LPDIRECT3DRMTEXTURE * tex)
417 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
419 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
424 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
425 D3DRMMATRIX4D return_matrix)
427 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
429 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
431 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
436 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2* iface,
437 LPDIRECT3DRMFRAME reference,
438 LPD3DVECTOR return_velocity,
441 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
443 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
448 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2* iface,
449 LPDIRECT3DRMFRAME reference,
450 LPD3DVECTOR dir, LPD3DVECTOR up)
452 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
454 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
459 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
460 LPDIRECT3DRMVISUALARRAY *visuals)
462 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
464 FIXME("(%p/%p)->(%p): stub\n", iface, This, visuals);
469 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
470 BOOL *wrap_u, BOOL *wrap_v)
472 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
474 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
479 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
480 D3DVECTOR *d, D3DVECTOR *s)
482 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
484 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
489 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
490 LPVOID name, D3DRMLOADOPTIONS loadflags,
491 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
493 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
495 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
500 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2* iface,
501 LPDIRECT3DRMFRAME target,
502 LPDIRECT3DRMFRAME reference,
503 D3DRMFRAMECONSTRAINT constraint)
505 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
507 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
512 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
514 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
516 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
521 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2* iface,
522 LPDIRECT3DRMFRAME frame)
524 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
525 IDirect3DRMFrameImpl *child = unsafe_impl_from_IDirect3DRMFrame2((LPDIRECT3DRMFRAME2)frame);
527 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
530 return D3DRMERR_BADOBJECT;
532 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, &child->IDirect3DRMFrame3_iface);
535 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
536 LPDIRECT3DRMLIGHT light)
538 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
540 TRACE("(%p/%p)->(%p)\n", iface, This, light);
542 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
545 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
546 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
548 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
550 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
555 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2* iface,
556 LPDIRECT3DRMVISUAL vis)
558 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
560 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
562 return IDirect3DRMFrame3_DeleteVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
565 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
567 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
569 FIXME("(%p/%p)->(): stub\n", iface, This);
574 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
575 LPDIRECTDRAWSURFACE * surface)
577 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
579 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
584 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
586 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
588 FIXME("(%p/%p)->(): stub\n", iface, This);
593 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
595 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
597 FIXME("(%p/%p)->(): stub\n", iface, This);
602 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
604 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
606 FIXME("(%p/%p)->(): stub\n", iface, This);
608 return D3DRMFOG_LINEAR;
611 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
612 D3DVALUE *return_start,
613 D3DVALUE *return_end,
614 D3DVALUE *return_density)
616 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
618 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
623 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
626 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
628 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
633 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
634 D3DVALUE red, D3DVALUE green,
637 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
639 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
644 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
645 LPDIRECTDRAWSURFACE surface)
647 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
649 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
654 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
655 LPDIRECT3DRMTEXTURE texture)
657 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
659 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
664 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
666 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
668 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
673 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
676 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
678 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
683 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
686 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
688 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
693 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
694 D3DVALUE start, D3DVALUE end,
697 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
699 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
704 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
706 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
708 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
713 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
714 D3DVALUE green, D3DVALUE blue)
716 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
718 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
723 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
725 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
727 FIXME("(%p/%p)->(): stub\n", iface, This);
729 return D3DRMZBUFFER_FROMPARENT;
732 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
733 D3DRMMATERIALMODE mode)
735 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
737 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
742 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2* iface,
743 LPDIRECT3DRMFRAME reference,
744 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
745 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
747 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
749 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
750 dx, dy, dz, ux, uy, uz);
755 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2* iface,
756 LPDIRECT3DRMFRAME reference,
757 D3DVALUE x, D3DVALUE y, D3DVALUE z)
759 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
761 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
766 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2* iface,
767 LPDIRECT3DRMFRAME reference,
768 D3DVALUE x, D3DVALUE y, D3DVALUE z,
771 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
773 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
778 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
781 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
783 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
788 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
789 LPDIRECT3DRMTEXTURE texture)
791 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
793 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
798 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
799 BOOL wrap_u, BOOL wrap_v)
801 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
803 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
808 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2* iface,
809 LPDIRECT3DRMFRAME reference,
810 D3DVALUE x, D3DVALUE y, D3DVALUE z,
813 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
815 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
820 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
821 D3DRMZBUFFERMODE mode)
823 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
825 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
830 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
833 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
835 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
840 /*** IDirect3DRMFrame2 methods ***/
841 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
842 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
845 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
847 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
852 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2* iface, LPD3DRMBOX box)
854 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
856 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
861 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
863 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
865 FIXME("(%p/%p)->(): stub\n", iface, This);
870 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2* iface,
871 LPD3DVECTOR dir, LPD3DVECTOR up)
873 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
875 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
880 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
881 LPDIRECT3DRMMATERIAL *material)
883 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
885 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
890 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
892 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
894 FIXME("(%p/%p)->(): stub\n", iface, This);
899 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2* iface,
902 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
904 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
909 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
911 /*** IUnknown methods ***/
912 IDirect3DRMFrame2Impl_QueryInterface,
913 IDirect3DRMFrame2Impl_AddRef,
914 IDirect3DRMFrame2Impl_Release,
915 /*** IDirect3DRMObject methods ***/
916 IDirect3DRMFrame2Impl_Clone,
917 IDirect3DRMFrame2Impl_AddDestroyCallback,
918 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
919 IDirect3DRMFrame2Impl_SetAppData,
920 IDirect3DRMFrame2Impl_GetAppData,
921 IDirect3DRMFrame2Impl_SetName,
922 IDirect3DRMFrame2Impl_GetName,
923 IDirect3DRMFrame2Impl_GetClassName,
924 /*** IDirect3DRMFrame methods ***/
925 IDirect3DRMFrame2Impl_AddChild,
926 IDirect3DRMFrame2Impl_AddLight,
927 IDirect3DRMFrame2Impl_AddMoveCallback,
928 IDirect3DRMFrame2Impl_AddTransform,
929 IDirect3DRMFrame2Impl_AddTranslation,
930 IDirect3DRMFrame2Impl_AddScale,
931 IDirect3DRMFrame2Impl_AddRotation,
932 IDirect3DRMFrame2Impl_AddVisual,
933 IDirect3DRMFrame2Impl_GetChildren,
934 IDirect3DRMFrame2Impl_GetColor,
935 IDirect3DRMFrame2Impl_GetLights,
936 IDirect3DRMFrame2Impl_GetMaterialMode,
937 IDirect3DRMFrame2Impl_GetParent,
938 IDirect3DRMFrame2Impl_GetPosition,
939 IDirect3DRMFrame2Impl_GetRotation,
940 IDirect3DRMFrame2Impl_GetScene,
941 IDirect3DRMFrame2Impl_GetSortMode,
942 IDirect3DRMFrame2Impl_GetTexture,
943 IDirect3DRMFrame2Impl_GetTransform,
944 IDirect3DRMFrame2Impl_GetVelocity,
945 IDirect3DRMFrame2Impl_GetOrientation,
946 IDirect3DRMFrame2Impl_GetVisuals,
947 IDirect3DRMFrame2Impl_GetTextureTopology,
948 IDirect3DRMFrame2Impl_InverseTransform,
949 IDirect3DRMFrame2Impl_Load,
950 IDirect3DRMFrame2Impl_LookAt,
951 IDirect3DRMFrame2Impl_Move,
952 IDirect3DRMFrame2Impl_DeleteChild,
953 IDirect3DRMFrame2Impl_DeleteLight,
954 IDirect3DRMFrame2Impl_DeleteMoveCallback,
955 IDirect3DRMFrame2Impl_DeleteVisual,
956 IDirect3DRMFrame2Impl_GetSceneBackground,
957 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
958 IDirect3DRMFrame2Impl_GetSceneFogColor,
959 IDirect3DRMFrame2Impl_GetSceneFogEnable,
960 IDirect3DRMFrame2Impl_GetSceneFogMode,
961 IDirect3DRMFrame2Impl_GetSceneFogParams,
962 IDirect3DRMFrame2Impl_SetSceneBackground,
963 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
964 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
965 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
966 IDirect3DRMFrame2Impl_SetSceneFogEnable,
967 IDirect3DRMFrame2Impl_SetSceneFogColor,
968 IDirect3DRMFrame2Impl_SetSceneFogMode,
969 IDirect3DRMFrame2Impl_SetSceneFogParams,
970 IDirect3DRMFrame2Impl_SetColor,
971 IDirect3DRMFrame2Impl_SetColorRGB,
972 IDirect3DRMFrame2Impl_GetZbufferMode,
973 IDirect3DRMFrame2Impl_SetMaterialMode,
974 IDirect3DRMFrame2Impl_SetOrientation,
975 IDirect3DRMFrame2Impl_SetPosition,
976 IDirect3DRMFrame2Impl_SetRotation,
977 IDirect3DRMFrame2Impl_SetSortMode,
978 IDirect3DRMFrame2Impl_SetTexture,
979 IDirect3DRMFrame2Impl_SetTextureTopology,
980 IDirect3DRMFrame2Impl_SetVelocity,
981 IDirect3DRMFrame2Impl_SetZbufferMode,
982 IDirect3DRMFrame2Impl_Transform,
983 /*** IDirect3DRMFrame2 methods ***/
984 IDirect3DRMFrame2Impl_AddMoveCallback2,
985 IDirect3DRMFrame2Impl_GetBox,
986 IDirect3DRMFrame2Impl_GetBoxEnable,
987 IDirect3DRMFrame2Impl_GetAxes,
988 IDirect3DRMFrame2Impl_GetMaterial,
989 IDirect3DRMFrame2Impl_GetInheritAxes,
990 IDirect3DRMFrame2Impl_GetHierarchyBox
993 /*** IUnknown methods ***/
994 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
995 REFIID riid, void** object)
997 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
998 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1001 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1003 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1004 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1007 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1009 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1010 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1013 /*** IDirect3DRMObject methods ***/
1014 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1015 LPUNKNOWN unkwn, REFIID riid,
1018 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1020 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1025 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1026 D3DRMOBJECTCALLBACK cb,
1029 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1031 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1036 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1037 D3DRMOBJECTCALLBACK cb,
1040 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1042 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1047 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1050 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1052 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1057 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1059 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1061 FIXME("(%p/%p)->(): stub\n", iface, This);
1066 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1068 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1070 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1075 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1076 LPDWORD size, LPSTR name)
1078 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1080 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1085 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1086 LPDWORD size, LPSTR name)
1088 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1090 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1095 /*** IDirect3DRMFrame methods ***/
1096 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3* iface,
1097 LPDIRECT3DRMFRAME3 child)
1099 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1100 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1102 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1105 return D3DRMERR_BADOBJECT;
1107 if (child_obj->parent)
1109 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1111 if (parent == iface)
1113 /* Passed frame is already a child so return success */
1118 /* Remove parent and continue */
1119 IDirect3DRMFrame3_DeleteChild(parent, child);
1123 if ((This->nb_children + 1) > This->children_capacity)
1126 IDirect3DRMFrame3** children;
1128 if (!This->children_capacity)
1131 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1135 new_capacity = This->children_capacity * 2;
1136 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1140 return E_OUTOFMEMORY;
1142 This->children_capacity = new_capacity;
1143 This->children = children;
1146 This->children[This->nb_children++] = child;
1147 IDirect3DRMFrame3_AddRef(child);
1148 child_obj->parent = This;
1153 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
1154 LPDIRECT3DRMLIGHT light)
1156 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1158 IDirect3DRMLight** lights;
1160 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1163 return D3DRMERR_BADOBJECT;
1165 /* Check if already existing and return gracefully without increasing ref count */
1166 for (i = 0; i < This->nb_lights; i++)
1167 if (This->lights[i] == light)
1170 if ((This->nb_lights + 1) > This->lights_capacity)
1174 if (!This->lights_capacity)
1177 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1181 new_capacity = This->lights_capacity * 2;
1182 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1186 return E_OUTOFMEMORY;
1188 This->lights_capacity = new_capacity;
1189 This->lights = lights;
1192 This->lights[This->nb_lights++] = light;
1193 IDirect3DRMLight_AddRef(light);
1198 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1199 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1202 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1204 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1209 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1210 D3DRMCOMBINETYPE type,
1211 D3DRMMATRIX4D matrix)
1213 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1215 FIXME("(%p/%p)->(%u,%p): stub\n", iface, This, type, matrix);
1220 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1221 D3DRMCOMBINETYPE type,
1222 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1224 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1226 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1231 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1232 D3DRMCOMBINETYPE type,
1233 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1235 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1237 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1242 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1243 D3DRMCOMBINETYPE type,
1244 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1247 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1249 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1254 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1256 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1258 IDirect3DRMVisual** visuals;
1260 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1263 return D3DRMERR_BADOBJECT;
1265 /* Check if already existing and return gracefully without increasing ref count */
1266 for (i = 0; i < This->nb_visuals; i++)
1267 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1270 if ((This->nb_visuals + 1) > This->visuals_capacity)
1274 if (!This->visuals_capacity)
1277 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1281 new_capacity = This->visuals_capacity * 2;
1282 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1286 return E_OUTOFMEMORY;
1288 This->visuals_capacity = new_capacity;
1289 This->visuals = visuals;
1292 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1293 IDirect3DRMVisual_AddRef(vis);
1298 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1299 LPDIRECT3DRMFRAMEARRAY *children)
1301 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1302 IDirect3DRMFrameArrayImpl* obj;
1305 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1308 return D3DRMERR_BADVALUE;
1310 hr = Direct3DRMFrameArray_create(children);
1315 obj = (IDirect3DRMFrameArrayImpl*)*children;
1317 obj->size = This->nb_children;
1318 if (This->nb_children)
1321 obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(LPDIRECT3DRMFRAME));
1323 return E_OUTOFMEMORY;
1324 for (i = 0; i < This->nb_children; i++)
1325 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1331 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1333 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1335 FIXME("(%p/%p)->(): stub\n", iface, This);
1340 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1341 LPDIRECT3DRMLIGHTARRAY *lights)
1343 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1345 FIXME("(%p/%p)->(%p): stub\n", iface, This, lights);
1350 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1352 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1354 FIXME("(%p/%p)->(): stub\n", iface, This);
1356 return D3DRMMATERIAL_FROMPARENT;
1359 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3* iface,
1360 LPDIRECT3DRMFRAME3 * frame)
1362 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1364 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1367 return D3DRMERR_BADVALUE;
1371 *frame = &This->parent->IDirect3DRMFrame3_iface;
1372 IDirect3DRMFrame_AddRef(*frame);
1382 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3* iface,
1383 LPDIRECT3DRMFRAME3 reference,
1384 LPD3DVECTOR return_position)
1386 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1388 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1393 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3* iface,
1394 LPDIRECT3DRMFRAME3 reference,
1395 LPD3DVECTOR axis, LPD3DVALUE return_theta)
1397 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1399 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1404 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3* iface,
1405 LPDIRECT3DRMFRAME3 * frame)
1407 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1409 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
1414 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1416 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1418 FIXME("(%p/%p)->(): stub\n", iface, This);
1420 return D3DRMSORT_FROMPARENT;
1423 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1424 LPDIRECT3DRMTEXTURE3 * tex)
1426 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1428 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1433 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3* iface,
1434 LPDIRECT3DRMFRAME3 reference,
1435 D3DRMMATRIX4D return_matrix)
1437 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1439 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1442 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1444 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
1449 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3* iface,
1450 LPDIRECT3DRMFRAME3 reference,
1451 LPD3DVECTOR return_velocity,
1454 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1456 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1461 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3* iface,
1462 LPDIRECT3DRMFRAME3 reference,
1463 LPD3DVECTOR dir, LPD3DVECTOR up)
1465 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1467 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1472 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1475 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1477 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1482 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1483 D3DVECTOR *d, D3DVECTOR *s)
1485 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1487 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1492 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1493 LPVOID name, D3DRMLOADOPTIONS loadflags,
1494 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1496 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1498 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1503 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3* iface,
1504 LPDIRECT3DRMFRAME3 target,
1505 LPDIRECT3DRMFRAME3 reference,
1506 D3DRMFRAMECONSTRAINT constraint)
1508 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1510 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
1515 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1517 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1519 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1524 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3* iface,
1525 LPDIRECT3DRMFRAME3 frame)
1527 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1528 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1531 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1534 return D3DRMERR_BADOBJECT;
1536 /* Check if child exists */
1537 for (i = 0; i < This->nb_children; i++)
1538 if (This->children[i] == frame)
1541 if (i == This->nb_children)
1542 return D3DRMERR_BADVALUE;
1544 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1545 IDirect3DRMFrame3_Release(frame);
1546 frame_obj->parent = NULL;
1547 This->nb_children--;
1552 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
1553 LPDIRECT3DRMLIGHT light)
1555 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1558 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1561 return D3DRMERR_BADOBJECT;
1563 /* Check if visual exists */
1564 for (i = 0; i < This->nb_lights; i++)
1565 if (This->lights[i] == light)
1568 if (i == This->nb_lights)
1569 return D3DRMERR_BADVALUE;
1571 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1572 IDirect3DRMLight_Release(light);
1578 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1579 D3DRMFRAME3MOVECALLBACK cb,
1582 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1584 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1589 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1591 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1594 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1597 return D3DRMERR_BADOBJECT;
1599 /* Check if visual exists */
1600 for (i = 0; i < This->nb_visuals; i++)
1601 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1604 if (i == This->nb_visuals)
1605 return D3DRMERR_BADVALUE;
1607 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
1608 IDirect3DRMVisual_Release(vis);
1614 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
1616 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1618 FIXME("(%p/%p)->(): stub\n", iface, This);
1623 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
1624 LPDIRECTDRAWSURFACE * surface)
1626 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1628 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1633 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
1635 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1637 FIXME("(%p/%p)->(): stub\n", iface, This);
1642 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
1644 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1646 FIXME("(%p/%p)->(): stub\n", iface, This);
1651 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
1653 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1655 FIXME("(%p/%p)->(): stub\n", iface, This);
1657 return D3DRMFOG_LINEAR;
1660 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
1661 D3DVALUE *return_start,
1662 D3DVALUE *return_end,
1663 D3DVALUE *return_density)
1665 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1667 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1672 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
1675 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1677 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1682 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
1683 D3DVALUE red, D3DVALUE green,
1686 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1688 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1693 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
1694 LPDIRECTDRAWSURFACE surface)
1696 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1698 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1703 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
1704 LPDIRECT3DRMTEXTURE3 texture)
1706 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1708 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1713 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
1715 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1717 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1722 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
1725 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1727 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1732 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
1735 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1737 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1742 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
1743 D3DVALUE start, D3DVALUE end,
1746 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1748 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1753 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
1755 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1757 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1762 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
1763 D3DVALUE green, D3DVALUE blue)
1765 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1767 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1772 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
1774 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1776 FIXME("(%p/%p)->(): stub\n", iface, This);
1778 return D3DRMZBUFFER_FROMPARENT;
1781 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
1782 D3DRMMATERIALMODE mode)
1784 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1786 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1791 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3* iface,
1792 LPDIRECT3DRMFRAME3 reference,
1793 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1794 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
1796 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1798 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
1799 dx, dy, dz, ux, uy, uz);
1804 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3* iface,
1805 LPDIRECT3DRMFRAME3 reference,
1806 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1808 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1810 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
1815 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3* iface,
1816 LPDIRECT3DRMFRAME3 reference,
1817 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1820 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1822 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
1827 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
1830 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1832 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1837 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
1838 LPDIRECT3DRMTEXTURE3 texture)
1840 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1842 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1847 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3* iface,
1848 LPDIRECT3DRMFRAME3 reference,
1849 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1852 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1854 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
1859 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
1860 D3DRMZBUFFERMODE mode)
1862 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1864 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1869 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
1872 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1874 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1879 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
1881 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1883 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1888 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
1890 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1892 FIXME("(%p/%p)->(): stub\n", iface, This);
1897 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3* iface,
1898 LPD3DVECTOR dir, LPD3DVECTOR up)
1900 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1902 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1907 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
1908 LPDIRECT3DRMMATERIAL2 *material)
1910 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1912 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1917 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
1919 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1921 FIXME("(%p/%p)->(): stub\n", iface, This);
1926 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface,
1929 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1931 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1936 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
1938 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1940 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1945 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
1947 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1949 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
1954 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
1955 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1956 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1958 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1960 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
1965 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
1966 BOOL inherit_from_parent)
1968 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1970 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
1975 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
1976 LPDIRECT3DRMMATERIAL2 material)
1978 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1980 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1985 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3* iface,
1986 LPDIRECT3DRMFRAME3 reference,
1989 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1991 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, q);
1996 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3* iface,
1997 LPDIRECT3DRMFRAME3 reference, LPD3DRMRAY ray,
1999 LPDIRECT3DRMPICKED2ARRAY *return_visuals)
2001 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2003 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2008 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2009 D3DRMXOFFORMAT d3dFormat,
2010 D3DRMSAVEOPTIONS d3dSaveFlags)
2012 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2014 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2019 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3* iface,
2020 LPDIRECT3DRMFRAME3 reference,
2021 DWORD num, LPD3DVECTOR dst,
2024 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2026 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2031 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3* iface,
2032 LPDIRECT3DRMFRAME3 reference,
2033 DWORD num, LPD3DVECTOR dst,
2036 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2038 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2043 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2046 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2048 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2053 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2056 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2058 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2063 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2066 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2068 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2073 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2076 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2078 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2083 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3* iface,
2084 LPD3DRMMATERIALOVERRIDE override)
2086 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2088 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2093 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3* iface,
2094 LPD3DRMMATERIALOVERRIDE override)
2096 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2098 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2103 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2105 /*** IUnknown methods ***/
2106 IDirect3DRMFrame3Impl_QueryInterface,
2107 IDirect3DRMFrame3Impl_AddRef,
2108 IDirect3DRMFrame3Impl_Release,
2109 /*** IDirect3DRMObject methods ***/
2110 IDirect3DRMFrame3Impl_Clone,
2111 IDirect3DRMFrame3Impl_AddDestroyCallback,
2112 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2113 IDirect3DRMFrame3Impl_SetAppData,
2114 IDirect3DRMFrame3Impl_GetAppData,
2115 IDirect3DRMFrame3Impl_SetName,
2116 IDirect3DRMFrame3Impl_GetName,
2117 IDirect3DRMFrame3Impl_GetClassName,
2118 /*** IDirect3DRMFrame3 methods ***/
2119 IDirect3DRMFrame3Impl_AddChild,
2120 IDirect3DRMFrame3Impl_AddLight,
2121 IDirect3DRMFrame3Impl_AddMoveCallback,
2122 IDirect3DRMFrame3Impl_AddTransform,
2123 IDirect3DRMFrame3Impl_AddTranslation,
2124 IDirect3DRMFrame3Impl_AddScale,
2125 IDirect3DRMFrame3Impl_AddRotation,
2126 IDirect3DRMFrame3Impl_AddVisual,
2127 IDirect3DRMFrame3Impl_GetChildren,
2128 IDirect3DRMFrame3Impl_GetColor,
2129 IDirect3DRMFrame3Impl_GetLights,
2130 IDirect3DRMFrame3Impl_GetMaterialMode,
2131 IDirect3DRMFrame3Impl_GetParent,
2132 IDirect3DRMFrame3Impl_GetPosition,
2133 IDirect3DRMFrame3Impl_GetRotation,
2134 IDirect3DRMFrame3Impl_GetScene,
2135 IDirect3DRMFrame3Impl_GetSortMode,
2136 IDirect3DRMFrame3Impl_GetTexture,
2137 IDirect3DRMFrame3Impl_GetTransform,
2138 IDirect3DRMFrame3Impl_GetVelocity,
2139 IDirect3DRMFrame3Impl_GetOrientation,
2140 IDirect3DRMFrame3Impl_GetVisuals,
2141 IDirect3DRMFrame3Impl_InverseTransform,
2142 IDirect3DRMFrame3Impl_Load,
2143 IDirect3DRMFrame3Impl_LookAt,
2144 IDirect3DRMFrame3Impl_Move,
2145 IDirect3DRMFrame3Impl_DeleteChild,
2146 IDirect3DRMFrame3Impl_DeleteLight,
2147 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2148 IDirect3DRMFrame3Impl_DeleteVisual,
2149 IDirect3DRMFrame3Impl_GetSceneBackground,
2150 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2151 IDirect3DRMFrame3Impl_GetSceneFogColor,
2152 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2153 IDirect3DRMFrame3Impl_GetSceneFogMode,
2154 IDirect3DRMFrame3Impl_GetSceneFogParams,
2155 IDirect3DRMFrame3Impl_SetSceneBackground,
2156 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2157 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2158 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2159 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2160 IDirect3DRMFrame3Impl_SetSceneFogColor,
2161 IDirect3DRMFrame3Impl_SetSceneFogMode,
2162 IDirect3DRMFrame3Impl_SetSceneFogParams,
2163 IDirect3DRMFrame3Impl_SetColor,
2164 IDirect3DRMFrame3Impl_SetColorRGB,
2165 IDirect3DRMFrame3Impl_GetZbufferMode,
2166 IDirect3DRMFrame3Impl_SetMaterialMode,
2167 IDirect3DRMFrame3Impl_SetOrientation,
2168 IDirect3DRMFrame3Impl_SetPosition,
2169 IDirect3DRMFrame3Impl_SetRotation,
2170 IDirect3DRMFrame3Impl_SetSortMode,
2171 IDirect3DRMFrame3Impl_SetTexture,
2172 IDirect3DRMFrame3Impl_SetVelocity,
2173 IDirect3DRMFrame3Impl_SetZbufferMode,
2174 IDirect3DRMFrame3Impl_Transform,
2175 IDirect3DRMFrame3Impl_GetBox,
2176 IDirect3DRMFrame3Impl_GetBoxEnable,
2177 IDirect3DRMFrame3Impl_GetAxes,
2178 IDirect3DRMFrame3Impl_GetMaterial,
2179 IDirect3DRMFrame3Impl_GetInheritAxes,
2180 IDirect3DRMFrame3Impl_GetHierarchyBox,
2181 IDirect3DRMFrame3Impl_SetBox,
2182 IDirect3DRMFrame3Impl_SetBoxEnable,
2183 IDirect3DRMFrame3Impl_SetAxes,
2184 IDirect3DRMFrame3Impl_SetInheritAxes,
2185 IDirect3DRMFrame3Impl_SetMaterial,
2186 IDirect3DRMFrame3Impl_SetQuaternion,
2187 IDirect3DRMFrame3Impl_RayPick,
2188 IDirect3DRMFrame3Impl_Save,
2189 IDirect3DRMFrame3Impl_TransformVectors,
2190 IDirect3DRMFrame3Impl_InverseTransformVectors,
2191 IDirect3DRMFrame3Impl_SetTraversalOptions,
2192 IDirect3DRMFrame3Impl_GetTraversalOptions,
2193 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2194 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2195 IDirect3DRMFrame3Impl_SetMaterialOverride,
2196 IDirect3DRMFrame3Impl_GetMaterialOverride
2199 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
2203 assert(iface->lpVtbl == &Direct3DRMFrame2_Vtbl);
2205 return impl_from_IDirect3DRMFrame2(iface);
2208 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2212 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2214 return impl_from_IDirect3DRMFrame3(iface);
2217 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown** ppObj)
2219 IDirect3DRMFrameImpl* object;
2221 TRACE("(%p)\n", ppObj);
2223 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2226 ERR("Out of memory\n");
2227 return E_OUTOFMEMORY;
2230 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2231 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2234 memcpy(&object->transform[0][0], &identity[0][0], sizeof(D3DRMMATRIX4D));
2236 if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
2237 *ppObj = (IUnknown*)&object->IDirect3DRMFrame3_iface;
2239 *ppObj = (IUnknown*)&object->IDirect3DRMFrame2_iface;
2244 /*** IUnknown methods ***/
2245 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_QueryInterface(IDirect3DRMFrameArray* iface,
2246 REFIID riid, void** object)
2248 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2250 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
2254 if (IsEqualGUID(riid, &IID_IUnknown) ||
2255 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
2257 *object = &This->IDirect3DRMFrameArray_iface;
2261 FIXME("interface %s not implemented\n", debugstr_guid(riid));
2262 return E_NOINTERFACE;
2265 IDirect3DRMFrameArray_AddRef(iface);
2269 static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
2271 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2272 ULONG ref = InterlockedIncrement(&This->ref);
2274 TRACE("(%p)->(): new ref = %u\n", This, ref);
2279 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
2281 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2282 ULONG ref = InterlockedDecrement(&This->ref);
2285 TRACE("(%p)->(): new ref = %u\n", This, ref);
2289 for (i = 0; i < This->size; i++)
2290 IDirect3DRMFrame_Release(This->frames[i]);
2291 HeapFree(GetProcessHeap(), 0, This->frames);
2292 HeapFree(GetProcessHeap(), 0, This);
2298 /*** IDirect3DRMArray methods ***/
2299 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
2301 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2303 TRACE("(%p)->() = %d\n", This, This->size);
2308 /*** IDirect3DRMFrameArray methods ***/
2309 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray* iface, DWORD index, LPDIRECT3DRMFRAME* frame)
2311 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
2313 TRACE("(%p)->(%u, %p)\n", This, index, frame);
2316 return D3DRMERR_BADVALUE;
2320 if (index >= This->size)
2321 return D3DRMERR_BADVALUE;
2323 IDirect3DRMFrame_AddRef(This->frames[index]);
2324 *frame = This->frames[index];
2329 static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
2331 /*** IUnknown methods ***/
2332 IDirect3DRMFrameArrayImpl_QueryInterface,
2333 IDirect3DRMFrameArrayImpl_AddRef,
2334 IDirect3DRMFrameArrayImpl_Release,
2335 /*** IDirect3DRMArray methods ***/
2336 IDirect3DRMFrameArrayImpl_GetSize,
2337 /*** IDirect3DRMFrameArray methods ***/
2338 IDirect3DRMFrameArrayImpl_GetElement
2341 HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
2343 IDirect3DRMFrameArrayImpl* object;
2345 TRACE("(%p)\n", obj);
2349 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
2352 ERR("Out of memory\n");
2353 return E_OUTOFMEMORY;
2356 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
2359 *obj = &object->IDirect3DRMFrameArray_iface;