This game from 1996-1997 Midway uses D3D1, which isn't correctly supported by dxgl yet.
FindDevice needs to use these smaller structs:
Code: Select all
typedef struct _D3DDEVICEDESC1 {
DWORD dwSize;
DWORD dwFlags;
D3DCOLORMODEL dcmColorModel;
DWORD dwDevCaps;
D3DTRANSFORMCAPS dtcTransformCaps;
BOOL bClipping;
D3DLIGHTINGCAPS dlcLightingCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMaxBufferSize;
DWORD dwMaxVertexCount;
} D3DDEVICEDESC1,*LPD3DDEVICEDESC1;
typedef struct _D3DFINDDEVICERESULT1 {
DWORD dwSize;
GUID guid;
D3DDEVICEDESC1 ddHwDesc;
D3DDEVICEDESC1 ddSwDesc;
} D3DFINDDEVICERESULT1,*LPD3DFINDDEVICERESULT1;
HRESULT WINAPI glDirect3D7::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
..
..
// war gods - d3d1
if(lpD3DFDR->dwSize == sizeof(D3DFINDDEVICERESULT1)) d3d1 = true;
else if(lpD3DFDR->dwSize < sizeof(D3DFINDDEVICERESULT)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
Game doesn't care what's returned in the FDR struct other than GUID. There is another bug that's not fixed and is only pseudo-hacked around. I have no idea what causes the drawwindow_? to overscan / overdraw.
Code: Select all
HRESULT WINAPI glDirectDraw1::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP)
{
TRACE_ENTER(4,14,this,8,dwWidth,8,dwHeight,8,dwBPP);
if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
//TRACE_RET(HRESULT,23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,0,0));
return 0;
}
Code: Select all
xxxxx======
xxxxx======
xxxxx======
===========
===========
===========
Extra note: to get 3d acceleration working on NT or higher, you have to hack the wargods.exe
Goto exe offset 0x1fca0: 0xeb to skip the os check.
Thanks for your great emulation work! Exciting to see this running once again.