Skip to content

Commit

Permalink
Merge pull request #257 from ogamespec/master
Browse files Browse the repository at this point in the history
warnings
  • Loading branch information
ogamespec authored Aug 7, 2023
2 parents a0bc04c + 6e1dcab commit 6eed158
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/xf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,23 +768,23 @@ namespace GX
}

// load geometry matrix
if ((startIdx >= XF_MATRIX_MEMORY_ID) && (startIdx < XF_NORMAL_MATRIX_MEMORY_ID))
if ((startIdx >= XF_MATRIX_MEMORY_ID) && (startIdx < (XF_MATRIX_MEMORY_ID + XF_MATRIX_MEMORY_SIZE)))
{
for (size_t i = 0; i < amount; i++)
{
state.xf.mvTexMtx[startIdx + i] = gxfifo->ReadFloat();
state.xf.mvTexMtx[(startIdx - XF_MATRIX_MEMORY_ID) + i] = gxfifo->ReadFloat();
}
}
// load normal matrix
else if ((startIdx >= XF_NORMAL_MATRIX_MEMORY_ID) && (startIdx < XF_DUALTEX_MATRIX_MEMORY_ID))
else if ((startIdx >= XF_NORMAL_MATRIX_MEMORY_ID) && (startIdx < (XF_NORMAL_MATRIX_MEMORY_ID + XF_NORMAL_MATRIX_MEMORY_SIZE)))
{
for (size_t i = 0; i < amount; i++)
{
state.xf.nrmMtx[(startIdx - XF_NORMAL_MATRIX_MEMORY_ID) + i] = gxfifo->ReadFloat();
}
}
// load post-trans matrix
else if ((startIdx >= XF_DUALTEX_MATRIX_MEMORY_ID) && (startIdx < XF_LIGHT_MEMORY_ID))
else if ((startIdx >= XF_DUALTEX_MATRIX_MEMORY_ID) && (startIdx < (XF_DUALTEX_MATRIX_MEMORY_ID + XF_DUALTEX_MATRIX_MEMORY_SIZE)))
{
for (size_t i = 0; i < amount; i++)
{
Expand Down

0 comments on commit 6eed158

Please sign in to comment.