mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -05:00
Implement MxOmni::DoesEntityExist and related (#225)
* Implement MxOmni::DoesEntityExist and related * Rename function for consistency
This commit is contained in:
parent
6931a817a6
commit
5dfb132025
5 changed files with 27 additions and 11 deletions
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -61,22 +61,27 @@ MxResult MxOmni::Start(MxDSAction* p_dsAction)
|
|||
MxResult result = FAILURE;
|
||||
if(p_dsAction->GetAtomId().GetInternal() != NULL && p_dsAction->GetObjectId() != -1 && m_streamer != NULL)
|
||||
{
|
||||
result = m_streamer->Unknown100b99b0(p_dsAction);
|
||||
result = m_streamer->FUN_100b99b0(p_dsAction);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,8 +42,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(MxNotificationParam *p_param); // vtable+34
|
||||
|
|
|
@ -132,7 +132,7 @@ MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController *stream)
|
|||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b99b0
|
||||
MxResult MxStreamer::Unknown100b99b0(MxDSAction* p_action)
|
||||
MxResult MxStreamer::FUN_100b99b0(MxDSAction* p_action)
|
||||
{
|
||||
MxStreamController* controller;
|
||||
if (p_action != NULL && p_action->GetAtomId().GetInternal() != NULL && p_action->GetObjectId() != -1)
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 FUN_100b99b0(MxDSAction* p_action);
|
||||
|
||||
private:
|
||||
list<MxStreamController *> m_openStreams; // 0x8
|
||||
|
|
Loading…
Reference in a new issue