2023-06-11 21:03:54 -04:00
|
|
|
#ifndef MXDSOBJECT_H
|
|
|
|
#define MXDSOBJECT_H
|
|
|
|
|
2023-07-03 13:24:51 -04:00
|
|
|
#include "decomp.h"
|
2023-06-19 20:18:53 -04:00
|
|
|
#include "mxatomid.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxcore.h"
|
2023-07-03 13:24:51 -04:00
|
|
|
#include "mxdstypes.h"
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100dc868
|
2023-06-29 04:10:08 -04:00
|
|
|
// SIZE 0x2c
|
2023-10-24 19:38:27 -04:00
|
|
|
class MxDSObject : public MxCore {
|
2023-06-11 21:03:54 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
MxDSObject();
|
|
|
|
virtual ~MxDSObject() override;
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
void CopyFrom(MxDSObject& p_dsObject);
|
|
|
|
MxDSObject& operator=(MxDSObject& p_dsObject);
|
2023-06-29 12:08:06 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
__declspec(dllexport) void SetObjectName(const char* p_objectName);
|
|
|
|
void SetSourceName(const char* p_sourceName);
|
2023-07-03 13:24:51 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100bf730
|
2023-10-24 19:38:27 -04:00
|
|
|
inline virtual const char* ClassName() const override { return "MxDSObject"; }; // vtable+0c
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100bf740
|
2023-12-13 05:48:14 -05:00
|
|
|
inline virtual MxBool IsA(const char* p_name) const override
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-13 05:48:14 -05:00
|
|
|
return !strcmp(p_name, MxDSObject::ClassName()) || MxCore::IsA(p_name);
|
2023-10-24 19:38:27 -04:00
|
|
|
}; // vtable+10;
|
2023-06-29 12:08:06 -04:00
|
|
|
|
2023-12-13 05:48:14 -05:00
|
|
|
virtual undefined4 VTable0x14(); // vtable+14;
|
2023-11-21 03:44:45 -05:00
|
|
|
virtual MxU32 GetSizeOnDisk(); // vtable+18;
|
2023-12-13 05:48:14 -05:00
|
|
|
virtual void Deserialize(char** p_source, MxS16 p_unk0x24); // vtable+1c;
|
2023-10-24 19:38:27 -04:00
|
|
|
inline virtual void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; } // vtable+20;
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2023-12-11 16:35:50 -05:00
|
|
|
inline MxDSType GetType() const { return (MxDSType) this->m_type; }
|
|
|
|
inline const char* GetSourceName() const { return this->m_sourceName; }
|
2023-10-24 19:38:27 -04:00
|
|
|
inline MxU32 GetObjectId() { return this->m_objectId; }
|
2023-12-11 16:35:50 -05:00
|
|
|
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
2023-12-13 05:48:14 -05:00
|
|
|
inline MxS16 GetUnknown24() { return this->m_unk0x24; }
|
2023-12-13 16:44:14 -05:00
|
|
|
inline undefined4 GetUnknown28() { return this->m_unk0x28; }
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2023-12-11 16:35:50 -05:00
|
|
|
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
2023-10-24 19:38:27 -04:00
|
|
|
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
|
2023-12-13 05:48:14 -05:00
|
|
|
inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
|
2023-12-13 16:44:14 -05:00
|
|
|
inline void SetUnknown28(undefined4 p_unk0x28) { this->m_unk0x28 = p_unk0x28; }
|
2023-06-19 20:18:53 -04:00
|
|
|
|
|
|
|
private:
|
2023-12-13 05:48:14 -05:00
|
|
|
MxU32 m_sizeOnDisk; // 0x8
|
|
|
|
MxU16 m_type; // 0xc
|
|
|
|
char* m_sourceName; // 0x10
|
|
|
|
undefined4 m_unk0x14; // 0x14
|
|
|
|
char* m_objectName; // 0x18
|
|
|
|
MxU32 m_objectId; // 0x1c
|
|
|
|
MxAtomId m_atomId; // 0x20
|
|
|
|
MxS16 m_unk0x24; // 0x24
|
|
|
|
undefined4 m_unk0x28; // 0x28
|
2023-06-11 21:03:54 -04:00
|
|
|
};
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MxDSObject* DeserializeDSObjectDispatch(char**, MxS16);
|
2023-09-20 16:22:57 -04:00
|
|
|
|
2023-12-12 14:27:17 -05:00
|
|
|
// FUNCTION: ISLE 0x401c40
|
|
|
|
// MxDSObject::SetAtomId
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10005530
|
|
|
|
// MxDSObject::SetAtomId
|
|
|
|
|
2023-06-11 21:03:54 -04:00
|
|
|
#endif // MXDSOBJECT_H
|