From 4fe9b4882ef5f324f4173f3abfe01733bcd0d748 Mon Sep 17 00:00:00 2001 From: PatrickvL Date: Wed, 18 Jan 2017 11:34:35 +0100 Subject: [PATCH] Merged two versions of BackFillMode into one This didn't change the fact that a duplicate SetRenderState_BackFillMode OOVPA (version 4134 and 4531) exist in OOVPATable's D3D8_1_0_4432 and D3D8_1_0_4627. Fixing that will be done separately - this is just a merger of a duplicate patch. --- src/CxbxKrnl/EmuD3D8.cpp | 49 +++++----------------- src/CxbxKrnl/EmuD3D8.h | 8 ---- src/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl | 6 +-- src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl | 2 +- 4 files changed, 14 insertions(+), 51 deletions(-) diff --git a/src/CxbxKrnl/EmuD3D8.cpp b/src/CxbxKrnl/EmuD3D8.cpp index f34e83a76..6fb43c818 100644 --- a/src/CxbxKrnl/EmuD3D8.cpp +++ b/src/CxbxKrnl/EmuD3D8.cpp @@ -6364,19 +6364,22 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode DWORD Value ) { - - DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_BackFillMode\n" "(\n" " Value : 0x%.08X\n" ");\n", Value); - EmuWarning("BackFillMode is not supported!"); - - - - return; + // blueshogun96 12/4/07 + // I haven't had access to Cxbx sources in a few months, great to be back :) + // + // Anyway, since standard Direct3D doesn't support the back fill mode + // operation, this function will be ignored. Things like this make me + // think even more that an OpenGL port wouldn't hurt since OpenGL supports + // nearly all of the missing features that Direct3D lacks. The Xbox's version + // of Direct3D was specifically created to take advantage of certain NVIDIA + // GPU registers and provide more OpenGL-like features IHMO. + EmuWarning("BackFillMode is not supported!"); } // ****************************************************************** @@ -9452,38 +9455,6 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetProjectionViewportMatrix } #pragma warning(default:4244) -// ****************************************************************** -// * func: EmuIDirect3DDevice8_BackFillMode -// ****************************************************************** -HRESULT WINAPI XTL::EmuIDirect3DDevice8_BackFillMode -( - DWORD Value -) -{ - - - DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BackFillMode\n" - "(\n" - " Value : 0x%.08X\n" - ");\n", - Value); - - - // blueshogun96 12/4/07 - // I haven't had access to Cxbx sources in a few months, great to be back :) - // - // Anyway, since standard Direct3D doesn't support the back fill mode - // operation, this function will be ignored. Things like this make me - // think even more that an OpenGL port wouldn't hurt since OpenGL supports - // nearly all of the missing features that Direct3D lacks. The Xbox's version - // of Direct3D was specifically created to take advantage of certain NVIDIA - // GPU registers and provide more OpenGL-like features IHMO. - - - - return S_OK; -} - // ****************************************************************** // * func: EmuD3DDevice_KickOff (D3D::CDevice::KickOff) // ****************************************************************** diff --git a/src/CxbxKrnl/EmuD3D8.h b/src/CxbxKrnl/EmuD3D8.h index 55745e9af..ac5dc3ece 100644 --- a/src/CxbxKrnl/EmuD3D8.h +++ b/src/CxbxKrnl/EmuD3D8.h @@ -1706,14 +1706,6 @@ HRESULT WINAPI EmuIDirect3DDevice8_GetProjectionViewportMatrix D3DXMATRIX *pProjectionViewport ); -// ****************************************************************** -// * func: EmuIDirect3DDevice8_BackFillMode -// ****************************************************************** -HRESULT WINAPI EmuIDirect3DDevice8_BackFillMode -( - DWORD Value -); - // ****************************************************************** // * func: EmuD3DDevice_KickOff (D3D::CDevice::KickOff) // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl index f73631b35..af47cdf0e 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl @@ -432,9 +432,9 @@ OOVPA_NO_XREF(IDirect3DDevice8_SetVerticalBlankCallback_1_0_4432, 12) OOVPA_END; // ****************************************************************** -// * IDirect3DDevice8_BackFillMode +// * IDirect3DDevice8_SetRenderState_BackFillMode // ****************************************************************** -OOVPA_NO_XREF(IDirect3DDevice8_BackFillMode_1_0_4531, 9) +OOVPA_NO_XREF(IDirect3DDevice8_SetRenderState_BackFillMode_1_0_4531, 9) { 0x04, 0x56 }, { 0x10, 0x8B }, @@ -845,7 +845,7 @@ OOVPATable D3D8_1_0_4432[] { // IDirect3DDevice8_GetDeviceCaps (* unchanged since 3925 *) OOVPA_TABLE_PATCH(IDirect3DDevice8_GetDeviceCaps_1_0_3925, XTL::EmuIDirect3DDevice8_GetDeviceCaps), // IDirect3DDevice8_BackFillMode_4531 - OOVPA_TABLE_PATCH(IDirect3DDevice8_BackFillMode_1_0_4531, XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode), + OOVPA_TABLE_PATCH(IDirect3DDevice8_SetRenderState_BackFillMode_1_0_4531, XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode), // IDirect3DSurface8::GetDesc (* unchanged since 4361 *) OOVPA_TABLE_PATCH(IDirect3DSurface8_GetDesc_1_0_4361, XTL::EmuIDirect3DSurface8_GetDesc), // Get2DSurfacDesc (* unchanged since 4361 *) diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl index d6b472b5f..d0c9c0c4e 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl @@ -3441,7 +3441,7 @@ OOVPATable D3D8_1_0_4627[] = { // IDirect3DDevice8_GetProjectionViewportMatrix OOVPA_TABLE_PATCH(IDirect3DDevice8_GetProjectionViewportMatrix_1_0_4627, XTL::EmuIDirect3DDevice8_GetProjectionViewportMatrix), // IDirect3DDevice8_BackFillMode (* unchanged since 4531 *) - OOVPA_TABLE_PATCH(IDirect3DDevice8_BackFillMode_1_0_4531, XTL::EmuIDirect3DDevice8_BackFillMode), + OOVPA_TABLE_PATCH(IDirect3DDevice8_SetRenderState_BackFillMode_1_0_4531, XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode), // IDirect3DDevice8_GetDeviceCaps (* unchanged since 3925 *) OOVPA_TABLE_PATCH(IDirect3DDevice8_GetDeviceCaps_1_0_3925, XTL::EmuIDirect3DDevice8_GetDeviceCaps), // D3DDevice_SetRenderState_MultiSampleMask