From 2d4b7e3f3f67f48ec2fb3d8eb8b2af3b70e4afcc Mon Sep 17 00:00:00 2001 From: crudelios Date: Sun, 14 Sep 2014 17:52:51 +0100 Subject: Reimplement Bounding Box calculation using the software renderer. --- Source/Core/VideoCommon/BPStructs.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoCommon/BPStructs.cpp') diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 152d15a7d5..b307cbf2f4 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -19,6 +19,7 @@ #include "VideoCommon/RenderBase.h" #include "VideoCommon/Statistics.h" #include "VideoCommon/TextureDecoder.h" +#include "VideoCommon/BoundingBox.h" #include "VideoCommon/VertexLoader.h" #include "VideoCommon/VertexShaderManager.h" #include "VideoCommon/VideoCommon.h" @@ -231,7 +232,7 @@ static void BPWritten(const BPCmd& bp) // here. Not sure if there's a better spot to put this. // the number of lines copied is determined by the y scale * source efb height - PixelEngine::bbox_active = false; + BoundingBox::active = false; float yScale; if (PE_copy.scale_invert) @@ -378,13 +379,13 @@ static void BPWritten(const BPCmd& bp) case BPMEM_CLEARBBOX2: // Don't compute bounding box if this frame is being skipped! // Wrong but valid values are better than bogus values... - if (g_ActiveConfig.bUseBBox && !g_bSkipCurrentFrame) + if (!g_bSkipCurrentFrame) { u8 offset = bp.address & 2; - PixelEngine::bbox[offset] = bp.newvalue & 0x3ff; - PixelEngine::bbox[offset | 1] = bp.newvalue >> 10; - PixelEngine::bbox_active = true; + BoundingBox::coords[offset] = bp.newvalue & 0x3ff; + BoundingBox::coords[offset + 1] = bp.newvalue >> 10; + BoundingBox::active = true; } return; case BPMEM_TEXINVALIDATE: -- cgit v1.2.3