Order functions in binary up to the end of Helicopter; refactor vector/matrix classes (#1309)

* Order experimentation

* Revert IslePathActor

* Fix order

* Fix inlining

* Fixes

* WIP

* WIP

* Refactor

* Refactor

* Fix operators

* Remove obsolete inline keyword

* Fix ctors

* Refactor

* Rename files

* Refactor

* Remove empty line
This commit is contained in:
Christian Semmler
2025-01-04 15:07:04 -07:00
committed by GitHub
parent b8f1364ac7
commit c54805fde8
25 changed files with 1245 additions and 1030 deletions

View File

@@ -419,7 +419,7 @@ void Helicopter::Animate(float p_time)
Vector3 v3(m_unk0x1a8[3]);
mat.SetIdentity();
m_unk0x1f4.BETA_1004aaa0(mat, f2);
m_unk0x1f4.InterpolateToMatrix(mat, f2);
v2 = v3;
v2 -= v1;
@@ -482,8 +482,8 @@ void Helicopter::FUN_100042a0(const Matrix4& p_matrix)
m_unk0x1f0 = Timer()->GetTime();
m_unk0x1f4.BETA_1004a9b0(local48, local90);
m_unk0x1f4.FUN_10004520();
m_unk0x1f4.SetStartEnd(local48, local90);
m_unk0x1f4.NormalizeDirection();
}
// FUNCTION: LEGO1 0x10004640

View File

@@ -358,7 +358,7 @@ void LegoCarBuild::VTable0x70()
m_unk0x2a0 = sqrt((MxDouble) DISTSQRD2(m_unk0x290, m_unk0x298));
m_unk0x25c.BETA_1004a9b0(m_unk0x178, m_unk0x208);
m_unk0x25c.SetStartEnd(m_unk0x178, m_unk0x208);
}
// FUNCTION: LEGO1 0x10023130
@@ -406,7 +406,7 @@ void LegoCarBuild::FUN_10023130(MxLong p_x, MxLong p_y)
MxFloat local1c = sqrt((double) (NORMSQRD2(local20))) / m_unk0x2a0;
m_unk0x25c.BETA_1004aaa0(local78, local1c);
m_unk0x25c.InterpolateToMatrix(local78, local1c);
local78[3][0] = m_unk0x178[3][0] + local18[0];
local78[3][1] = m_unk0x178[3][1] + local18[1];

View File

@@ -2797,8 +2797,8 @@ void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x
LegoLocation* location = NavController()->GetLocation(p_tranInfo->m_location);
if (location != NULL) {
CalcLocalTransform(location->m_position, location->m_direction, location->m_up, m_unk0x484);
m_unk0x4cc.BETA_1004a9b0(m_unk0x43c, m_unk0x484);
m_unk0x4cc.FUN_10004520();
m_unk0x4cc.SetStartEnd(m_unk0x43c, m_unk0x484);
m_unk0x4cc.NormalizeDirection();
}
else {
p_tranInfo->m_flags &= ~LegoTranInfo::c_bit1;
@@ -2832,7 +2832,7 @@ void LegoAnimationManager::FUN_10064b50(MxLong p_time)
sub[1] = (m_unk0x484[3][1] - m_unk0x43c[3][1]) * und;
sub[2] = (m_unk0x484[3][2] - m_unk0x43c[3][2]) * und;
m_unk0x4cc.BETA_1004aaa0(mat, (float) (p_time - m_unk0x434) / 1000.0f);
m_unk0x4cc.InterpolateToMatrix(mat, (float) (p_time - m_unk0x434) / 1000.0f);
VPV3(mat[3], m_unk0x43c[3], sub);
mat[3][3] = 1.0f;

View File

@@ -8,12 +8,12 @@
#include "mxdirectx/mxdirect3d.h"
#include "mxdirectx/mxstopwatch.h"
#include "mxdisplaysurface.h"
#include "mxgeometry/mxmatrix.h"
#include "mxmisc.h"
#include "mxpalette.h"
#include "mxregion.h"
#include "mxtimer.h"
#include "mxtransitionmanager.h"
#include "realtime/matrix.h"
#include "realtime/realtime.h"
#include "roi/legoroi.h"
#include "tgl/d3drm/impl.h"

View File

@@ -799,7 +799,7 @@ void Act3::DebugCopter(
const Matrix4& p_destination,
const Matrix4& p_startPosition,
const Matrix4& p_endPosition,
const UnknownMx4DPointFloat& p_unk0x1f4
const MxQuaternionTransformer& p_unk0x1f4
)
{
DebugPrintf("Copter matrix...\n\n");
@@ -831,10 +831,10 @@ void Act3::DebugCopter(
Mx4DPointFloat unk0x00, unk0x18;
if (p_unk0x1f4.GetUnknown0x30() != 0) {
if (p_unk0x1f4.GetFlags() != 0) {
// TODO: Match
unk0x00 = p_unk0x1f4.GetUnknown0x00();
unk0x18 = p_unk0x1f4.GetUnknown0x18();
unk0x00 = p_unk0x1f4.GetStartQuat();
unk0x18 = p_unk0x1f4.GetEndQuat();
DebugPrintf("Source quaternion...");
// STRING: LEGO1 0x100f7864