summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_Position.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-04-14 12:01:57 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-04-22 16:54:38 -0700
commit39b2854b981aadec1576254ad5e4d91dc21c9709 (patch)
tree8be38dc8dddec79964a2448f8697dc60cc595e5f /Source/Core/VideoCommon/VertexLoader_Position.cpp
parent97d0ff58c8dbe374a1b87e1a72f1f245ed27ed96 (diff)
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.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Position.cpp8
1 files changed, 4 insertions, 4 deletions
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<T>(), 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);
}