Implement MxOmni::DoesEntityExist and related

This commit is contained in:
Christian Semmler 2023-10-21 16:28:59 -04:00
parent 4f201eaa48
commit 806a472542
5 changed files with 25 additions and 9 deletions

View File

@ -50,6 +50,8 @@ class MxNotificationManager : public MxCore
void Unregister(MxCore *p_listener);
MxResult Send(MxCore *p_listener, MxNotificationParam *p_param);
inline MxNotificationPtrList *GetQueue() { return m_queue; }
private:
void FlushPending(MxCore *p_listener);
};

View File

@ -68,15 +68,20 @@ MxResult MxOmni::Start(MxDSAction* p_dsAction)
}
// OFFSET: LEGO1 0x100b00c0 STUB
void MxOmni::DeleteObject(MxDSAction &ds)
void MxOmni::DeleteObject(MxDSAction &p_dsAction)
{
// TODO
}
// OFFSET: LEGO1 0x100b09a0 STUB
MxBool MxOmni::DoesEntityExist(MxDSAction &ds)
// OFFSET: LEGO1 0x100b09a0
MxBool MxOmni::DoesEntityExist(MxDSAction &p_dsAction)
{
// TODO
if (m_streamer->FUN_100b9b30(p_dsAction)) {
MxNotificationPtrList *queue = m_notificationManager->GetQueue();
if (!queue || queue->size() == 0)
return TRUE;
}
return FALSE;
}

View File

@ -41,8 +41,8 @@ class MxOmni : public MxCore
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p); // vtable+18
virtual void Destroy(); // vtable+1c
virtual MxResult Start(MxDSAction* p_dsAction); // vtable+20
virtual void DeleteObject(MxDSAction &ds); // vtable+24
virtual MxBool DoesEntityExist(MxDSAction &ds); // vtable+28
virtual void DeleteObject(MxDSAction &p_dsAction); // vtable+24
virtual MxBool DoesEntityExist(MxDSAction &p_dsAction); // vtable+28
virtual void vtable0x2c(); // vtable+2c
virtual int vtable0x30(char*, int, MxCore*); // vtable+30
virtual void NotifyCurrentEntity(MxParam *p_param); // vtable+34

View File

@ -147,6 +147,15 @@ MxResult MxStreamer::Unknown100b99b0(MxDSAction* p_action)
return FAILURE;
}
// OFFSET: LEGO1 0x100b9b30
MxBool MxStreamer::FUN_100b9b30(MxDSObject &p_dsObject)
{
MxStreamController *controller = GetOpenStream(p_dsObject.GetAtomId().GetInternal());
if (controller)
return controller->FUN_100c20d0(p_dsObject);
return TRUE;
}
// OFFSET: LEGO1 0x100b9b60
MxLong MxStreamer::Notify(MxParam &p)
{

View File

@ -7,6 +7,7 @@
#include "mxcore.h"
#include "mxnotificationparam.h"
#include "mxstreamcontroller.h"
#include "mxdsobject.h"
#include "mxtypes.h"
// NOTE: This feels like some kind of templated class, maybe something from the
@ -92,11 +93,10 @@ class MxStreamer : public MxCore
virtual MxResult Create(); // vtable+0x14
MxBool FUN_100b9b30(MxDSObject &p_dsObject);
MxStreamController *GetOpenStream(const char *p_name);
MxResult AddStreamControllerToOpenList(MxStreamController *p_stream);
MxResult MxStreamer::Unknown100b99b0(MxDSAction* p_action);
MxResult Unknown100b99b0(MxDSAction* p_action);
private:
list<MxStreamController *> m_openStreams; // 0x8