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/toon/toon.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'engines/toon/toon.cpp') diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 471c7c2b8a..d441e59d4f 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -25,7 +25,6 @@ #include "common/debug-channels.h" #include "common/archive.h" #include "common/config-manager.h" -#include "common/EventRecorder.h" #include "common/savefile.h" #include "common/memstream.h" @@ -780,8 +779,6 @@ Common::Error ToonEngine::run() { if (!loadToonDat()) return Common::kUnknownError; - g_eventRec.registerRandomSource(_rnd, "toon"); - initGraphics(TOON_SCREEN_WIDTH, TOON_SCREEN_HEIGHT, true); init(); @@ -815,7 +812,8 @@ Common::Error ToonEngine::run() { } ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription) - : Engine(syst), _gameDescription(gameDescription), _language(gameDescription->language) { + : Engine(syst), _gameDescription(gameDescription), + _language(gameDescription->language), _rnd("toon") { _system = syst; _tickLength = 16; _currentPicture = NULL; -- cgit v1.2.3