Refactor CP array constants slightly
This commit is contained in:
1 parent
c915b780cf
commit
51de3d0fd1
9 files changed
+30
-24
No files matched your search
@@ -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