From 23b8465621f151924b5ed747c94b20f8fd4ee752 Mon Sep 17 00:00:00 2001 From: crudelios Date: Sat, 25 Jan 2014 19:13:32 +0000 Subject: [PATCH] BBox: fix for a small rounding issue. The new chapter title in Paper Mario TTYD had a small graphical bug due to the new code because it read one extra pixel, this fixes it. I hope this gets everything, I though I had checked most bugs and yet here I am, commit-spamming... --- Source/Core/VideoCommon/VertexLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index a13d72ad8f..2f8559bebb 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -254,8 +254,8 @@ void LOADERDECL UpdateBoundingBox() } // Convert to screen space and add the point to the list - round like the real hardware - s_bbox_points[s_bbox_currPoint].x = (((s32)(0.5 + (16.0f * (screenPoint[0] * xfregs.viewport.wd + (xfregs.viewport.xOrig - 342.0f))))) + 6) >> 4; - s_bbox_points[s_bbox_currPoint].y = (((s32)(0.5 + (16.0f * (screenPoint[1] * xfregs.viewport.ht + (xfregs.viewport.yOrig - 342.0f))))) + 6) >> 4; + s_bbox_points[s_bbox_currPoint].x = (((s32) (0.5f + (16.0f * (screenPoint[0] * xfregs.viewport.wd + (xfregs.viewport.xOrig - 342.0f))))) - 9) >> 4; + s_bbox_points[s_bbox_currPoint].y = (((s32) (0.5f + (16.0f * (screenPoint[1] * xfregs.viewport.ht + (xfregs.viewport.yOrig - 342.0f))))) - 9) >> 4; s_bbox_points[s_bbox_currPoint].z = screenPoint[2]; // Update point list for primitive