mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 08:11:16 +00:00
implement EndAction
implement EndAction +offsets commenets
This commit is contained in:
parent
28206402f9
commit
68efe9ac91
@ -46,16 +46,17 @@ class MxDSObject : public MxCore
|
||||
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
||||
inline MxDSType GetType() const { return (MxDSType) this->m_type; }
|
||||
|
||||
MxU32 m_sizeOnDisk; // 0x8
|
||||
MxU16 m_type; // 0xc
|
||||
char* m_sourceName; // 0x10
|
||||
undefined4 m_unk14; // 0x14
|
||||
char *m_objectName; // 0x18
|
||||
MxU32 m_objectId; // 0x1c
|
||||
MxAtomId m_atomId; // 0x20
|
||||
MxS16 m_unk24; // 0x24
|
||||
undefined4 m_unk28; // 0x28
|
||||
private:
|
||||
MxU32 m_sizeOnDisk;
|
||||
MxU16 m_type;
|
||||
char* m_sourceName;
|
||||
undefined4 m_unk14;
|
||||
char *m_objectName;
|
||||
MxU32 m_objectId;
|
||||
MxAtomId m_atomId;
|
||||
MxS16 m_unk24;
|
||||
undefined4 m_unk28;
|
||||
|
||||
};
|
||||
|
||||
MxDSObject *DeserializeDSObjectDispatch(char **, MxS16);
|
||||
|
||||
@ -93,10 +93,9 @@ int MxOmni::vtable0x30(char*, int, MxCore*)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100aefc0 STUB
|
||||
void MxOmni::NotifyCurrentEntity()
|
||||
// OFFSET: LEGO1 0x100aefc0
|
||||
void MxOmni::NotifyCurrentEntity(MxParam *p_param)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b09d0
|
||||
|
||||
@ -45,7 +45,7 @@ class MxOmni : public MxCore
|
||||
virtual MxBool DoesEntityExist(MxDSAction &ds); // vtable+28
|
||||
virtual void vtable0x2c(); // vtable+2c
|
||||
virtual int vtable0x30(char*, int, MxCore*); // vtable+30
|
||||
virtual void NotifyCurrentEntity(); // vtable+34
|
||||
virtual void NotifyCurrentEntity(MxParam *p_param); // vtable+34
|
||||
virtual void StartTimer(); // vtable+38
|
||||
virtual void StopTimer(); // vtable+3c
|
||||
virtual MxBool IsTimerRunning(); //vtable+40
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include "mxdsanim.h"
|
||||
#include "mxdssound.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
|
||||
#include "mxstreamer.h"
|
||||
#include "decomp.h"
|
||||
#include "define.h"
|
||||
|
||||
@ -135,10 +135,21 @@ MxLong MxPresenter::StartAction(MxStreamController *, MxDSAction *p_action)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b4e40 STUB
|
||||
// OFFSET: LEGO1 0x100b4e40
|
||||
void MxPresenter::EndAction()
|
||||
{
|
||||
// TODO
|
||||
if (this->m_action == FALSE)
|
||||
return;
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
if (!this->m_unkPresenter)
|
||||
{
|
||||
MxOmni::GetInstance()->NotifyCurrentEntity(&MxUnknown2(MXSTREAMER_UNKNOWN, NULL, this->m_action, TRUE));
|
||||
}
|
||||
|
||||
this->m_action = FALSE;
|
||||
MxS32 previousTickleState = 1 << m_currentTickleState;
|
||||
this->m_previousTickleStates |= previousTickleState;
|
||||
this->m_currentTickleState = TickleState_Idle;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b52d0
|
||||
|
||||
@ -79,11 +79,11 @@ class MxPresenter : public MxCore
|
||||
__declspec(dllexport) void Init();
|
||||
void SendTo_unkPresenter(MxOmni *);
|
||||
TickleState m_currentTickleState; // 0x8
|
||||
MxU32 m_previousTickleStates;
|
||||
MxPoint32 m_location;
|
||||
MxS32 m_displayZ;
|
||||
MxDSAction *m_action; // 0
|
||||
MxCriticalSection m_criticalSection;
|
||||
MxU32 m_previousTickleStates; // 0x0c
|
||||
MxPoint32 m_location; // 0x10
|
||||
MxS32 m_displayZ; // 0x18
|
||||
MxDSAction *m_action; // 0x1c
|
||||
MxCriticalSection m_criticalSection; // 0x20
|
||||
MxPresenter *m_unkPresenter; // 0x3c
|
||||
};
|
||||
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
#include <algorithm>
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxStreamer, 0x2c);
|
||||
DECOMP_SIZE_ASSERT(MxUnknown1, 0x14)
|
||||
DECOMP_SIZE_ASSERT(MxUnknown2, 0x14)
|
||||
|
||||
// OFFSET: LEGO1 0x100b8f00
|
||||
MxStreamer::MxStreamer()
|
||||
@ -179,3 +181,15 @@ MxStreamerSubClass1::MxStreamerSubClass1(undefined4 size)
|
||||
ptr[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100510c0
|
||||
MxParam *MxUnknown1::Clone()
|
||||
{
|
||||
return new MxUnknown1(this->m_type, this->m_sender, this->m_action, this->m_realloc);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10051270
|
||||
MxParam *MxUnknown2::Clone()
|
||||
{
|
||||
return new MxUnknown2(MXSTREAMER_UNKNOWN, this->m_sender, this->m_action, this->m_realloc);
|
||||
}
|
||||
|
||||
@ -105,4 +105,61 @@ class MxStreamer : public MxCore
|
||||
|
||||
};
|
||||
|
||||
// VTABLE 0x100d8350
|
||||
// SIZE 0x14
|
||||
class MxUnknown1 : public MxParam
|
||||
{
|
||||
public:
|
||||
inline MxUnknown1(MxParamType p_type, MxCore *p_sender, MxDSAction *p_action, MxBool p_reallocAction) : MxParam(p_type, p_sender)
|
||||
{
|
||||
MxDSAction *oldAction = p_action;
|
||||
this->m_realloc = p_reallocAction;
|
||||
if (p_reallocAction)
|
||||
{
|
||||
this->m_action = new MxDSAction();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_action = oldAction;
|
||||
return;
|
||||
}
|
||||
|
||||
this->m_action->SetAtomId(oldAction->m_atomId);
|
||||
|
||||
this->m_action->m_objectId = oldAction->m_objectId;
|
||||
this->m_action->m_unk24 = oldAction->m_unk24;
|
||||
}
|
||||
|
||||
inline virtual MxUnknown1::~MxUnknown1() override // 0x100511e0
|
||||
{
|
||||
if (this->m_realloc == FALSE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this->m_action)
|
||||
{
|
||||
delete this->m_action;
|
||||
}
|
||||
}
|
||||
|
||||
virtual MxParam *Clone() override; // vtable+0x4
|
||||
|
||||
MxDSAction *m_action; // 0xc
|
||||
MxBool m_realloc; // 0x10
|
||||
};
|
||||
|
||||
// VTABLE 0x100d8358
|
||||
// SIZE 0x14
|
||||
class MxUnknown2 : public MxUnknown1
|
||||
{
|
||||
|
||||
public:
|
||||
inline MxUnknown2(MxParamType p_type, MxCore *p_sender, MxDSAction *p_action, MxBool p_reallocAction)
|
||||
: MxUnknown1(p_type, p_sender, p_action, p_reallocAction) {}
|
||||
|
||||
inline virtual ~MxUnknown2() override {}; // 0x100513a0
|
||||
|
||||
virtual MxParam *Clone() override; // vtable+0x4
|
||||
};
|
||||
|
||||
#endif // MXSTREAMER_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user