From 6931a817a639334156f36dc38dfd27363b1bec16 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 21 Oct 2023 17:02:55 -0400 Subject: [PATCH] Implement NotifyCurrentEntity (#224) --- LEGO1/legoomni.cpp | 7 +++++-- LEGO1/legoomni.h | 2 +- LEGO1/mxomni.cpp | 2 +- LEGO1/mxomni.h | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index d4ab47ea..f3ba3a81 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -6,6 +6,7 @@ #include "legoutil.h" #include "legoobjectfactory.h" #include "legoinputmanager.h" +#include "legoworld.h" // 0x100f4588 MxAtomId *g_nocdSourceName = NULL; @@ -329,9 +330,11 @@ int LegoOmni::vtable0x30(char*, int, MxCore*) return 0; } -void LegoOmni::NotifyCurrentEntity() +// OFFSET: LEGO1 0x1005b3a0 +void LegoOmni::NotifyCurrentEntity(MxNotificationParam *p_param) { - // FIXME: Stub + if (m_currentWorld) + NotificationManager()->Send(m_currentWorld, p_param); } // OFFSET: LEGO1 0x1005b640 diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 37d3ef4b..7404e8fa 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -61,7 +61,7 @@ public: virtual MxBool DoesEntityExist(MxDSAction &ds) override; virtual void vtable0x2c() override; virtual int vtable0x30(char*, int, MxCore*) override; - virtual void NotifyCurrentEntity() override; + virtual void NotifyCurrentEntity(MxNotificationParam *p_param) override; virtual void StartTimer() override; virtual void StopTimer() override; diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index 88e4bf02..1b9e557e 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -94,7 +94,7 @@ int MxOmni::vtable0x30(char*, int, MxCore*) } // OFFSET: LEGO1 0x100aefc0 -void MxOmni::NotifyCurrentEntity(MxParam *p_param) +void MxOmni::NotifyCurrentEntity(MxNotificationParam *p_param) { } diff --git a/LEGO1/mxomni.h b/LEGO1/mxomni.h index ab07d2bd..ff7df048 100644 --- a/LEGO1/mxomni.h +++ b/LEGO1/mxomni.h @@ -10,6 +10,7 @@ class MxDSAction; class MxEventManager; class MxMusicManager; class MxNotificationManager; +class MxNotificationParam; class MxObjectFactory; class MxOmniCreateParam; class MxSoundManager; @@ -45,7 +46,7 @@ public: virtual MxBool DoesEntityExist(MxDSAction &ds); // vtable+28 virtual void vtable0x2c(); // vtable+2c virtual int vtable0x30(char*, int, MxCore*); // vtable+30 - virtual void NotifyCurrentEntity(MxParam *p_param); // vtable+34 + virtual void NotifyCurrentEntity(MxNotificationParam *p_param); // vtable+34 virtual void StartTimer(); // vtable+38 virtual void StopTimer(); // vtable+3c virtual MxBool IsTimerRunning(); //vtable+40