Reimplement Bounding Box calculation using the software renderer.

This commit is contained in:
crudelios
2014-09-14 17:52:51 +01:00
parent b7aed97508
commit 2d4b7e3f3f
13 changed files with 602 additions and 672 deletions

View File

@ -14,6 +14,7 @@
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/VideoCommon.h"
@ -73,12 +74,12 @@ void SWBPWritten(int address, int newvalue)
EfbCopy::CopyEfb();
break;
case BPMEM_CLEARBBOX1:
PixelEngine::bbox[0] = newvalue >> 10;
PixelEngine::bbox[1] = newvalue & 0x3ff;
BoundingBox::coords[BoundingBox::LEFT] = newvalue >> 10;
BoundingBox::coords[BoundingBox::RIGHT] = newvalue & 0x3ff;
break;
case BPMEM_CLEARBBOX2:
PixelEngine::bbox[2] = newvalue >> 10;
PixelEngine::bbox[3] = newvalue & 0x3ff;
BoundingBox::coords[BoundingBox::TOP] = newvalue >> 10;
BoundingBox::coords[BoundingBox::BOTTOM] = newvalue & 0x3ff;
break;
case BPMEM_CLEAR_PIXEL_PERF:
// TODO: I didn't test if the value written to this register affects the amount of cleared registers