aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi.cpp3
-rw-r--r--engines/agos/agos.cpp3
-rw-r--r--engines/cine/cine.cpp3
-rw-r--r--engines/cruise/cruise.cpp3
-rw-r--r--engines/drascula/drascula.cpp3
-rw-r--r--engines/gob/gob.cpp3
-rw-r--r--engines/gob/sound/bgatmosphere.cpp3
-rw-r--r--engines/groovie/script.cpp3
-rw-r--r--engines/kyra/kyra_v1.cpp3
-rw-r--r--engines/kyra/sprites.cpp4
-rw-r--r--engines/lure/hotspots.cpp11
-rw-r--r--engines/lure/res.cpp3
-rw-r--r--engines/lure/scripts.cpp3
-rw-r--r--engines/m4/m4.cpp3
-rw-r--r--engines/made/made.cpp3
-rw-r--r--engines/parallaction/parallaction.cpp3
-rw-r--r--engines/queen/display.cpp3
-rw-r--r--engines/queen/music.cpp3
-rw-r--r--engines/queen/queen.cpp3
-rw-r--r--engines/saga/saga.cpp3
-rw-r--r--engines/scumm/scumm.cpp3
-rw-r--r--engines/sky/logic.cpp3
-rw-r--r--engines/sword1/logic.cpp3
-rw-r--r--engines/sword1/sound.cpp3
-rw-r--r--engines/sword2/sword2.cpp3
-rw-r--r--engines/tinsel/tinsel.cpp3
-rw-r--r--engines/touche/touche.cpp3
27 files changed, 59 insertions, 31 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 9b6c293b94..69b27e10f9 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -25,6 +25,7 @@
#include "common/md5.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/savefile.h"
#include "common/config-manager.h"
@@ -515,7 +516,7 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
parseFeatures();
_rnd = new Common::RandomSource();
- syst->getEventManager()->registerRandomSource(*_rnd, "agi");
+ g_eventRec.registerRandomSource(*_rnd, "agi");
Common::addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");
Common::addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 9903952577..0e53698b59 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -27,6 +27,7 @@
#include "common/file.h"
#include "common/system.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "agos/debugger.h"
#include "agos/intern.h"
@@ -528,7 +529,7 @@ AGOSEngine::AGOSEngine(OSystem *syst)
File::addDefaultDirectory(_gameDataDir.getChild("speech"));
File::addDefaultDirectory(_gameDataDir.getChild("SPEECH"));
- syst->getEventManager()->registerRandomSource(_rnd, "agos");
+ g_eventRec.registerRandomSource(_rnd, "agos");
}
Common::Error AGOSEngine::init() {
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 64a9a9dfb8..aa73b3adec 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -24,6 +24,7 @@
*/
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/savefile.h"
#include "common/config-manager.h"
@@ -64,7 +65,7 @@ CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Eng
g_cine = this;
- syst->getEventManager()->registerRandomSource(_rnd, "cine");
+ g_eventRec.registerRandomSource(_rnd, "cine");
}
CineEngine::~CineEngine() {
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 3d3a44a36c..7abf83f054 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -24,6 +24,7 @@
*/
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/savefile.h"
#include "common/config-manager.h"
@@ -65,7 +66,7 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
_debugger = new Debugger();
_sound = new PCSound(_mixer, this);
- syst->getEventManager()->registerRandomSource(_rnd, "cruise");
+ g_eventRec.registerRandomSource(_rnd, "cruise");
}
CruiseEngine::~CruiseEngine() {
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index a3c56be1f4..84c2dd8073 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -24,6 +24,7 @@
*/
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/file.h"
#include "common/savefile.h"
@@ -92,7 +93,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
*textName = 0;
_rnd = new Common::RandomSource();
- syst->getEventManager()->registerRandomSource(*_rnd, "drascula");
+ g_eventRec.registerRandomSource(*_rnd, "drascula");
int cd_num = ConfMan.getInt("cdrom");
if (cd_num >= 0)
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 8e8573515f..98d421a3fb 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -129,7 +130,7 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) {
Common::addDebugChannel(kDebugHotspots, "Hotspots", "Hotspots debug level");
Common::addDebugChannel(kDebugDemo, "Demo", "Demo script debug level");
- syst->getEventManager()->registerRandomSource(_rnd, "gob");
+ g_eventRec.registerRandomSource(_rnd, "gob");
}
GobEngine::~GobEngine() {
diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp
index 6ce184155e..f0977aa45b 100644
--- a/engines/gob/sound/bgatmosphere.cpp
+++ b/engines/gob/sound/bgatmosphere.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "gob/sound/bgatmosphere.h"
#include "gob/sound/sounddesc.h"
@@ -39,7 +40,7 @@ BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) :
_shaded = false;
_shadable = true;
- g_system->getEventManager()->registerRandomSource(_rnd, "gobBA");
+ g_eventRec.registerRandomSource(_rnd, "gobBA");
}
BackgroundAtmosphere::~BackgroundAtmosphere() {
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 6c4f38c270..e3cd4fdc4e 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -33,6 +33,7 @@
#include "common/config-manager.h"
#include "common/endian.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#define NUM_OPCODES 90
@@ -73,7 +74,7 @@ Script::Script(GroovieEngine *vm, EngineVersion version) :
}
// Initialize the random source
- _vm->_system->getEventManager()->registerRandomSource(_random, "GroovieScripts");
+ g_eventRec.registerRandomSource(_random, "GroovieScripts");
// Prepare the variables
_bitflags = 0;
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 258d0c402f..d79d9a8f32 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -24,6 +24,7 @@
*/
#include "common/config-manager.h"
+#include "common/EventRecorder.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
@@ -81,7 +82,7 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
Common::addDebugChannel(kDebugLevelMovie, "Movie", "Movie debug level");
Common::addDebugChannel(kDebugLevelTimer, "Timer", "Timer debug level");
- _eventMan->registerRandomSource(_rnd, "kyra");
+ g_eventRec.registerRandomSource(_rnd, "kyra");
}
::GUI::Debugger *KyraEngine_v1::getDebugger() {
diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp
index 3cc632a391..456dcc06f3 100644
--- a/engines/kyra/sprites.cpp
+++ b/engines/kyra/sprites.cpp
@@ -28,6 +28,8 @@
#include "common/stream.h"
#include "common/util.h"
#include "common/system.h"
+#include "common/EventRecorder.h"
+
#include "kyra/screen.h"
#include "kyra/kyra_lok.h"
#include "kyra/sprites.h"
@@ -47,7 +49,7 @@ Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) {
_spriteDefStart = 0;
memset(_drawLayerTable, 0, sizeof(_drawLayerTable));
_sceneAnimatorBeaconFlag = 0;
- _vm->getEventManager()->registerRandomSource(_rnd, "kyraSprites");
+ g_eventRec.registerRandomSource(_rnd, "kyraSprites");
}
Sprites::~Sprites() {
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) {
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 95cb0a2f1b..7eb76cad32 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -30,6 +30,7 @@
#include "lure/lure.h"
#include "common/endian.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
namespace Lure {
@@ -42,7 +43,7 @@ Resources &Resources::getReference() {
}
Resources::Resources() {
- g_system->getEventManager()->registerRandomSource(_rnd, "lureResources");
+ g_eventRec.registerRandomSource(_rnd, "lureResources");
int_resources = this;
reloadData();
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 391147ebd5..f9d854a73b 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -34,6 +34,7 @@
#include "lure/sound.h"
#include "common/stack.h"
#include "common/endian.h"
+#include "common/EventRecorder.h"
namespace Lure {
@@ -739,7 +740,7 @@ void Script::addActions(uint16 hotspotId, uint16 actions, uint16 v3) {
void Script::randomToGeneral(uint16 maxVal, uint16 minVal, uint16 v3) {
Common::RandomSource rnd;
- g_system->getEventManager()->registerRandomSource(rnd, "lureScripts");
+ g_eventRec.registerRandomSource(rnd, "lureScripts");
uint16 v = minVal + rnd.getRandomNumber(maxVal - minVal);
Resources::getReference().fieldList().setField(GENERAL, v);
}
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index c27f151fdf..b4973002a6 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -53,6 +53,7 @@
#include "common/file.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/endian.h"
#include "common/system.h"
#include "common/config-manager.h"
@@ -192,7 +193,7 @@ Common::Error M4Engine::run() {
_animation = new Animation(this);
//_callbacks = new Callbacks(this);
_random = new Common::RandomSource();
- g_system->getEventManager()->registerRandomSource(*_random, "m4");
+ g_eventRec.registerRandomSource(*_random, "m4");
if (isM4())
return goM4();
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 50a14c3e34..c83f7aaf02 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -24,6 +24,7 @@
*/
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/file.h"
#include "common/savefile.h"
@@ -74,7 +75,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
_gameId = g->id;
_rnd = new Common::RandomSource();
- syst->getEventManager()->registerRandomSource(*_rnd, "made");
+ g_eventRec.registerRandomSource(*_rnd, "made");
int cd_num = ConfMan.getInt("cdrom");
if (cd_num >= 0)
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 7aee966aa6..8fadd4e462 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -25,6 +25,7 @@
#include "common/config-manager.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/util.h"
#include "common/system.h"
@@ -70,7 +71,7 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam
Common::addDebugChannel(kDebugMenu, "menu", "Menu debug level");
Common::addDebugChannel(kDebugInventory, "inventory", "Inventory debug level");
- syst->getEventManager()->registerRandomSource(_rnd, "parallaction");
+ g_eventRec.registerRandomSource(_rnd, "parallaction");
}
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index bac7c5f419..ae223ff6cf 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
+#include "common/EventRecorder.h"
#include "common/events.h"
#include "graphics/cursorman.h"
@@ -74,7 +75,7 @@ Display::Display(QueenEngine *vm, OSystem *system)
memset(&_dynalum, 0, sizeof(_dynalum));
setupInkColors();
- system->getEventManager()->registerRandomSource(_rnd, "queenDisplay");
+ g_eventRec.registerRandomSource(_rnd, "queenDisplay");
}
Display::~Display() {
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index 8a50ae6b40..3d5bfbdf73 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -25,6 +25,7 @@
#include "common/config-manager.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "queen/music.h"
#include "queen/queen.h"
@@ -84,7 +85,7 @@ MidiMusic::MidiMusic(QueenEngine *vm)
_parser->setMidiDriver(this);
_parser->setTimerRate(_driver->getBaseTempo());
- vm->getEventManager()->registerRandomSource(_rnd, "queenMusic");
+ g_eventRec.registerRandomSource(_rnd, "queenMusic");
}
MidiMusic::~MidiMusic() {
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index ec074190d3..7c351842c4 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -31,6 +31,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "queen/queen.h"
#include "queen/bankman.h"
@@ -193,7 +194,7 @@ namespace Queen {
QueenEngine::QueenEngine(OSystem *syst)
: Engine(syst), _debugger(0) {
- syst->getEventManager()->registerRandomSource(randomizer, "queen");
+ g_eventRec.registerRandomSource(randomizer, "queen");
}
QueenEngine::~QueenEngine() {
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 4acf93d030..2a2a4b993c 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -29,6 +29,7 @@
#include "common/config-manager.h"
#include "common/system.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "sound/mixer.h"
@@ -114,7 +115,7 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
Common::File::addDefaultDirectory(_gameDataDir.getChild("video"));
_displayClip.left = _displayClip.top = 0;
- syst->getEventManager()->registerRandomSource(_rnd, "saga");
+ g_eventRec.registerRandomSource(_rnd, "saga");
}
SagaEngine::~SagaEngine() {
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 3851cc7fb7..409a2ce306 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/md5.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/system.h"
#include "gui/message.h"
@@ -539,7 +540,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
for (int i = 0; i < ARRAYSIZE(debugChannels); ++i)
Common::addDebugChannel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc);
- syst->getEventManager()->registerRandomSource(_rnd, "scumm");
+ g_eventRec.registerRandomSource(_rnd, "scumm");
}
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index 991fbe19d0..5924197d96 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/rect.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/system.h"
#include "sky/autoroute.h"
@@ -73,7 +74,7 @@ void Logic::setupLogicTable() {
}
Logic::Logic(SkyCompact *skyCompact, Screen *skyScreen, Disk *skyDisk, Text *skyText, MusicBase *skyMusic, Mouse *skyMouse, Sound *skySound) {
- g_system->getEventManager()->registerRandomSource(_rnd, "sky");
+ g_eventRec.registerRandomSource(_rnd, "sky");
_skyCompact = skyCompact;
_skyScreen = skyScreen;
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index 7e911bd197..be3797b0bd 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/system.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "sword1/logic.h"
#include "sword1/text.h"
@@ -55,7 +56,7 @@ namespace Sword1 {
uint32 Logic::_scriptVars[NUM_SCRIPT_VARS];
Logic::Logic(SwordEngine *vm, ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, Audio::Mixer *mixer) {
- g_system->getEventManager()->registerRandomSource(_rnd, "sword1");
+ g_eventRec.registerRandomSource(_rnd, "sword1");
_vm = vm;
_objMan = pObjMan;
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index b23bf71445..6ad946b28d 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/system.h"
#include "sword1/sound.h"
@@ -47,7 +48,7 @@ namespace Sword1 {
#define SPEECH_FLAGS (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_LITTLE_ENDIAN)
Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan) {
- g_system->getEventManager()->registerRandomSource(_rnd, "sword1sound");
+ g_eventRec.registerRandomSource(_rnd, "sword1sound");
strcpy(_filePath, searchPath);
_mixer = mixer;
_resMan = pResMan;
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index cf44b4c99c..e368f257a2 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -33,6 +33,7 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/savefile.h"
#include "common/system.h"
@@ -305,7 +306,7 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
_gmmLoadSlot = -1; // Used to manage GMM Loading
- syst->getEventManager()->registerRandomSource(_rnd, "sword2");
+ g_eventRec.registerRandomSource(_rnd, "sword2");
}
Sword2Engine::~Sword2Engine() {
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 95541e3287..5f056351b6 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -26,6 +26,7 @@
#include "common/endian.h"
#include "common/error.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/file.h"
#include "common/savefile.h"
@@ -934,7 +935,7 @@ Common::Error TinselEngine::run() {
_screenSurface.create(320, 200, 1);
}
- g_system->getEventManager()->registerRandomSource(_random, "tinsel");
+ g_eventRec.registerRandomSource(_random, "tinsel");
_console = new Console();
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 5d79e0fb9a..1a6546cb4c 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/events.h"
+#include "common/EventRecorder.h"
#include "common/system.h"
#include "graphics/cursorman.h"
@@ -73,7 +74,7 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
Common::addDebugChannel(kDebugOpcodes, "Opcodes", "Opcodes debug level");
Common::addDebugChannel(kDebugMenu, "Menu", "Menu debug level");
- _eventMan->registerRandomSource(_rnd, "touche");
+ g_eventRec.registerRandomSource(_rnd, "touche");
}
ToucheEngine::~ToucheEngine() {