summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2014-04-27 11:59:04 -0700
committermagumagu <magumagu9@gmail.com>2014-05-16 18:58:07 -0700
commit1357277f40166683a3ac4eb9979010c3038d2db8 (patch)
tree69895a9271115234210712d37ea5376dd196482f /Source/Core/VideoCommon/VertexLoader.cpp
parent8f5342c442c8e78784b4ea7002250781ba768767 (diff)
Video backends: mass-replace "xfregs" with "xfmem".
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index fc8b2771a1..62c06a9f50 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -217,8 +217,8 @@ void LOADERDECL UpdateBoundingBox()
// We need to get the raw projection values for the bounding box calculation
// to work properly. That means, no projection hacks!
const float * const orig_point = s_bbox_vertex_buffer;
- const float * const world_matrix = (float*)xfregs.posMatrices + s_curposmtx * 4;
- const float * const proj_matrix = xfregs.projection.rawProjection;
+ const float * const world_matrix = (float*)xfmem.posMatrices + s_curposmtx * 4;
+ const float * const proj_matrix = xfmem.projection.rawProjection;
// Transform by world matrix
// Only calculate what we need, discard the rest
@@ -226,7 +226,7 @@ void LOADERDECL UpdateBoundingBox()
transformed[1] = orig_point[0] * world_matrix[4] + orig_point[1] * world_matrix[5] + orig_point[2] * world_matrix[6] + world_matrix[7];
// Transform by projection matrix
- switch (xfregs.projection.type)
+ switch (xfmem.projection.type)
{
// Perspective projection, we must divide by w
case GX_PERSPECTIVE:
@@ -246,13 +246,13 @@ void LOADERDECL UpdateBoundingBox()
break;
default:
- ERROR_LOG(VIDEO, "Unknown projection type: %d", xfregs.projection.type);
+ ERROR_LOG(VIDEO, "Unknown projection type: %d", xfmem.projection.type);
screenPoint[0] = screenPoint[1] = screenPoint[2] = 1;
}
// 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.5f + (16.0f * (screenPoint[0] * xfregs.viewport.wd + (xfregs.viewport.xOrig - 342.0f))))) + 3) >> 4;
- s_bbox_points[s_bbox_currPoint].y = (((s32) (0.5f + (16.0f * (screenPoint[1] * xfregs.viewport.ht + (xfregs.viewport.yOrig - 342.0f))))) + 3) >> 4;
+ s_bbox_points[s_bbox_currPoint].x = (((s32) (0.5f + (16.0f * (screenPoint[0] * xfmem.viewport.wd + (xfmem.viewport.xOrig - 342.0f))))) + 3) >> 4;
+ s_bbox_points[s_bbox_currPoint].y = (((s32) (0.5f + (16.0f * (screenPoint[1] * xfmem.viewport.ht + (xfmem.viewport.yOrig - 342.0f))))) + 3) >> 4;
s_bbox_points[s_bbox_currPoint].z = screenPoint[2];
// Update point list for primitive