mirror of https://github.com/AxioDL/metaforce.git
Minor compile fixes, fix potential undefined behavior in CMDL.cpp
This commit is contained in:
parent
2acc5c1fe5
commit
f2b551b89b
|
@ -1634,14 +1634,14 @@ bool WriteMREASecs(std::vector<std::vector<uint8_t>>& secsOut, const hecl::Proje
|
||||||
/* Iterate meshes */
|
/* Iterate meshes */
|
||||||
auto matIt = surfToGlobalMats.cbegin();
|
auto matIt = surfToGlobalMats.cbegin();
|
||||||
for (const Mesh& mesh : meshes) {
|
for (const Mesh& mesh : meshes) {
|
||||||
zeus::CTransform meshXf(mesh.sceneXf.val);
|
zeus::CTransform meshXf(mesh.sceneXf.val.data());
|
||||||
meshXf.basis.transpose();
|
meshXf.basis.transpose();
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
{
|
{
|
||||||
MeshHeader meshHeader = {};
|
MeshHeader meshHeader = {};
|
||||||
meshHeader.visorFlags.setFromBlenderProps(mesh.customProps);
|
meshHeader.visorFlags.setFromBlenderProps(mesh.customProps);
|
||||||
memmove(meshHeader.xfMtx, &mesh.sceneXf, 48);
|
memmove(meshHeader.xfMtx, mesh.sceneXf.val.data(), 48);
|
||||||
|
|
||||||
zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax));
|
zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax));
|
||||||
aabb = aabb.getTransformedAABox(meshXf);
|
aabb = aabb.getTransformedAABox(meshXf);
|
||||||
|
@ -1912,14 +1912,14 @@ bool WriteHMDLMREASecs(std::vector<std::vector<uint8_t>>& secsOut, const hecl::P
|
||||||
/* Iterate meshes */
|
/* Iterate meshes */
|
||||||
auto matIt = surfToGlobalMats.cbegin();
|
auto matIt = surfToGlobalMats.cbegin();
|
||||||
for (const Mesh& mesh : meshes) {
|
for (const Mesh& mesh : meshes) {
|
||||||
zeus::CTransform meshXf(mesh.sceneXf.val);
|
zeus::CTransform meshXf(mesh.sceneXf.val.data());
|
||||||
meshXf.basis.transpose();
|
meshXf.basis.transpose();
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
{
|
{
|
||||||
MeshHeader meshHeader = {};
|
MeshHeader meshHeader = {};
|
||||||
meshHeader.visorFlags.setFromBlenderProps(mesh.customProps);
|
meshHeader.visorFlags.setFromBlenderProps(mesh.customProps);
|
||||||
memmove(meshHeader.xfMtx, &mesh.sceneXf, 48);
|
memmove(meshHeader.xfMtx, mesh.sceneXf.val.data(), 48);
|
||||||
|
|
||||||
zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax));
|
zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax));
|
||||||
aabb = aabb.getTransformedAABox(meshXf);
|
aabb = aabb.getTransformedAABox(meshXf);
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit b4efa8667f81e9e9384321a9f77df0059b7f8915
|
Subproject commit 4725be4d1c93263d0f24f4616bce4d30ea0f05da
|
Loading…
Reference in New Issue