2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:47:42 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -2,22 +2,18 @@
#include "CSegIdList.hpp"
#include "CCharLayoutInfo.hpp"
namespace urde
{
namespace urde {
void CSegStatementSet::Add(const CSegIdList& list, const CCharLayoutInfo& layout,
const CSegStatementSet& other, float weight)
{
for (const CSegId& id : list.GetList())
{
x4_segData[id].x0_rotation *= zeus::CQuaternion::slerp(zeus::CQuaternion::skNoRotation,
other.x4_segData[id].x0_rotation, weight);
if (other.x4_segData[id].x1c_hasOffset && x4_segData[id].x1c_hasOffset)
{
zeus::CVector3f off = other.x4_segData[id].x10_offset - layout.GetFromParentUnrotated(id);
x4_segData[id].x10_offset += off * weight;
}
void CSegStatementSet::Add(const CSegIdList& list, const CCharLayoutInfo& layout, const CSegStatementSet& other,
float weight) {
for (const CSegId& id : list.GetList()) {
x4_segData[id].x0_rotation *=
zeus::CQuaternion::slerp(zeus::CQuaternion::skNoRotation, other.x4_segData[id].x0_rotation, weight);
if (other.x4_segData[id].x1c_hasOffset && x4_segData[id].x1c_hasOffset) {
zeus::CVector3f off = other.x4_segData[id].x10_offset - layout.GetFromParentUnrotated(id);
x4_segData[id].x10_offset += off * weight;
}
}
}
}
} // namespace urde