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
|
2024-05-03 08:01:27 -04:00
|
|
|
// VTABLE: BETA10 0x101c23f0
|
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);
|
2024-05-03 08:01:27 -04:00
|
|
|
MxDSObject(MxDSObject& p_dsObject);
|
2023-10-24 19:38:27 -04:00
|
|
|
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-05-03 08:01:27 -04:00
|
|
|
// FUNCTION: BETA10 0x1012bdd0
|
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-05-03 08:01:27 -04:00
|
|
|
// FUNCTION: BETA10 0x1012bd70
|
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
|
2024-05-03 08:01:27 -04:00
|
|
|
// FUNCTION: BETA10 0x100152e0
|
|
|
|
inline virtual void SetAtomId(MxAtomId p_atomId) { m_atomId = p_atomId; } // vtable+20;
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2024-05-03 08:01:27 -04:00
|
|
|
inline Type GetType() const { return (Type) m_type; }
|
|
|
|
inline const char* GetSourceName() const { return m_sourceName; }
|
|
|
|
inline const char* GetObjectName() const { return m_objectName; }
|
|
|
|
inline MxU32 GetObjectId() { return m_objectId; }
|
|
|
|
inline const MxAtomId& GetAtomId() { return m_atomId; }
|
|
|
|
inline MxS16 GetUnknown24() { return m_unk0x24; }
|
|
|
|
inline MxPresenter* GetUnknown28() { return m_unk0x28; }
|
2023-06-19 20:18:53 -04:00
|
|
|
|
2024-05-03 08:01:27 -04:00
|
|
|
inline void SetType(Type p_type) { m_type = p_type; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100152b0
|
|
|
|
inline void SetObjectId(MxU32 p_objectId) { m_objectId = p_objectId; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x10039570
|
|
|
|
inline void SetUnknown24(MxS16 p_unk0x24) { m_unk0x24 = p_unk0x24; }
|
|
|
|
|
|
|
|
inline void SetUnknown28(MxPresenter* p_unk0x28) { m_unk0x28 = p_unk0x28; }
|
2023-12-16 13:14:01 -05:00
|
|
|
|
|
|
|
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
|
2024-05-03 08:01:27 -04:00
|
|
|
// SYNTHETIC: BETA10 0x10148770
|
2024-01-18 08:34:14 -05:00
|
|
|
// MxDSObject::`scalar deleting destructor'
|
|
|
|
|
2024-05-03 08:01:27 -04:00
|
|
|
protected:
|
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
|