aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/draci.cpp
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/draci/draci.cpp
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/draci/draci.cpp')
-rw-r--r--engines/draci/draci.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 41950aca4a..cdc91e8d9f 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -27,7 +27,6 @@
#include "common/events.h"
#include "common/file.h"
#include "common/keyboard.h"
-#include "common/EventRecorder.h"
#include "engines/util.h"
@@ -71,7 +70,8 @@ const uint kSoundsFrequency = 13000;
const uint kDubbingFrequency = 22050;
DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
- : Engine(syst) {
+ : Engine(syst), _rnd("draci") {
+
// Put your engine in a sane state, but do nothing big yet;
// in particular, do not load data from files; rather, if you
// need to do such things, do them from init().
@@ -92,9 +92,6 @@ DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
DebugMan.addDebugChannel(kDraciWalkingDebugLevel, "walking", "Walking debug info");
_console = new DraciConsole(this);
-
- // Don't forget to register your random source
- g_eventRec.registerRandomSource(_rnd, "draci");
}
bool DraciEngine::hasFeature(EngineFeature f) const {