From 4cbe4ede66e65ec9289811eca2f5f62285174c8d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 16 May 2011 16:35:10 +0200 Subject: 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. --- engines/draci/draci.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'engines/draci') 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 { -- cgit v1.2.3