VideoCommon/BoundingBox: Make interface for querying bounding box data

Rather than expose the bounding box members directly, we can instead
provide an interface for code to use. This makes it nicer to transition
from global data, as the interface function names are already in
place.
This commit is contained in:
Lioncash
2019-12-05 10:58:03 -05:00
parent 15fc71cfcf
commit 9bd533ebe4
8 changed files with 92 additions and 36 deletions

View File

@ -841,15 +841,8 @@ void Tev::Draw()
EfbInterface::IncPerfCounterQuadCount(PQ_ZCOMP_OUTPUT);
}
// branchless bounding box update
BoundingBox::coords[BoundingBox::LEFT] =
std::min((u16)Position[0], BoundingBox::coords[BoundingBox::LEFT]);
BoundingBox::coords[BoundingBox::RIGHT] =
std::max((u16)Position[0], BoundingBox::coords[BoundingBox::RIGHT]);
BoundingBox::coords[BoundingBox::TOP] =
std::min((u16)Position[1], BoundingBox::coords[BoundingBox::TOP]);
BoundingBox::coords[BoundingBox::BOTTOM] =
std::max((u16)Position[1], BoundingBox::coords[BoundingBox::BOTTOM]);
BoundingBox::Update(static_cast<u16>(Position[0]), static_cast<u16>(Position[0]),
static_cast<u16>(Position[1]), static_cast<u16>(Position[1]));
#if ALLOW_TEV_DUMPS
if (g_ActiveConfig.bDumpTevStages)