diff options
Diffstat (limited to 'engines/lure/hotspots.cpp')
-rw-r--r-- | engines/lure/hotspots.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 5231c9217f..b5ec00fdf9 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -38,6 +38,7 @@ #include "lure/sound.h" #include "lure/lure.h" #include "common/endian.h" +#include "common/EventRecorder.h" namespace Lure { @@ -600,7 +601,7 @@ void Hotspot::setRandomDest() { Common::RandomSource rnd; int16 xp, yp; - g_system->getEventManager()->registerRandomSource(rnd, "lureHotspots"); + g_eventRec.registerRandomSource(rnd, "lureHotspots"); if (currentActions().isEmpty()) currentActions().addFront(START_WALKING, roomNumber()); @@ -3147,7 +3148,7 @@ void HotspotTickHandlers::followerAnimHandler(Hotspot &h) { Common::RandomSource rnd; RandomActionType actionType; uint16 scheduleId; - g_system->getEventManager()->registerRandomSource(rnd, "lureHotspots"); + g_eventRec.registerRandomSource(rnd, "lureHotspots"); int actionIndex = rnd.getRandomNumber(set->numActions() - 1); set->getEntry(actionIndex, actionType, scheduleId); @@ -3337,7 +3338,7 @@ void HotspotTickHandlers::prisonerAnimHandler(Hotspot &h) { ValueTableData &fields = Resources::getReference().fieldList(); Common::RandomSource rnd; - g_system->getEventManager()->registerRandomSource(rnd, "lureHotspots"); + g_eventRec.registerRandomSource(rnd, "lureHotspots"); h.handleTalkDialog(); if (h.frameCtr() > 0) { @@ -3380,7 +3381,7 @@ void HotspotTickHandlers::morkusAnimHandler(Hotspot &h) { if (h.executeScript()) { // Script is done - set new script to one of two alternates randomly Common::RandomSource rnd; - g_system->getEventManager()->registerRandomSource(rnd, "lureHotspots"); + g_eventRec.registerRandomSource(rnd, "lureHotspots"); h.setHotspotScript(rnd.getRandomNumber(100) >= 50 ? 0x54 : 0); h.setFrameCtr(20 + rnd.getRandomNumber(63)); @@ -3680,7 +3681,7 @@ void HotspotTickHandlers::barmanAnimHandler(Hotspot &h) { Common::RandomSource rnd; static bool ewanXOffset = false; - g_system->getEventManager()->registerRandomSource(rnd, "lureHotspots"); + g_eventRec.registerRandomSource(rnd, "lureHotspots"); h.handleTalkDialog(); if (h.delayCtr() > 0) { |