aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMax Horn2011-05-16 16:35:10 +0200
committerMax Horn2011-05-17 12:17:26 +0200
commit4cbe4ede66e65ec9289811eca2f5f62285174c8d (patch)
tree19e97e1d96797a2e063786e5f7f9c3e4ebb71d93 /engines/mohawk
parent305c13a4aac6074ac734f77dad708e0aca86bbd7 (diff)
downloadscummvm-rg350-4cbe4ede66e65ec9289811eca2f5f62285174c8d.tar.gz
scummvm-rg350-4cbe4ede66e65ec9289811eca2f5f62285174c8d.tar.bz2
scummvm-rg350-4cbe4ede66e65ec9289811eca2f5f62285174c8d.zip
COMMON: Registers RandomSources in constructor with the event recorder
This also removes the dependency of engines on the event recorder header and API, and will make it easier to RandomSources that are not properly registered.
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/cstime.cpp5
-rw-r--r--engines/mohawk/livingbooks.cpp5
-rw-r--r--engines/mohawk/riven.cpp5
3 files changed, 6 insertions, 9 deletions
diff --git a/engines/mohawk/cstime.cpp b/engines/mohawk/cstime.cpp
index 0bc480ec24..59bc5ad661 100644
--- a/engines/mohawk/cstime.cpp
+++ b/engines/mohawk/cstime.cpp
@@ -32,15 +32,14 @@
#include "common/config-manager.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/fs.h"
#include "common/textconsole.h"
+#include "common/system.h"
namespace Mohawk {
MohawkEngine_CSTime::MohawkEngine_CSTime(OSystem *syst, const MohawkGameDescription *gamedesc) : MohawkEngine(syst, gamedesc) {
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "cstime");
+ _rnd = new Common::RandomSource("cstime");
// If the user just copied the CD contents, the fonts are in a subdirectory.
const Common::FSNode gameDataDir(ConfMan.get("path"));
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 36d86fb747..a4e7f0349c 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -28,10 +28,10 @@
#include "common/config-manager.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/fs.h"
#include "common/archive.h"
#include "common/textconsole.h"
+#include "common/system.h"
#include "graphics/palette.h"
@@ -125,8 +125,7 @@ MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGa
_alreadyShowedIntro = false;
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "livingbooks");
+ _rnd = new Common::RandomSource("livingbooks");
_page = NULL;
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 417a5b5f74..f407e650f6 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -22,9 +22,9 @@
#include "common/config-manager.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/translation.h"
+#include "common/system.h"
#include "mohawk/cursors.h"
#include "mohawk/graphics.h"
@@ -118,8 +118,7 @@ Common::Error MohawkEngine_Riven::run() {
_optionsDialog = new RivenOptionsDialog(this);
_scriptMan = new RivenScriptManager(this);
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "riven");
+ _rnd = new Common::RandomSource("riven");
// Create the cursor manager
if (Common::File::exists("rivendmo.exe"))