summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelEngine.cpp
diff options
context:
space:
mode:
authorcrudelios <crudelios@gmail.com>2014-09-14 17:52:51 +0100
committercrudelios <crudelios@gmail.com>2014-10-10 12:27:06 +0100
commit2d4b7e3f3f67f48ec2fb3d8eb8b2af3b70e4afcc (patch)
treef81d5e738022be0234af2033badc51adef39ba49 /Source/Core/VideoCommon/PixelEngine.cpp
parentb7aed97508ba74116858a111030bbd5783a633cb (diff)
Reimplement Bounding Box calculation using the software renderer.
Diffstat (limited to 'Source/Core/VideoCommon/PixelEngine.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelEngine.cpp18
1 files changed, 3 insertions, 15 deletions
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<u16>([i](u32) {
- bbox_active = false;
- return bbox[i];
+ BoundingBox::active = false;
+ return BoundingBox::coords[i];
}),
MMIO::InvalidWrite<u16>()
);