mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user