mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
implement NotifyEntity (#550)
* implement NotifyEntity * Fix/match * Rename * Fix style --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -125,6 +125,7 @@ public:
|
|||||||
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
||||||
MxDSAction& GetCurrentAction() { return m_action; }
|
MxDSAction& GetCurrentAction() { return m_action; }
|
||||||
LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; }
|
LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; }
|
||||||
|
LegoWorldList* GetWorldList() { return m_worldList; }
|
||||||
|
|
||||||
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
||||||
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||||
|
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
#include "legoworldlist.h"
|
||||||
#include "mxdsaction.h"
|
#include "mxdsaction.h"
|
||||||
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
#include "mxstreamer.h"
|
#include "mxstreamer.h"
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
@@ -128,9 +130,35 @@ MxBool CheckIfEntityExists(MxBool p_enable, const char* p_filename, MxS32 p_enti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003e700
|
// FUNCTION: LEGO1 0x1003e700
|
||||||
void NotifyEntity(const char* p_filename, MxS32 p_entityId, LegoEntity* p_sender)
|
void NotifyEntity(const char* p_filename, MxS32 p_entityId, LegoEntity* p_sender)
|
||||||
{
|
{
|
||||||
|
MxAtomId atom(p_filename, e_lowerCase2);
|
||||||
|
LegoEntity* entity = FindWorld(atom, p_entityId);
|
||||||
|
|
||||||
|
if (entity == NULL) {
|
||||||
|
LegoWorldListCursor cursor(Lego()->GetWorldList());
|
||||||
|
LegoWorld* world;
|
||||||
|
|
||||||
|
while (cursor.Next(world)) {
|
||||||
|
entity = (LegoEntity*) world->Find(atom, p_entityId);
|
||||||
|
|
||||||
|
if (entity != NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity != NULL) {
|
||||||
|
#ifdef COMPAT_MODE
|
||||||
|
{
|
||||||
|
MxNotificationParam param(c_notificationType0, p_sender);
|
||||||
|
NotificationManager()->Send(entity, ¶m);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
NotificationManager()->Send(entity, &MxNotificationParam(c_notificationType0, p_sender));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003eae0
|
// FUNCTION: LEGO1 0x1003eae0
|
||||||
|
Reference in New Issue
Block a user