add dummy Direct3D 2/3/7 interfaces

This commit is contained in:
FunkyFr3sh 2020-10-22 18:58:56 +02:00
parent d85b6e3243
commit e106ce3055
9 changed files with 441 additions and 27 deletions

View file

@ -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,

View 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
View 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,
};

View 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,
};