diff options
author | Ori Avtalion | 2016-04-14 17:18:33 +0300 |
---|---|---|
committer | Ori Avtalion | 2016-04-14 17:18:33 +0300 |
commit | 064df1ff2761dea322c805b45c3b356067114799 (patch) | |
tree | 8528c400c91486efed51136d51b8b5a255907fc4 /engines | |
parent | 5e4980090198a334b136bcdce16ea6addbe708a2 (diff) | |
download | scummvm-rg350-064df1ff2761dea322c805b45c3b356067114799.tar.gz scummvm-rg350-064df1ff2761dea322c805b45c3b356067114799.tar.bz2 scummvm-rg350-064df1ff2761dea322c805b45c3b356067114799.zip |
GOB: Reduce audio header dependencies
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/gob.cpp | 1 | ||||
-rw-r--r-- | engines/gob/inter_playtoons.cpp | 1 | ||||
-rw-r--r-- | engines/gob/inter_v4.cpp | 2 | ||||
-rw-r--r-- | engines/gob/pregob/onceupon/onceupon.cpp | 2 | ||||
-rw-r--r-- | engines/gob/pregob/pregob.h | 4 | ||||
-rw-r--r-- | engines/gob/sound/bgatmosphere.cpp | 9 | ||||
-rw-r--r-- | engines/gob/sound/bgatmosphere.h | 10 | ||||
-rw-r--r-- | engines/gob/sound/sound.cpp | 3 | ||||
-rw-r--r-- | engines/gob/sound/sound.h | 10 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 2 | ||||
-rw-r--r-- | engines/gob/videoplayer.h | 5 |
11 files changed, 28 insertions, 21 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index d995f26d9f..b51a6382e6 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -26,6 +26,7 @@ #include "base/plugins.h" #include "common/config-manager.h" #include "audio/mididrv.h" +#include "audio/mixer.h" #include "gui/gui-manager.h" #include "gui/dialog.h" diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index 45f573efcd..13d24dc05d 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -41,7 +41,6 @@ #include "gob/video.h" #include "gob/videoplayer.h" #include "gob/save/saveload.h" -#include "gob/sound/sound.h" namespace Gob { diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 656ca6f5c3..d379d5ab11 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -205,7 +205,7 @@ void Inter_v4::o4_playVmdOrMusic() { return; } else if (props.lastFrame == -9) { _vm->_sound->bgStop(); - _vm->_sound->bgSetPlayMode(BackgroundAtmosphere::kPlayModeRandom); + _vm->_sound->bgSetPlayMode(Sound::kPlayModeRandom); _vm->_sound->bgPlay(file.c_str(), "SND", SOUND_SND, props.palStart); return; } else if (props.lastFrame < 0) { diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index a6e4da75e7..50910e77bd 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -30,8 +30,6 @@ #include "gob/anifile.h" #include "gob/aniobject.h" -#include "gob/sound/sound.h" - #include "gob/pregob/txtfile.h" #include "gob/pregob/gctfile.h" diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 021cf2b3d6..108771a63a 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -29,14 +29,14 @@ #include "gob/util.h" #include "gob/aniobject.h" -#include "gob/sound/sounddesc.h" - #include "gob/pregob/txtfile.h" namespace Gob { class GobEngine; +class ANIFile; class Surface; +class SoundDesc; class GCTFile; diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp index 21fb70278a..c7be1be96a 100644 --- a/engines/gob/sound/bgatmosphere.cpp +++ b/engines/gob/sound/bgatmosphere.cpp @@ -23,6 +23,7 @@ #include "common/array.h" #include "gob/sound/bgatmosphere.h" +#include "gob/sound/sound.h" #include "gob/sound/sounddesc.h" namespace Gob { @@ -30,7 +31,7 @@ namespace Gob { BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : SoundMixer(mixer, Audio::Mixer::kMusicSoundType), _rnd("gobBA") { - _playMode = kPlayModeLinear; + _playMode = Sound::kPlayModeLinear; _queuePos = -1; _shaded = false; _shadable = true; @@ -56,7 +57,7 @@ void BackgroundAtmosphere::stopBA() { SoundMixer::stop(0); } -void BackgroundAtmosphere::setPlayMode(PlayMode mode) { +void BackgroundAtmosphere::setPlayMode(Sound::BackgroundPlayMode mode) { _playMode = mode; } @@ -100,11 +101,11 @@ void BackgroundAtmosphere::getNextQueuePos() { switch (_playMode) { - case kPlayModeLinear: + case Sound::kPlayModeLinear: _queuePos = (_queuePos + 1) % _queue.size(); break; - case kPlayModeRandom: + case Sound::kPlayModeRandom: _queuePos = _rnd.getRandomNumber(_queue.size() - 1); break; diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h index c838a2c2bb..138b65a1c1 100644 --- a/engines/gob/sound/bgatmosphere.h +++ b/engines/gob/sound/bgatmosphere.h @@ -27,6 +27,7 @@ #include "common/mutex.h" #include "common/random.h" +#include "gob/sound/sound.h" #include "gob/sound/soundmixer.h" namespace Audio { @@ -39,18 +40,13 @@ class SoundDesc; class BackgroundAtmosphere : private SoundMixer { public: - enum PlayMode { - kPlayModeLinear, - kPlayModeRandom - }; - BackgroundAtmosphere(Audio::Mixer &mixer); ~BackgroundAtmosphere(); void playBA(); void stopBA(); - void setPlayMode(PlayMode mode); + void setPlayMode(Sound::BackgroundPlayMode mode); void queueSample(SoundDesc &sndDesc); void queueClear(); @@ -60,7 +56,7 @@ public: void unshade(); private: - PlayMode _playMode; + Sound::BackgroundPlayMode _playMode; Common::Array<SoundDesc *> _queue; int _queuePos; diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 22dfe9d3c3..000eafa031 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -28,6 +28,7 @@ #include "gob/game.h" #include "gob/inter.h" +#include "gob/sound/bgatmosphere.h" #include "gob/sound/pcspeaker.h" #include "gob/sound/soundblaster.h" #include "gob/sound/adlplayer.h" @@ -717,7 +718,7 @@ void Sound::bgStop() { _bgatmos->queueClear(); } -void Sound::bgSetPlayMode(BackgroundAtmosphere::PlayMode mode) { +void Sound::bgSetPlayMode(Sound::BackgroundPlayMode mode) { if (!_bgatmos) return; diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 6ebc323b18..f1fd46d24b 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -23,12 +23,13 @@ #ifndef GOB_SOUND_SOUND_H #define GOB_SOUND_SOUND_H +#include "common/str.h" #include "gob/sound/sounddesc.h" -#include "gob/sound/bgatmosphere.h" namespace Gob { class GobEngine; +class BackgroundAtmosphere; class PCSpeaker; class SoundBlaster; class ADLPlayer; @@ -39,6 +40,11 @@ class CDROM; class Sound { public: + enum BackgroundPlayMode { + kPlayModeLinear, + kPlayModeRandom + }; + static const int kSoundsCount = 60; Sound(GobEngine *vm); @@ -135,7 +141,7 @@ public: void bgPlay(const char *base, const char *ext, SoundType type, int count); void bgStop(); - void bgSetPlayMode(BackgroundAtmosphere::PlayMode mode); + void bgSetPlayMode(BackgroundPlayMode mode); void bgShade(); void bgUnshade(); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index e97848d27e..bbf4ef4162 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -21,6 +21,8 @@ */ +#include "video/coktel_decoder.h" + #include "gob/videoplayer.h" #include "gob/global.h" #include "gob/dataio.h" diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index 02ed510ec5..1c39ecf2fa 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -29,11 +29,14 @@ #include "common/str.h" #include "graphics/surface.h" -#include "video/coktel_decoder.h" #include "gob/util.h" #include "gob/draw.h" +namespace Video { +class CoktelDecoder; +} + namespace Gob { class GobEngine; |