1 #include <windows.h> 2 #include <stdio.h> 3 #include <ddraw.h> 4 #include <ddrawi.h> 5 #include <d3dhal.h> 6 #include <ddrawgdi.h> 7 8 #if defined(_WIN32) && !defined(_NO_COM ) 9 #define COM_NO_WINDOWS_H 10 #include <objbase.h> 11 #else 12 #define IUnknown void 13 #if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) 14 #define CO_E_NOTINITIALIZED 0x800401F0 15 #endif 16 #endif 17 18 HRESULT WINAPI Main_D3D_QueryInterface(LPDIRECT3D3 iface, REFIID riid, LPVOID * ppvObj); 19 ULONG WINAPI Main_D3D_AddRef(LPDIRECT3D3 iface); 20 ULONG WINAPI Main_D3D_Release(LPDIRECT3D3 iface); 21 HRESULT WINAPI Main_D3D_EnumDevices(LPDIRECT3D3 iface, LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg); 22 HRESULT WINAPI Main_D3D_CreateLight(LPDIRECT3D3 iface, LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter); 23 HRESULT WINAPI Main_D3D_CreateMaterial(LPDIRECT3D3 iface, LPDIRECT3DMATERIAL3 *lplpDirect3DMaterial3, IUnknown *pUnkOuter); 24 HRESULT WINAPI Main_D3D_CreateViewport(LPDIRECT3D3 iface, LPDIRECT3DVIEWPORT3 *lplpD3DViewport3, IUnknown *pUnkOuter); 25 HRESULT WINAPI Main_D3D_FindDevice(LPDIRECT3D3 iface, LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR); 26 HRESULT WINAPI Main_D3D_CreateDevice3(LPDIRECT3D3 iface, REFCLSID rclsid,LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice3,LPUNKNOWN lpUnk); 27 HRESULT WINAPI Main_D3D_CreateVertexBuffer3(LPDIRECT3D3 iface, LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc, LPDIRECT3DVERTEXBUFFER *lplpD3DVertBuf,DWORD dwFlags,LPUNKNOWN lpUnk); 28 HRESULT WINAPI Main_D3D_EnumZBufferFormats(LPDIRECT3D3 iface, REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext); 29 HRESULT WINAPI Main_D3D_EvictManagedTextures(LPDIRECT3D3 iface); 30 31 IDirect3D3Vtbl IDirect3D3_Vtbl = 32 { 33 Main_D3D_QueryInterface, 34 Main_D3D_AddRef, 35 Main_D3D_Release, 36 Main_D3D_EnumDevices, 37 Main_D3D_CreateLight, 38 Main_D3D_CreateMaterial, 39 Main_D3D_CreateViewport, 40 Main_D3D_FindDevice, 41 Main_D3D_CreateDevice3, 42 Main_D3D_CreateVertexBuffer3, 43 Main_D3D_EnumZBufferFormats, 44 Main_D3D_EvictManagedTextures 45 }; 46 47 48