mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Refactor CP array constants slightly
This commit is contained in:
@ -224,7 +224,7 @@ u32 AnalyzeCommand(const u8* data, DecodeMode mode)
|
||||
// Determine offset of each element that might be a vertex array
|
||||
// The first 9 elements are never vertex arrays so we just accumulate their sizes.
|
||||
int offset = std::accumulate(sizes.begin(), sizes.begin() + 9, 0u);
|
||||
std::array<int, 12> offsets;
|
||||
std::array<int, NUM_VERTEX_COMPONENT_ARRAYS> offsets;
|
||||
for (size_t i = 0; i < offsets.size(); ++i)
|
||||
{
|
||||
offsets[i] = offset;
|
||||
|
@ -50,8 +50,8 @@ void FifoRecordAnalyzer::WriteVertexArray(int arrayIndex, const u8* vertexData,
|
||||
arrayType = s_CpMem.vtxDesc.low.Position;
|
||||
else if (arrayIndex == ARRAY_NORMAL)
|
||||
arrayType = s_CpMem.vtxDesc.low.Normal;
|
||||
else if (arrayIndex == ARRAY_COLOR || arrayIndex == ARRAY_COLOR2)
|
||||
arrayType = s_CpMem.vtxDesc.low.Color[arrayIndex - ARRAY_COLOR];
|
||||
else if (arrayIndex >= ARRAY_COLOR0 && arrayIndex < ARRAY_COLOR0 + NUM_COLOR_ARRAYS)
|
||||
arrayType = s_CpMem.vtxDesc.low.Color[arrayIndex - ARRAY_COLOR0];
|
||||
else if (arrayIndex >= ARRAY_POSITION && arrayIndex < ARRAY_POSITION + 8)
|
||||
arrayType = s_CpMem.vtxDesc.high.TexCoord[arrayIndex - ARRAY_POSITION];
|
||||
else
|
||||
|
Reference in New Issue
Block a user