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/gob | |
| 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/gob')
| -rw-r--r-- | engines/gob/gob.cpp | 5 | ||||
| -rw-r--r-- | engines/gob/sound/bgatmosphere.cpp | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 7e8f77f703..ea7e329480 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -21,7 +21,6 @@ */ #include "common/debug-channels.h" -#include "common/EventRecorder.h" #include "backends/audiocd/audiocd.h" #include "base/plugins.h" @@ -110,7 +109,7 @@ void PauseDialog::handleKeyDown(Common::KeyState state) { } -GobEngine::GobEngine(OSystem *syst) : Engine(syst) { +GobEngine::GobEngine(OSystem *syst) : Engine(syst), _rnd("gob") { _sound = 0; _mult = 0; _game = 0; _global = 0; _dataIO = 0; _goblin = 0; _vidPlayer = 0; _init = 0; _inter = 0; @@ -145,8 +144,6 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) { DebugMan.addDebugChannel(kDebugVideo, "Video", "IMD/VMD video debug level"); DebugMan.addDebugChannel(kDebugHotspots, "Hotspots", "Hotspots debug level"); DebugMan.addDebugChannel(kDebugDemo, "Demo", "Demo script debug level"); - - g_eventRec.registerRandomSource(_rnd, "gob"); } GobEngine::~GobEngine() { diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp index e2498242d6..daba72b2d5 100644 --- a/engines/gob/sound/bgatmosphere.cpp +++ b/engines/gob/sound/bgatmosphere.cpp @@ -20,7 +20,7 @@ * */ -#include "common/EventRecorder.h" +#include "common/array.h" #include "gob/sound/bgatmosphere.h" #include "gob/sound/sounddesc.h" @@ -28,14 +28,12 @@ namespace Gob { BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : - SoundMixer(mixer, Audio::Mixer::kMusicSoundType) { + SoundMixer(mixer, Audio::Mixer::kMusicSoundType), _rnd("gobBA") { _playMode = kPlayModeLinear; _queuePos = -1; _shaded = false; _shadable = true; - - g_eventRec.registerRandomSource(_rnd, "gobBA"); } BackgroundAtmosphere::~BackgroundAtmosphere() { |
