mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-14 22:03:27 +01:00
add dummy Direct3D 2/3/7 interfaces
This commit is contained in:
parent
d85b6e3243
commit
e106ce3055
15
Makefile
15
Makefile
@ -5,19 +5,22 @@ LDFLAGS = -Iinc -Wall -Wl,--enable-stdcall-fixup -s
|
||||
CFLAGS = -std=c99
|
||||
LIBS = -lgdi32 -lwinmm
|
||||
|
||||
FILES = src/debug.c \
|
||||
src/dd.c \
|
||||
src/ddpalette.c \
|
||||
src/ddsurface.c \
|
||||
src/ddclipper.c \
|
||||
FILES = src/IDirect3D/IDirect3D.c \
|
||||
src/IDirect3D/IDirect3D2.c \
|
||||
src/IDirect3D/IDirect3D3.c \
|
||||
src/IDirect3D/IDirect3D7.c \
|
||||
src/IDirectDraw/IDirectDraw.c \
|
||||
src/IDirectDraw/IDirectDrawPalette.c \
|
||||
src/IDirectDraw/IDirectDrawClipper.c \
|
||||
src/IDirectDraw/IDirectDrawSurface.c \
|
||||
src/dd.c \
|
||||
src/ddpalette.c \
|
||||
src/ddsurface.c \
|
||||
src/ddclipper.c \
|
||||
src/render_ogl.c \
|
||||
src/render_gdi.c \
|
||||
src/render_d3d9.c \
|
||||
src/IDirect3D/IDirect3D.c \
|
||||
src/debug.c \
|
||||
src/mouse.c \
|
||||
src/winapi_hooks.c \
|
||||
src/screenshot.c \
|
||||
|
@ -33,6 +33,9 @@
|
||||
<ClCompile Include="src\directinput.c" />
|
||||
<ClCompile Include="src\dllmain.c" />
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D.c" />
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D2.c" />
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D3.c" />
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D7.c" />
|
||||
<ClCompile Include="src\utils.c" />
|
||||
<ClCompile Include="src\hook.c" />
|
||||
<ClCompile Include="src\IDirectDraw\IDirectDraw.c" />
|
||||
|
@ -129,6 +129,15 @@
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D.c">
|
||||
<Filter>Source Files\IDirect3D</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D2.c">
|
||||
<Filter>Source Files\IDirect3D</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D3.c">
|
||||
<Filter>Source Files\IDirect3D</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IDirect3D\IDirect3D7.c">
|
||||
<Filter>Source Files\IDirect3D</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="inc\ddraw.h">
|
||||
|
@ -10,22 +10,17 @@ DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1, 0x662a, 0x11d0, 0x88, 0x9d, 0x00, 0xaa,
|
||||
DEFINE_GUID(IID_IDirect3D3, 0xbb223240, 0xe72b, 0x11d0, 0xa9, 0xb4, 0x00, 0xaa, 0x00, 0xc0, 0x99, 0x3e);
|
||||
DEFINE_GUID(IID_IDirect3D7, 0xf5049e77, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
|
||||
extern struct IDirect3DImplVtbl g_d3d_vtbl1;
|
||||
#define DECLARE_D3D_INTERFACE(iface) typedef struct iface { \
|
||||
struct iface##Vtbl FAR* lpVtbl; \
|
||||
ULONG ref; \
|
||||
} iface; \
|
||||
typedef struct iface##Vtbl iface##Vtbl; \
|
||||
struct iface##Vtbl
|
||||
|
||||
struct IDirect3DImpl;
|
||||
struct IDirect3DImplVtbl;
|
||||
|
||||
typedef struct IDirect3DImpl
|
||||
{
|
||||
struct IDirect3DImplVtbl* lpVtbl;
|
||||
// IID_IDirect3D
|
||||
|
||||
ULONG ref;
|
||||
|
||||
} IDirect3DImpl;
|
||||
|
||||
typedef struct IDirect3DImplVtbl IDirect3DImplVtbl;
|
||||
|
||||
struct IDirect3DImplVtbl
|
||||
DECLARE_D3D_INTERFACE(IDirect3DImpl)
|
||||
{
|
||||
HRESULT(__stdcall* QueryInterface) (IDirect3DImpl*, const IID* const riid, LPVOID* ppvObj);
|
||||
ULONG(__stdcall* AddRef) (IDirect3DImpl*);
|
||||
@ -39,4 +34,62 @@ struct IDirect3DImplVtbl
|
||||
HRESULT(__stdcall* FindDevice)(IDirect3DImpl*, int, int);
|
||||
};
|
||||
|
||||
extern struct IDirect3DImplVtbl g_d3d_vtbl;
|
||||
|
||||
// IID_IDirect3D2
|
||||
|
||||
DECLARE_D3D_INTERFACE(IDirect3D2Impl)
|
||||
{
|
||||
HRESULT(__stdcall * QueryInterface) (IDirect3D2Impl*, const IID* const riid, LPVOID * ppvObj);
|
||||
ULONG(__stdcall * AddRef) (IDirect3D2Impl*);
|
||||
ULONG(__stdcall * Release) (IDirect3D2Impl*);
|
||||
|
||||
HRESULT(__stdcall * EnumDevices)(IDirect3D2Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateLight)(IDirect3D2Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateMaterial)(IDirect3D2Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateViewport)(IDirect3D2Impl*, int, int);
|
||||
HRESULT(__stdcall * FindDevice)(IDirect3D2Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateDevice)(IDirect3D2Impl*, int, int, int);
|
||||
};
|
||||
|
||||
extern struct IDirect3D2ImplVtbl g_d3d2_vtbl;
|
||||
|
||||
// IID_IDirect3D3
|
||||
|
||||
DECLARE_D3D_INTERFACE(IDirect3D3Impl)
|
||||
{
|
||||
HRESULT(__stdcall * QueryInterface) (IDirect3D3Impl*, const IID* const riid, LPVOID * ppvObj);
|
||||
ULONG(__stdcall * AddRef) (IDirect3D3Impl*);
|
||||
ULONG(__stdcall * Release) (IDirect3D3Impl*);
|
||||
|
||||
HRESULT(__stdcall * EnumDevices)(IDirect3D3Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateLight)(IDirect3D3Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateMaterial)(IDirect3D3Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateViewport)(IDirect3D3Impl*, int, int);
|
||||
HRESULT(__stdcall * FindDevice)(IDirect3D3Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateDevice)(IDirect3D3Impl*, int, int, int, int);
|
||||
HRESULT(__stdcall * CreateVertexBuffer)(IDirect3D3Impl*, int, int, int, int);
|
||||
HRESULT(__stdcall * EnumZBufferFormats)(IDirect3D3Impl*, int, int, int);
|
||||
HRESULT(__stdcall * EvictManagedTextures)(IDirect3D3Impl*);
|
||||
};
|
||||
|
||||
extern struct IDirect3D3ImplVtbl g_d3d3_vtbl;
|
||||
|
||||
// IID_IDirect3D7
|
||||
|
||||
DECLARE_D3D_INTERFACE(IDirect3D7Impl)
|
||||
{
|
||||
HRESULT(__stdcall * QueryInterface) (IDirect3D7Impl*, const IID* const riid, LPVOID * ppvObj);
|
||||
ULONG(__stdcall * AddRef) (IDirect3D7Impl*);
|
||||
ULONG(__stdcall * Release) (IDirect3D7Impl*);
|
||||
|
||||
HRESULT(__stdcall * EnumDevices)(IDirect3D7Impl*, int, int);
|
||||
HRESULT(__stdcall * CreateDevice)(IDirect3D7Impl*, int, int, int);
|
||||
HRESULT(__stdcall * CreateVertexBuffer)(IDirect3D7Impl*, int, int, int);
|
||||
HRESULT(__stdcall * EnumZBufferFormats)(IDirect3D7Impl*, int, int, int);
|
||||
HRESULT(__stdcall * EvictManagedTextures)(IDirect3D7Impl*);
|
||||
};
|
||||
|
||||
extern struct IDirect3D7ImplVtbl g_d3d7_vtbl;
|
||||
|
||||
#endif
|
||||
|
@ -83,7 +83,7 @@ HRESULT __stdcall IDirect3D__FindDevice(IDirect3DImpl* This, int a, int b)
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct IDirect3DImplVtbl g_d3d_vtbl1 =
|
||||
struct IDirect3DImplVtbl g_d3d_vtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
IDirect3D__QueryInterface,
|
||||
|
99
src/IDirect3D/IDirect3D2.c
Normal file
99
src/IDirect3D/IDirect3D2.c
Normal file
@ -0,0 +1,99 @@
|
||||
#include "IDirect3D.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
HRESULT __stdcall IDirect3D2__QueryInterface(IDirect3D2Impl* This, REFIID riid, void** obj)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p, riid=%08X, obj=%p)\n", __FUNCTION__, This, (unsigned int)riid, obj);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ULONG __stdcall IDirect3D2__AddRef(IDirect3D2Impl* This)
|
||||
{
|
||||
dprintf("-> %s(This=%p)\n", __FUNCTION__, This);
|
||||
ULONG ret = ++This->ref;
|
||||
dprintf("<- %s(This ref=%u)\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ULONG __stdcall IDirect3D2__Release(IDirect3D2Impl* This)
|
||||
{
|
||||
dprintf("-> %s(This=%p)\n", __FUNCTION__, This);
|
||||
|
||||
ULONG ret = --This->ref;
|
||||
|
||||
if (This->ref == 0)
|
||||
{
|
||||
dprintf(" Released (%p)\n", This);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
dprintf("<- %s(This ref=%u)\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D2__EnumDevices(IDirect3D2Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D2__CreateLight(IDirect3D2Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D2__CreateMaterial(IDirect3D2Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D2__CreateViewport(IDirect3D2Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D2__FindDevice(IDirect3D2Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D2__CreateDevice(IDirect3D2Impl* This, int a, int b, int c)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct IDirect3D2ImplVtbl g_d3d2_vtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
IDirect3D2__QueryInterface,
|
||||
IDirect3D2__AddRef,
|
||||
IDirect3D2__Release,
|
||||
/* IDirect3D2Impl */
|
||||
IDirect3D2__EnumDevices,
|
||||
IDirect3D2__CreateLight,
|
||||
IDirect3D2__CreateMaterial,
|
||||
IDirect3D2__CreateViewport,
|
||||
IDirect3D2__FindDevice,
|
||||
IDirect3D2__CreateDevice,
|
||||
};
|
126
src/IDirect3D/IDirect3D3.c
Normal file
126
src/IDirect3D/IDirect3D3.c
Normal file
@ -0,0 +1,126 @@
|
||||
#include "IDirect3D.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
HRESULT __stdcall IDirect3D3__QueryInterface(IDirect3D3Impl* This, REFIID riid, void** obj)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p, riid=%08X, obj=%p)\n", __FUNCTION__, This, (unsigned int)riid, obj);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ULONG __stdcall IDirect3D3__AddRef(IDirect3D3Impl* This)
|
||||
{
|
||||
dprintf("-> %s(This=%p)\n", __FUNCTION__, This);
|
||||
ULONG ret = ++This->ref;
|
||||
dprintf("<- %s(This ref=%u)\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ULONG __stdcall IDirect3D3__Release(IDirect3D3Impl* This)
|
||||
{
|
||||
dprintf("-> %s(This=%p)\n", __FUNCTION__, This);
|
||||
|
||||
ULONG ret = --This->ref;
|
||||
|
||||
if (This->ref == 0)
|
||||
{
|
||||
dprintf(" Released (%p)\n", This);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
dprintf("<- %s(This ref=%u)\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__EnumDevices(IDirect3D3Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__CreateLight(IDirect3D3Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__CreateMaterial(IDirect3D3Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__CreateViewport(IDirect3D3Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__FindDevice(IDirect3D3Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__CreateDevice(IDirect3D3Impl* This, int a, int b, int c, int d)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__CreateVertexBuffer(IDirect3D3Impl* This, int a, int b, int c, int d)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__EnumZBufferFormats(IDirect3D3Impl* This, int a, int b, int c)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D3__EvictManagedTextures(IDirect3D3Impl* This)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct IDirect3D3ImplVtbl g_d3d3_vtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
IDirect3D3__QueryInterface,
|
||||
IDirect3D3__AddRef,
|
||||
IDirect3D3__Release,
|
||||
/* IDirect3D3Impl */
|
||||
IDirect3D3__EnumDevices,
|
||||
IDirect3D3__CreateLight,
|
||||
IDirect3D3__CreateMaterial,
|
||||
IDirect3D3__CreateViewport,
|
||||
IDirect3D3__FindDevice,
|
||||
IDirect3D3__CreateDevice,
|
||||
IDirect3D3__CreateVertexBuffer,
|
||||
IDirect3D3__EnumZBufferFormats,
|
||||
IDirect3D3__EvictManagedTextures,
|
||||
};
|
90
src/IDirect3D/IDirect3D7.c
Normal file
90
src/IDirect3D/IDirect3D7.c
Normal file
@ -0,0 +1,90 @@
|
||||
#include "IDirect3D.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
HRESULT __stdcall IDirect3D7__QueryInterface(IDirect3D7Impl* This, REFIID riid, void** obj)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p, riid=%08X, obj=%p)\n", __FUNCTION__, This, (unsigned int)riid, obj);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ULONG __stdcall IDirect3D7__AddRef(IDirect3D7Impl* This)
|
||||
{
|
||||
dprintf("-> %s(This=%p)\n", __FUNCTION__, This);
|
||||
ULONG ret = ++This->ref;
|
||||
dprintf("<- %s(This ref=%u)\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ULONG __stdcall IDirect3D7__Release(IDirect3D7Impl* This)
|
||||
{
|
||||
dprintf("-> %s(This=%p)\n", __FUNCTION__, This);
|
||||
|
||||
ULONG ret = --This->ref;
|
||||
|
||||
if (This->ref == 0)
|
||||
{
|
||||
dprintf(" Released (%p)\n", This);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
dprintf("<- %s(This ref=%u)\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D7__EnumDevices(IDirect3D7Impl* This, int a, int b)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D7__CreateDevice(IDirect3D7Impl* This, int a, int b, int c)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D7__CreateVertexBuffer(IDirect3D7Impl* This, int a, int b, int c)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D7__EnumZBufferFormats(IDirect3D7Impl* This, int a, int b, int c)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __stdcall IDirect3D7__EvictManagedTextures(IDirect3D7Impl* This)
|
||||
{
|
||||
dprintf("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
|
||||
HRESULT ret = E_FAIL;
|
||||
dprintf("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct IDirect3D7ImplVtbl g_d3d7_vtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
IDirect3D7__QueryInterface,
|
||||
IDirect3D7__AddRef,
|
||||
IDirect3D7__Release,
|
||||
/* IDirect3D7Impl */
|
||||
IDirect3D7__EnumDevices,
|
||||
IDirect3D7__CreateDevice,
|
||||
IDirect3D7__CreateVertexBuffer,
|
||||
IDirect3D7__EnumZBufferFormats,
|
||||
IDirect3D7__EvictManagedTextures,
|
||||
};
|
@ -45,24 +45,55 @@ HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirect3D, riid))
|
||||
{
|
||||
IDirect3DImpl* d3d = (IDirect3DImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawImpl));
|
||||
IDirect3DImpl* d3d = (IDirect3DImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DImpl));
|
||||
|
||||
dprintf(" GUID = %08X (IID_IDirect3D), d3d = %p\n", ((GUID*)riid)->Data1, d3d);
|
||||
|
||||
d3d->lpVtbl = &g_d3d_vtbl1;
|
||||
d3d->lpVtbl = &g_d3d_vtbl;
|
||||
d3d->lpVtbl->AddRef(d3d);
|
||||
|
||||
*obj = d3d;
|
||||
|
||||
ret = S_OK;
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirect3D2, riid) ||
|
||||
IsEqualGUID(&IID_IDirect3D3, riid) ||
|
||||
IsEqualGUID(&IID_IDirect3D7, riid))
|
||||
else if (IsEqualGUID(&IID_IDirect3D2, riid))
|
||||
{
|
||||
dprintf(" GUID = %08X (IID_IDirect3DX)\n", ((GUID*)riid)->Data1);
|
||||
IDirect3D2Impl* d3d = (IDirect3D2Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D2Impl));
|
||||
|
||||
ret = E_FAIL;
|
||||
dprintf(" GUID = %08X (IID_IDirect3D2), d3d = %p\n", ((GUID*)riid)->Data1, d3d);
|
||||
|
||||
d3d->lpVtbl = &g_d3d2_vtbl;
|
||||
d3d->lpVtbl->AddRef(d3d);
|
||||
|
||||
*obj = d3d;
|
||||
|
||||
ret = S_OK;
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirect3D3, riid))
|
||||
{
|
||||
IDirect3D3Impl* d3d = (IDirect3D3Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D3Impl));
|
||||
|
||||
dprintf(" GUID = %08X (IID_IDirect3D3), d3d = %p\n", ((GUID*)riid)->Data1, d3d);
|
||||
|
||||
d3d->lpVtbl = &g_d3d3_vtbl;
|
||||
d3d->lpVtbl->AddRef(d3d);
|
||||
|
||||
*obj = d3d;
|
||||
|
||||
ret = S_OK;
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirect3D7, riid))
|
||||
{
|
||||
IDirect3D7Impl* d3d = (IDirect3D7Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D7Impl));
|
||||
|
||||
dprintf(" GUID = %08X (IID_IDirect3D7), d3d = %p\n", ((GUID*)riid)->Data1, d3d);
|
||||
|
||||
d3d->lpVtbl = &g_d3d7_vtbl;
|
||||
d3d->lpVtbl->AddRef(d3d);
|
||||
|
||||
*obj = d3d;
|
||||
|
||||
ret = S_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user