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/PixelEngine.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'Source/Core/VideoCommon/PixelEngine.cpp') diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp index da36e2d019..877acf916c 100644 --- a/Source/Core/VideoCommon/PixelEngine.cpp +++ b/Source/Core/VideoCommon/PixelEngine.cpp @@ -16,6 +16,7 @@ #include "Core/HW/ProcessorInterface.h" #include "VideoCommon/CommandProcessor.h" #include "VideoCommon/PixelEngine.h" +#include "VideoCommon/BoundingBox.h" #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoCommon.h" @@ -106,9 +107,6 @@ static int et_SetFinishOnMainThread; static volatile u32 interruptSetToken = 0; static volatile u32 interruptSetFinish = 0; -u16 bbox[4]; -bool bbox_active; - enum { INT_CAUSE_PE_TOKEN = 0x200, // GP Token @@ -128,9 +126,6 @@ void DoState(PointerWrap &p) p.Do(g_bSignalFinishInterrupt); p.Do(interruptSetToken); p.Do(interruptSetFinish); - - p.Do(bbox); - p.Do(bbox_active); } void UpdateInterrupts(); @@ -155,13 +150,6 @@ void Init() et_SetTokenOnMainThread = CoreTiming::RegisterEvent("SetToken", SetToken_OnMainThread); et_SetFinishOnMainThread = CoreTiming::RegisterEvent("SetFinish", SetFinish_OnMainThread); - - bbox[0] = 0x80; - bbox[1] = 0xA0; - bbox[2] = 0x80; - bbox[3] = 0xA0; - - bbox_active = false; } void RegisterMMIO(MMIO::Mapping* mmio, u32 base) @@ -244,8 +232,8 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) { mmio->Register(base | (PE_BBOX_LEFT + 2 * i), MMIO::ComplexRead([i](u32) { - bbox_active = false; - return bbox[i]; + BoundingBox::active = false; + return BoundingBox::coords[i]; }), MMIO::InvalidWrite() ); -- cgit v1.2.3