VertexLoader_Color: Use Common::swap24

This commit is contained in:
Pokechu22 2021-06-20 12:49:24 -07:00
parent 95e0f833f9
commit 1a964891f8

View File

@ -125,8 +125,8 @@ void Color_ReadIndex_24b_6666(VertexLoader* loader)
{ {
const auto index = DataRead<I>(); const auto index = DataRead<I>();
const u8* data = VertexLoaderManager::cached_arraybases[CPArray::Color0 + loader->m_colIndex] + const u8* data = VertexLoaderManager::cached_arraybases[CPArray::Color0 + loader->m_colIndex] +
(index * g_main_cp_state.array_strides[CPArray::Color0 + loader->m_colIndex]) - 1; (index * g_main_cp_state.array_strides[CPArray::Color0 + loader->m_colIndex]);
const u32 val = Common::swap32(data); const u32 val = Common::swap24(data);
SetCol6666(loader, val); SetCol6666(loader, val);
} }
@ -167,7 +167,7 @@ void Color_ReadDirect_16b_4444(VertexLoader* loader)
void Color_ReadDirect_24b_6666(VertexLoader* loader) void Color_ReadDirect_24b_6666(VertexLoader* loader)
{ {
SetCol6666(loader, Common::swap32(DataGetPosition() - 1)); SetCol6666(loader, Common::swap24(DataGetPosition()));
DataSkip(3); DataSkip(3);
} }