Fix division on packed normals

This commit is contained in:
Phillip Stephens 2022-02-03 07:26:33 -08:00
parent 9461fe0563
commit dca8af4d96
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 2 additions and 2 deletions

View File

@ -64,8 +64,8 @@ CModel::CModel(std::unique_ptr<u8[]> in, u32 dataLen, IObjectStore* store)
m_normals.emplace_back(hecl::SBig(norm[0]), hecl::SBig(norm[1]), hecl::SBig(norm[2]));
} else {
const auto* norm = reinterpret_cast<const s16*>(normals + (i * (sizeof(s16) * 3)));
m_normals.emplace_back(hecl::SBig(norm[0]) / 32676.f, hecl::SBig(norm[1]) / 32676.f,
hecl::SBig(norm[2]) / 32676.f);
m_normals.emplace_back(hecl::SBig(norm[0]) / 32767.f, hecl::SBig(norm[1]) / 32767.f,
hecl::SBig(norm[2]) / 32767.f);
}
}
u32 numColors = hecl::SBig(*secSizeCur) / (sizeof(int));