mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Tidy up operator[] code
This commit is contained in:
parent
1a15981324
commit
8960d8fa5b
@ -9,6 +9,7 @@ class LegoEntity;
|
|||||||
class MxDSChunk;
|
class MxDSChunk;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d4e50
|
// VTABLE: LEGO1 0x100d4e50
|
||||||
|
// VTABLE: BETA10 0x101bcd88
|
||||||
// SIZE 0x6c
|
// SIZE 0x6c
|
||||||
class LegoModelPresenter : public MxVideoPresenter {
|
class LegoModelPresenter : public MxVideoPresenter {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -789,9 +789,9 @@ void LegoAnimPresenter::StartingTickle()
|
|||||||
FUN_1006c8a0(TRUE);
|
FUN_1006c8a0(TRUE);
|
||||||
|
|
||||||
if (m_unk0x78 == NULL) {
|
if (m_unk0x78 == NULL) {
|
||||||
if (fabs(m_action->GetDirection().GetX()) >= 0.00000047683716F ||
|
if (fabs(m_action->GetDirection()[0]) >= 0.00000047683716F ||
|
||||||
fabs(m_action->GetDirection().GetY()) >= 0.00000047683716F ||
|
fabs(m_action->GetDirection()[1]) >= 0.00000047683716F ||
|
||||||
fabs(m_action->GetDirection().GetZ()) >= 0.00000047683716F) {
|
fabs(m_action->GetDirection()[2]) >= 0.00000047683716F) {
|
||||||
m_unk0x78 = new MxMatrix();
|
m_unk0x78 = new MxMatrix();
|
||||||
CalcLocalTransform(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), *m_unk0x78);
|
CalcLocalTransform(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), *m_unk0x78);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,6 +50,7 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1007f6b0
|
// FUNCTION: LEGO1 0x1007f6b0
|
||||||
|
// FUNCTION: BETA10 0x1009845e
|
||||||
MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
|
MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
|
||||||
{
|
{
|
||||||
MxResult result = FAILURE;
|
MxResult result = FAILURE;
|
||||||
@ -171,13 +172,9 @@ MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
|
|||||||
// Get scripted location, direction and up vectors
|
// Get scripted location, direction and up vectors
|
||||||
|
|
||||||
CalcLocalTransform(
|
CalcLocalTransform(
|
||||||
Mx3DPointFloat(m_action->GetLocation().GetX(), m_action->GetLocation().GetY(), m_action->GetLocation().GetZ()),
|
Mx3DPointFloat(m_action->GetLocation()[0], m_action->GetLocation()[1], m_action->GetLocation()[2]),
|
||||||
Mx3DPointFloat(
|
Mx3DPointFloat(m_action->GetDirection()[0], m_action->GetDirection()[1], m_action->GetDirection()[2]),
|
||||||
m_action->GetDirection().GetX(),
|
Mx3DPointFloat(m_action->GetUp()[0], m_action->GetUp()[1], m_action->GetUp()[2]),
|
||||||
m_action->GetDirection().GetY(),
|
|
||||||
m_action->GetDirection().GetZ()
|
|
||||||
),
|
|
||||||
Mx3DPointFloat(m_action->GetUp().GetX(), m_action->GetUp().GetY(), m_action->GetUp().GetZ()),
|
|
||||||
mat
|
mat
|
||||||
);
|
);
|
||||||
m_roi->UpdateTransformationRelativeToParent(mat);
|
m_roi->UpdateTransformationRelativeToParent(mat);
|
||||||
@ -234,6 +231,7 @@ MxResult LegoModelPresenter::FUN_1007ff70(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10080050
|
// FUNCTION: LEGO1 0x10080050
|
||||||
|
// FUNCTION: BETA10 0x100991c2
|
||||||
void LegoModelPresenter::ReadyTickle()
|
void LegoModelPresenter::ReadyTickle()
|
||||||
{
|
{
|
||||||
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoEntityPresenter") &&
|
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoEntityPresenter") &&
|
||||||
|
|||||||
@ -710,6 +710,15 @@
|
|||||||
// LIBRARY: BETA10 0x100fa0e0
|
// LIBRARY: BETA10 0x100fa0e0
|
||||||
// atof
|
// atof
|
||||||
|
|
||||||
|
// // LIBRARY: BETA10 0x1005a9c0
|
||||||
|
// // fabs
|
||||||
|
//
|
||||||
|
// // LIBRARY: BETA10 0x1005a9f0
|
||||||
|
// // fabsf
|
||||||
|
//
|
||||||
|
// // LIBRARY: BETA10 0x100f9bb0
|
||||||
|
// // _fabs
|
||||||
|
|
||||||
// LIBRARY: BETA10 0x100ff82b
|
// LIBRARY: BETA10 0x100ff82b
|
||||||
// __ctrandisp1
|
// __ctrandisp1
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,10 @@ class Mx3DPointFloat : public Vector3 {
|
|||||||
// FUNCTION: LEGO1 0x10003c10
|
// FUNCTION: LEGO1 0x10003c10
|
||||||
virtual void operator=(const Vector3& p_impl) { EqualsImpl(p_impl.m_data); } // vtable+0x88
|
virtual void operator=(const Vector3& p_impl) { EqualsImpl(p_impl.m_data); } // vtable+0x88
|
||||||
|
|
||||||
float GetX() { return m_data[0]; }
|
|
||||||
float GetY() { return m_data[1]; }
|
|
||||||
float GetZ() { return m_data[2]; }
|
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x10013460
|
// FUNCTION: BETA10 0x10013460
|
||||||
float& operator[](int idx) { return m_data[idx]; }
|
float& operator[](int idx) { return m_data[idx]; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100373c0
|
||||||
const float& operator[](int idx) const { return m_data[idx]; }
|
const float& operator[](int idx) const { return m_data[idx]; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10010c00
|
// SYNTHETIC: LEGO1 0x10010c00
|
||||||
|
|||||||
@ -86,13 +86,13 @@ class MxDSAction : public MxDSObject {
|
|||||||
void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
|
void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1003db50
|
// FUNCTION: BETA10 0x1003db50
|
||||||
Mx3DPointFloat& GetLocation() { return m_location; }
|
Vector3& GetLocation() { return m_location; }
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1003db80
|
// FUNCTION: BETA10 0x1003db80
|
||||||
Mx3DPointFloat& GetDirection() { return m_direction; }
|
Vector3& GetDirection() { return m_direction; }
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1003dbb0
|
// FUNCTION: BETA10 0x1003dbb0
|
||||||
Mx3DPointFloat& GetUp() { return m_up; }
|
Vector3& GetUp() { return m_up; }
|
||||||
|
|
||||||
void SetLocation(const Vector3& p_location) { m_location = p_location; }
|
void SetLocation(const Vector3& p_location) { m_location = p_location; }
|
||||||
void SetDirection(const Vector3& p_direction) { m_direction = p_direction; }
|
void SetDirection(const Vector3& p_direction) { m_direction = p_direction; }
|
||||||
|
|||||||
@ -416,6 +416,11 @@ class Vector4 : public Vector3 {
|
|||||||
m_data[3] = p_value;
|
m_data[3] = p_value;
|
||||||
} // vtable+0x84
|
} // vtable+0x84
|
||||||
|
|
||||||
|
float& operator[](int idx) { return m_data[idx]; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10010890
|
||||||
|
const float& operator[](int idx) const { return m_data[idx]; }
|
||||||
|
|
||||||
friend class Mx4DPointFloat;
|
friend class Mx4DPointFloat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user