Proper const use for vector / BETA match

This commit is contained in:
Christian Semmler 2025-01-16 15:32:35 -07:00
parent 02ffd44f61
commit 9e204334a6
10 changed files with 28 additions and 19 deletions

View File

@ -82,7 +82,7 @@ class Act3Ammo : public LegoPathActor {
MxResult Remove();
MxResult Create(Act3* p_world, MxU32 p_isPizza, MxS32 p_index);
MxResult FUN_10053b40(Vector3& p_srcLoc, Vector3& p_srcDir, Vector3& p_srcUp);
MxResult FUN_10053b40(const Vector3& p_srcLoc, const Vector3& p_srcDir, const Vector3& p_srcUp);
MxResult FUN_10053cb0(LegoPathController* p_p, LegoPathBoundary* p_boundary, MxFloat p_unk0x19c);
MxResult FUN_10053d30(LegoPathController* p_p, MxFloat p_unk0x19c);

View File

@ -109,7 +109,7 @@ MxResult Act3Ammo::Create(Act3* p_world, MxU32 p_isPizza, MxS32 p_index)
// FUNCTION: LEGO1 0x10053b40
// FUNCTION: BETA10 0x1001db2a
MxResult Act3Ammo::FUN_10053b40(Vector3& p_srcLoc, Vector3& p_srcDir, Vector3& p_srcUp)
MxResult Act3Ammo::FUN_10053b40(const Vector3& p_srcLoc, const Vector3& p_srcDir, const Vector3& p_srcUp)
{
assert(p_srcDir[1] != 0);

View File

@ -260,9 +260,9 @@ void LegoCarBuildAnimPresenter::StreamingTickle()
Mx3DPointFloat dirVec;
Vector3 cameraPosition(camera->GetWorldPosition());
Vector3 upVec(camera->GetWorldUp());
Vector3 targetPosition(targetROI->GetWorldPosition());
const Vector3 cameraPosition(camera->GetWorldPosition());
const Vector3 upVec(camera->GetWorldUp());
const Vector3 targetPosition(targetROI->GetWorldPosition());
MxMatrix localTransform;

View File

@ -316,6 +316,7 @@ float LegoNavController::CalculateNewVel(float p_targetVel, float p_currentVel,
}
// FUNCTION: LEGO1 0x10055080
// FUNCTION: BETA10 0x1009b26b
MxBool LegoNavController::CalculateNewPosDir(
const Vector3& p_curPos,
const Vector3& p_curDir,

View File

@ -22,12 +22,12 @@ struct LegoUnknown100db7f4 : public LegoEdge {
// FUNCTION: LEGO1 0x1002ddc0
// FUNCTION: BETA10 0x100372a0
LegoResult FUN_1002ddc0(LegoWEEdge& p_f, Vector3& p_point)
LegoResult FUN_1002ddc0(LegoWEEdge& p_f, Vector3& p_point) const
{
if (p_f.IsEqual(m_faceA)) {
p_point[0] = -m_unk0x28.index_operator(0);
p_point[1] = -m_unk0x28.index_operator(1);
p_point[2] = -m_unk0x28.index_operator(2);
p_point[0] = -m_unk0x28[0];
p_point[1] = -m_unk0x28[1];
p_point[2] = -m_unk0x28[2];
}
else {
// clang-format off

View File

@ -18,7 +18,13 @@ LegoUnknown::~LegoUnknown()
}
// FUNCTION: LEGO1 0x1009a140
void LegoUnknown::FUN_1009a140(const Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, Vector3& p_point4)
// FUNCTION: BETA10 0x10182c2f
void LegoUnknown::FUN_1009a140(
const Vector3& p_point1,
const Vector3& p_point2,
const Vector3& p_point3,
const Vector3& p_point4
)
{
m_unk0x00[0] = p_point1;
m_unk0x00[1] = p_point2;

View File

@ -12,7 +12,12 @@ class LegoUnknown {
LegoUnknown();
~LegoUnknown();
void FUN_1009a140(const Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, Vector3& p_point4);
void FUN_1009a140(
const Vector3& p_point1,
const Vector3& p_point2,
const Vector3& p_point3,
const Vector3& p_point4
);
LegoResult FUN_1009a1e0(float p_f1, MxMatrix& p_mat, Vector3& p_v, LegoU32 p_und);
private:

View File

@ -38,12 +38,8 @@ class Mx3DPointFloat : public Vector3 {
// FUNCTION: BETA10 0x10013460
float& operator[](int idx) { return m_data[idx]; }
// According to the PDB, BETA10 will not link this one if it is never used
// const float& operator[](int idx) const { return m_data[idx]; }
// only used by LegoUnknown100db7f4::FUN_1002ddc0() for some unknown reason
// FUNCTION: BETA10 0x100373c0
float& index_operator(int idx) { return m_data[idx]; }
const float& operator[](int idx) const { return m_data[idx]; }
// SYNTHETIC: LEGO1 0x10010c00
// ??4Mx3DPointFloat@@QAEAAV0@ABV0@@Z

View File

@ -87,13 +87,13 @@ class MxDSAction : public MxDSObject {
void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
// FUNCTION: BETA10 0x1003db50
Vector3& GetLocation() { return m_location; }
const Vector3& GetLocation() { return m_location; }
// FUNCTION: BETA10 0x1003db80
Vector3& GetDirection() { return m_direction; }
const Vector3& GetDirection() { return m_direction; }
// FUNCTION: BETA10 0x1003dbb0
Vector3& GetUp() { return m_up; }
const Vector3& GetUp() { return m_up; }
// FUNCTION: BETA10 0x100153b0
void SetLocation(const Vector3& p_location) { m_location = p_location; }

View File

@ -471,6 +471,7 @@ void ViewManager::SetPOVSource(const OrientableROI* point_of_view)
}
// FUNCTION: LEGO1 0x100a6dc0
// FUNCTION: BETA10 0x101739b8
float ViewManager::ProjectedSize(const BoundingSphere& p_bounding_sphere)
{
// The algorithm projects the radius of bounding sphere onto the perpendicular