diff options
| author | Max Horn | 2011-05-16 16:35:10 +0200 |
|---|---|---|
| committer | Max Horn | 2011-05-17 12:17:26 +0200 |
| commit | 4cbe4ede66e65ec9289811eca2f5f62285174c8d (patch) | |
| tree | 19e97e1d96797a2e063786e5f7f9c3e4ebb71d93 /engines/groovie | |
| parent | 305c13a4aac6074ac734f77dad708e0aca86bbd7 (diff) | |
| download | scummvm-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/groovie')
| -rw-r--r-- | engines/groovie/script.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 080e0253b2..3bd90a042e 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -33,7 +33,7 @@ #include "common/archive.h" #include "common/config-manager.h" #include "common/debug-channels.h" -#include "common/EventRecorder.h" +#include "common/events.h" #include "common/file.h" #include "common/macresman.h" @@ -65,7 +65,8 @@ static void debugScript(int level, bool nl, const char *s, ...) { Script::Script(GroovieEngine *vm, EngineVersion version) : _code(NULL), _savedCode(NULL), _stacktop(0), _debugger(NULL), _vm(vm), - _videoFile(NULL), _videoRef(0), _staufsMove(NULL) { + _videoFile(NULL), _videoRef(0), _staufsMove(NULL), + _random("GroovieScripts") { // Initialize the opcode set depending on the engine version switch (version) { case kGroovieT7G: @@ -76,9 +77,6 @@ Script::Script(GroovieEngine *vm, EngineVersion version) : break; } - // Initialize the random source - g_eventRec.registerRandomSource(_random, "GroovieScripts"); - // Prepare the variables _bitflags = 0; for (int i = 0; i < 0x400; i++) { |
