Implement/match MxDSAction constructor (#101)

* Implement MxDSAction constructor

* Update mxdsaction.cpp
This commit is contained in:
Christian Semmler 2023-08-06 13:39:22 -04:00 committed by GitHub
parent 71950cd40a
commit c48fc69cf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 35 deletions

View file

@ -1,16 +1,43 @@
#include "mxdsaction.h" #include "mxdsaction.h"
#include <float.h>
#include <limits.h>
// OFFSET: LEGO1 0x100ad810 // OFFSET: LEGO1 0x100ad810
MxDSAction::MxDSAction() MxDSAction::MxDSAction()
{ {
// TODO this->m_flags = 32;
this->m_startTime = INT_MIN;
this->m_unk7c = NULL;
this->m_unk80 = 0;
this->m_duration = INT_MIN;
this->m_loopCount = -1;
this->SetType(MxDSType_Action); this->SetType(MxDSType_Action);
{
float value = FLT_MAX;
this->m_location.EqualsScalar(&value);
}
{
float value = FLT_MAX;
this->m_direction.EqualsScalar(&value);
}
{
float value = FLT_MAX;
this->m_up.EqualsScalar(&value);
}
this->m_unk84 = 0;
this->m_unk88 = 0;
this->m_omni = NULL; this->m_omni = NULL;
this->m_someTimingField = -0x80000000; this->m_someTimingField = INT_MIN;
} }
// OFFSET: LEGO1 0x100ada80 // OFFSET: LEGO1 0x100ada80
MxDSAction::~MxDSAction() MxDSAction::~MxDSAction()
{ {
delete this->m_unk7c; delete this->m_unk7c;
} }

View file

@ -2,6 +2,7 @@
#define MXDSACTION_H #define MXDSACTION_H
#include "mxdsobject.h" #include "mxdsobject.h"
#include "mxvector.h"
#include "mxomni.h" #include "mxomni.h"
// VTABLE 0x100dc098 // VTABLE 0x100dc098
@ -25,30 +26,18 @@ class MxDSAction : public MxDSObject
return !strcmp(name, MxDSAction::ClassName()) || MxDSObject::IsA(name); return !strcmp(name, MxDSAction::ClassName()) || MxDSObject::IsA(name);
} }
private: private:
MxLong m_unk2c; undefined4 m_unk2c;
MxLong m_unk30; DWORD m_flags;
MxLong m_unk34; DWORD m_startTime;
MxLong* m_unk38; LONG m_duration;
MxLong m_unk3c; MxS32 m_loopCount;
MxLong m_unk40; MxVector3Data m_location;
MxLong m_unk44; MxVector3Data m_direction;
MxLong m_unk48; MxVector3Data m_up;
MxLong m_unk4c; undefined4 *m_unk7c;
MxLong m_unk50; undefined2 m_unk80;
MxLong m_unk54; undefined4 m_unk84;
MxLong m_unk58; undefined4 m_unk88;
MxLong m_unk5c;
MxLong m_unk60;
MxLong m_unk64;
MxLong m_unk68;
MxLong m_unk6c;
MxLong m_unk70;
MxLong m_unk74;
MxLong m_unk78;
MxLong* m_unk7c;
MxLong m_unk80;
MxLong m_unk84;
MxLong m_unk88;
MxOmni* m_omni; // 0x8c MxOmni* m_omni; // 0x8c
MxS32 m_someTimingField; // 0x90 MxS32 m_someTimingField; // 0x90
}; };

View file

@ -12,12 +12,6 @@ DECOMP_SIZE_ASSERT(MxVector4, 0x8);
DECOMP_SIZE_ASSERT(MxVector3Data, 0x14); DECOMP_SIZE_ASSERT(MxVector3Data, 0x14);
DECOMP_SIZE_ASSERT(MxVector4Data, 0x18); DECOMP_SIZE_ASSERT(MxVector4Data, 0x18);
// OFFSET: LEGO1 0x10002060
void MxVector2::SetData(float *p_data)
{
m_data = p_data;
}
// OFFSET: LEGO1 0x100020a0 // OFFSET: LEGO1 0x100020a0
const float *MxVector2::GetData() const const float *MxVector2::GetData() const
{ {

View file

@ -9,7 +9,7 @@ class MxVector2
{ {
public: public:
// OFFSET: LEGO1 0x1000c0f0 // OFFSET: LEGO1 0x1000c0f0
inline MxVector2(float* p_data) : m_data(p_data) {} inline MxVector2(float* p_data) { this->SetData(p_data); }
// vtable + 0x00 (no virtual destructor) // vtable + 0x00 (no virtual destructor)
virtual void AddScalarImpl(float p_value) = 0; virtual void AddScalarImpl(float p_value) = 0;
@ -21,7 +21,9 @@ class MxVector2
virtual void MullVectorImpl(float *p_value) = 0; virtual void MullVectorImpl(float *p_value) = 0;
virtual void DivScalarImpl(float *p_value) = 0; virtual void DivScalarImpl(float *p_value) = 0;
virtual float DotImpl(float *p_a, float *p_b) const = 0; virtual float DotImpl(float *p_a, float *p_b) const = 0;
virtual void SetData(float *p_data);
// OFFSET: LEGO1 0x10002060
virtual void SetData(float *p_data) { this->m_data = p_data; }
// vtable + 0x20 // vtable + 0x20
virtual void EqualsImpl(float *p_data) = 0; virtual void EqualsImpl(float *p_data) = 0;