summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authorJens Nyberg <jens.nyberg@gmail.com>2014-03-18 04:00:38 +0100
committerJens Nyberg <jens.nyberg@gmail.com>2014-03-18 04:07:45 +0100
commit4a68550d0135257cfa10c46a91838254d59a6f53 (patch)
tree2e1beb48cdd934d3b9ce3dd701040a3f8faa6887 /Source/Core/VideoCommon/VertexLoader.cpp
parent027240da45ce3ae5cb0c208c7f4adf48ef489fa5 (diff)
Remove superfluous bit shift
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index d2fb50fec7..f751bd0896 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -291,15 +291,15 @@ void LOADERDECL UpdateBoundingBox()
return;
// Check points for bounds
- u8 b0 = ((p0.x > 0) ? 1 : 0) | (((p0.y > 0) ? 1 : 0) << 1) | (((p0.x > 607) ? 1 : 0) << 2) | (((p0.y > 479) ? 1 : 0) << 3);
- u8 b1 = ((p1.x > 0) ? 1 : 0) | (((p1.y > 0) ? 1 : 0) << 1) | (((p1.x > 607) ? 1 : 0) << 2) | (((p1.y > 479) ? 1 : 0) << 3);
+ u8 b0 = ((p0.x > 0) ? 1 : 0) | ((p0.y > 0) ? 2 : 0) | ((p0.x > 607) ? 4 : 0) | ((p0.y > 479) ? 8 : 0);
+ u8 b1 = ((p1.x > 0) ? 1 : 0) | ((p1.y > 0) ? 2 : 0) | ((p1.x > 607) ? 4 : 0) | ((p1.y > 479) ? 8 : 0);
// Let's be practical... If we only have a line, setting b2 to 3 saves an "if"-clause later on
u8 b2 = 3;
// Otherwise if we have a triangle, we need to check the third point
if (numPoints == 3)
- b2 = ((p2.x > 0) ? 1 : 0) | (((p2.y > 0) ? 1 : 0) << 1) | (((p2.x > 607) ? 1 : 0) << 2) | (((p2.y > 479) ? 1 : 0) << 3);
+ b2 = ((p2.x > 0) ? 1 : 0) | ((p2.y > 0) ? 2 : 0) | ((p2.x > 607) ? 4 : 0) | ((p2.y > 479) ? 8 : 0);
// These are the internal bbox vars
s32 left = 608, right = -1, top = 480, bottom = -1;