From 39b2854b981aadec1576254ad5e4d91dc21c9709 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 14 Apr 2022 12:01:57 -0700 Subject: VertexLoader: Convert count register to remaining register This more accurately represents what's going on, and also ends at 0 instead of 1, making some indexing operations easier. This also changes it so that position_matrix_index_cache actually starts from index 0 instead of index 1. --- Source/Core/VideoCommon/VertexLoader_Position.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp') diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index 0fe8e7ba72..15d2f6d94e 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -41,8 +41,8 @@ void Pos_ReadDirect(VertexLoader* loader) for (int i = 0; i < N; ++i) { const float value = PosScale(src.Read(), scale); - if (loader->m_counter < 3) - VertexLoaderManager::position_cache[loader->m_counter][i] = value; + if (loader->m_remaining < 3) + VertexLoaderManager::position_cache[loader->m_remaining][i] = value; dst.Write(value); } @@ -68,8 +68,8 @@ void Pos_ReadIndex(VertexLoader* loader) for (int i = 0; i < N; ++i) { const float value = PosScale(Common::FromBigEndian(data[i]), scale); - if (loader->m_counter < 3) - VertexLoaderManager::position_cache[loader->m_counter][i] = value; + if (loader->m_remaining < 3) + VertexLoaderManager::position_cache[loader->m_remaining][i] = value; dst.Write(value); } -- cgit v1.2.3