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"
|
2024-03-09 15:07:52 -05:00
|
|
|
#include "mxatom.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxcore.h"
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2023-12-16 13:14:01 -05:00
|
|
|
class MxPresenter;
|
|
|
|
|
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:
|
2024-01-17 11:53:53 -05:00
|
|
|
enum Type {
|
|
|
|
e_object = 0,
|
|
|
|
e_action,
|
|
|
|
e_mediaAction,
|
|
|
|
e_anim,
|
|
|
|
e_sound,
|
|
|
|
e_multiAction,
|
|
|
|
e_serialAction,
|
|
|
|
e_parallelAction,
|
|
|
|
e_event,
|
|
|
|
e_selectAction,
|
|
|
|
e_still,
|
|
|
|
e_objectAction,
|
|
|
|
};
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MxDSObject();
|
2024-02-01 15:42:10 -05:00
|
|
|
~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
|
|
|
|
2024-01-24 21:16:29 -05:00
|
|
|
void SetObjectName(const char* p_objectName);
|
2023-10-24 19:38:27 -04:00
|
|
|
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
|
2024-02-01 15:42:10 -05:00
|
|
|
inline 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
|
2024-02-01 15:42:10 -05:00
|
|
|
inline 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);
|
2024-01-29 17:30:20 -05:00
|
|
|
} // vtable+10;
|
2023-06-29 12:08:06 -04:00
|
|
|
|
2024-04-06 07:48:09 -04:00
|
|
|
virtual undefined4 VTable0x14(); // vtable+14;
|
|
|
|
virtual MxU32 GetSizeOnDisk(); // vtable+18;
|
|
|
|
virtual void Deserialize(MxU8*& p_source, MxS16 p_unk0x24); // vtable+1c;
|
|
|
|
|
|
|
|
// FUNCTION: ISLE 0x401c40
|
|
|
|
// FUNCTION: LEGO1 0x10005530
|
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
|
|
|
|
2024-01-17 11:53:53 -05:00
|
|
|
inline Type GetType() const { return (Type) this->m_type; }
|
2023-12-11 16:35:50 -05:00
|
|
|
inline const char* GetSourceName() const { return this->m_sourceName; }
|
2024-01-26 16:00:02 -05:00
|
|
|
inline const char* GetObjectName() const { return this->m_objectName; }
|
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-16 13:14:01 -05:00
|
|
|
inline MxPresenter* GetUnknown28() { return this->m_unk0x28; }
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2024-01-17 11:53:53 -05:00
|
|
|
inline void SetType(Type 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-16 13:14:01 -05:00
|
|
|
inline void SetUnknown28(MxPresenter* p_unk0x28) { this->m_unk0x28 = p_unk0x28; }
|
|
|
|
|
|
|
|
inline void ClearAtom() { m_atomId.Clear(); }
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100bf7c0
|
|
|
|
// MxDSObject::`scalar deleting destructor'
|
|
|
|
|
2023-06-19 20:18:53 -04:00
|
|
|
private:
|
2024-01-29 16:17:17 -05:00
|
|
|
MxU32 m_sizeOnDisk; // 0x08
|
|
|
|
MxU16 m_type; // 0x0c
|
2023-12-16 13:14:01 -05:00
|
|
|
char* m_sourceName; // 0x10
|
|
|
|
undefined4 m_unk0x14; // 0x14
|
|
|
|
char* m_objectName; // 0x18
|
|
|
|
MxU32 m_objectId; // 0x1c
|
|
|
|
MxAtomId m_atomId; // 0x20
|
|
|
|
MxS16 m_unk0x24; // 0x24
|
|
|
|
MxPresenter* m_unk0x28; // 0x28
|
2023-06-11 21:03:54 -04:00
|
|
|
};
|
|
|
|
|
2024-04-03 12:06:53 -04:00
|
|
|
MxDSObject* DeserializeDSObjectDispatch(MxU8*&, MxS16);
|
2023-09-20 16:22:57 -04:00
|
|
|
|
2023-06-11 21:03:54 -04:00
|
|
|
#endif // MXDSOBJECT_H
|