summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/XFStructs.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-02-08 21:10:31 -0800
committerPokechu22 <Pokechu022@gmail.com>2022-08-29 11:10:05 -0700
commit698def66ff36fc0155d84b3777501e71a2ad22a1 (patch)
tree2d254eb9bb053e6bab1dc95128aa08f80313d123 /Source/Core/VideoCommon/XFStructs.cpp
parent3fb09e32973884a86c61d88ab5b4ec9f09f1c0b8 (diff)
Fifo analyzer: Fix various XF mistakes
* 'hangle' was a typo * Light colors include an alpha value, so they should be 8 characters, not 6 * The XF command format adds 1 to the count internally (so 0 is one word), but we need to subtract that back to produce a valid command * XFMEM_POSTMATRICES was calculating the row by subtracting XFMEM_POSMATRICES (POS vs POST), resulting in incorrect row numbering
Diffstat (limited to 'Source/Core/VideoCommon/XFStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/XFStructs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/XFStructs.cpp b/Source/Core/VideoCommon/XFStructs.cpp
index 33e148d043..1d6811f92a 100644
--- a/Source/Core/VideoCommon/XFStructs.cpp
+++ b/Source/Core/VideoCommon/XFStructs.cpp
@@ -321,17 +321,17 @@ std::pair<std::string, std::string> GetXFRegInfo(u32 address, u32 value)
case XFMEM_SETCHAN0_AMBCOLOR:
return std::make_pair(RegName(XFMEM_SETCHAN0_AMBCOLOR),
- fmt::format("Channel 0 Ambient Color: {:06x}", value));
+ fmt::format("Channel 0 Ambient Color: {:08x}", value));
case XFMEM_SETCHAN1_AMBCOLOR:
return std::make_pair(RegName(XFMEM_SETCHAN1_AMBCOLOR),
- fmt::format("Channel 1 Ambient Color: {:06x}", value));
+ fmt::format("Channel 1 Ambient Color: {:08x}", value));
case XFMEM_SETCHAN0_MATCOLOR:
return std::make_pair(RegName(XFMEM_SETCHAN0_MATCOLOR),
- fmt::format("Channel 0 Material Color: {:06x}", value));
+ fmt::format("Channel 0 Material Color: {:08x}", value));
case XFMEM_SETCHAN1_MATCOLOR:
return std::make_pair(RegName(XFMEM_SETCHAN1_MATCOLOR),
- fmt::format("Channel 1 Material Color: {:06x}", value));
+ fmt::format("Channel 1 Material Color: {:08x}", value));
case XFMEM_SETCHAN0_COLOR: // Channel Color
return std::make_pair(RegName(XFMEM_SETCHAN0_COLOR),
@@ -474,8 +474,8 @@ std::string GetXFMemName(u32 address)
}
else if (address >= XFMEM_POSTMATRICES && address < XFMEM_POSTMATRICES_END)
{
- const u32 row = (address - XFMEM_POSMATRICES) / 4;
- const u32 col = (address - XFMEM_POSMATRICES) % 4;
+ const u32 row = (address - XFMEM_POSTMATRICES) / 4;
+ const u32 col = (address - XFMEM_POSTMATRICES) % 4;
return fmt::format("Post matrix row {:2d} col {:2d}", row, col);
}
else if (address >= XFMEM_LIGHTS && address < XFMEM_LIGHTS_END)
@@ -508,9 +508,9 @@ std::string GetXFMemName(u32 address)
case 15:
// Yagcd says light dir or "1/2 angle", dolphin has union for ddir or shalfangle.
// It would make sense if d stood for direction and s for specular, but it's ddir and
- // shalfhangle that have the comment "specular lights only", both at the same offset,
+ // shalfangle that have the comment "specular lights only", both at the same offset,
// while dpos and sdir have none...
- return fmt::format("Light {0} {1} direction or half hangle {1}", light, "xyz"[offset - 13]);
+ return fmt::format("Light {0} {1} direction or half angle {1}", light, "xyz"[offset - 13]);
}
}
else