VertexLoaderARM64: Use EnumMap for normal scales

This commit is contained in:
Pokechu22 2022-07-14 19:27:44 -07:00
parent 200676f4e3
commit afe5adb74d
1 changed files with 3 additions and 2 deletions

View File

@ -470,8 +470,9 @@ void VertexLoaderARM64::GenerateVertexLoader()
if (m_VtxDesc.low.Normal != VertexComponentFormat::NotPresent)
{
static const u8 map[8] = {7, 6, 15, 14};
const u8 scaling_exponent = map[u32(m_VtxAttr.g0.NormalFormat.Value())];
static constexpr Common::EnumMap<u8, static_cast<ComponentFormat>(7)> SCALE_MAP = {7, 6, 15, 14,
0, 0, 0, 0};
const u8 scaling_exponent = SCALE_MAP[m_VtxAttr.g0.NormalFormat];
const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1;
s32 offset = -1;