summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authorcrudelios <crudelios@gmail.com>2014-01-25 19:13:32 +0000
committercrudelios <crudelios@gmail.com>2014-01-25 19:13:32 +0000
commit23b8465621f151924b5ed747c94b20f8fd4ee752 (patch)
tree07bbf524be2266d2b0fba84bf08829cd7820628b /Source/Core/VideoCommon/VertexLoader.cpp
parent90a7e053c5bba7d6ec442672be723aa9fdbe37dc (diff)
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...
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp4
1 files 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