diff --git a/LEGO1/lego/legoomni/include/legoentity.h b/LEGO1/lego/legoomni/include/legoentity.h index dc3864fb..b18799e1 100644 --- a/LEGO1/lego/legoomni/include/legoentity.h +++ b/LEGO1/lego/legoomni/include/legoentity.h @@ -57,7 +57,7 @@ class LegoEntity : public MxEntity { void FUN_10010c30(); void FUN_100114e0(MxU8 p_unk0x59); - void SetLocation(Vector3& p_location, Vector3& p_direction, Vector3& p_up, MxBool); + void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool); inline LegoROI* GetROI() { return m_roi; } inline MxU8 GetFlags() { return m_flags; } diff --git a/LEGO1/lego/legoomni/include/legoentitypresenter.h b/LEGO1/lego/legoomni/include/legoentitypresenter.h index 2ff162ec..4e98eb5b 100644 --- a/LEGO1/lego/legoomni/include/legoentitypresenter.h +++ b/LEGO1/lego/legoomni/include/legoentitypresenter.h @@ -33,7 +33,7 @@ class LegoEntityPresenter : public MxCompositePresenter { virtual void Init(); // vtable+0x68 virtual undefined4 SetEntity(LegoEntity* p_entity); // vtable+0x6c - void SetEntityLocation(Vector3& p_location, Vector3& p_direction, Vector3& p_up); + void SetEntityLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up); inline LegoEntity* GetInternalEntity() { return m_entity; } inline void SetInternalEntity(LegoEntity* p_entity) { m_entity = p_entity; } diff --git a/LEGO1/lego/legoomni/src/entity/legoentity.cpp b/LEGO1/lego/legoomni/src/entity/legoentity.cpp index 0ad52887..c7060136 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentity.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentity.cpp @@ -83,7 +83,7 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) } // STUB: LEGO1 0x100109b0 -void LegoEntity::SetLocation(Vector3& p_location, Vector3& p_direction, Vector3& p_up, MxBool) +void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool) { // TODO } diff --git a/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp index d6b924fe..0c9ff60f 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp @@ -82,7 +82,7 @@ void LegoEntityPresenter::RepeatingTickle() } // FUNCTION: LEGO1 0x10053730 -void LegoEntityPresenter::SetEntityLocation(Vector3& p_location, Vector3& p_direction, Vector3& p_up) +void LegoEntityPresenter::SetEntityLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up) { if (m_entity) { m_entity->SetLocation(p_location, p_direction, p_up, TRUE); diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index df6b8f6e..1e34fd6d 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -358,9 +358,9 @@ MxResult LegoWorldPresenter::FUN_100674b0(ModelDbModel& p_model, FILE* p_wdbFile MxDSAction action; MxAtomId atom; - action.SetLocation(Vector3(p_model.m_location)); - action.SetDirection(Vector3(p_model.m_direction)); - action.SetUp(Vector3(p_model.m_direction)); + action.SetLocation(p_model.m_location); + action.SetDirection(p_model.m_direction); + action.SetUp(p_model.m_up); MxU32 objectId = m_unk0x50; m_unk0x50++; @@ -375,7 +375,7 @@ MxResult LegoWorldPresenter::FUN_100674b0(ModelDbModel& p_model, FILE* p_wdbFile presenter.SetAction(&action); LegoEntity* entity = (LegoEntity*) presenter.CreateEntity("LegoActor"); presenter.SetInternalEntity(entity); - presenter.SetEntityLocation(Vector3(p_model.m_location), Vector3(p_model.m_direction), Vector3(p_model.m_up)); + presenter.SetEntityLocation(p_model.m_location, p_model.m_direction, p_model.m_up); entity->Create(action); } else if (!strcmp(p_model.m_presenterName, "LegoEntityPresenter")) { @@ -383,7 +383,7 @@ MxResult LegoWorldPresenter::FUN_100674b0(ModelDbModel& p_model, FILE* p_wdbFile presenter.SetAction(&action); createdEntity = (LegoEntity*) presenter.CreateEntity("LegoEntity"); presenter.SetInternalEntity(createdEntity); - presenter.SetEntityLocation(Vector3(p_model.m_location), Vector3(p_model.m_direction), Vector3(p_model.m_up)); + presenter.SetEntityLocation(p_model.m_location, p_model.m_direction, p_model.m_up); createdEntity->Create(action); } diff --git a/LEGO1/omni/include/mxdsaction.h b/LEGO1/omni/include/mxdsaction.h index 6f15b40d..1ba24f40 100644 --- a/LEGO1/omni/include/mxdsaction.h +++ b/LEGO1/omni/include/mxdsaction.h @@ -73,9 +73,9 @@ class MxDSAction : public MxDSObject { inline Mx3DPointFloat& GetLocation() { return m_location; } inline Mx3DPointFloat& GetDirection() { return m_direction; } inline Mx3DPointFloat& GetUp() { return m_up; } - inline void SetLocation(Vector3& p_location) { m_location = p_location; } - inline void SetDirection(Vector3& p_direction) { m_direction = p_direction; } - inline void SetUp(Vector3& p_up) { m_up = p_up; } + inline void SetLocation(const Vector3& p_location) { m_location = p_location; } + inline void SetDirection(const Vector3& p_direction) { m_direction = p_direction; } + inline void SetUp(const Vector3& p_up) { m_up = p_up; } inline MxCore* GetUnknown84() { return m_unk0x84; } inline void SetUnknown84(MxCore* p_unk0x84) { m_unk0x84 = p_unk0x84; } inline MxCore* GetOrigin() { return m_origin; }