aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-24 13:59:22 +0200
committerEugene Sandulenko2019-09-03 17:17:28 +0200
commite0b0d85f5b1c02136cf834b7eec181901faf2fc6 (patch)
tree34fe79c9c04360ec18f194ec0673593e62466e7a /engines
parent951943ececf0b2c27c19adbd6b60c020eee6d13a (diff)
downloadscummvm-rg350-e0b0d85f5b1c02136cf834b7eec181901faf2fc6.tar.gz
scummvm-rg350-e0b0d85f5b1c02136cf834b7eec181901faf2fc6.tar.bz2
scummvm-rg350-e0b0d85f5b1c02136cf834b7eec181901faf2fc6.zip
HDB: Reduce header dependency
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/detection.cpp1
-rw-r--r--engines/hdb/hdb.cpp8
-rw-r--r--engines/hdb/hdb.h8
-rw-r--r--engines/hdb/menu.cpp2
-rw-r--r--engines/hdb/saveload.cpp2
-rw-r--r--engines/hdb/sound.cpp11
-rw-r--r--engines/hdb/sound.h2
7 files changed, 20 insertions, 14 deletions
diff --git a/engines/hdb/detection.cpp b/engines/hdb/detection.cpp
index b0895aae2d..3a4a45e6e9 100644
--- a/engines/hdb/detection.cpp
+++ b/engines/hdb/detection.cpp
@@ -23,6 +23,7 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
+#include "graphics/thumbnail.h"
#include "hdb/hdb.h"
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index f26b558002..c2c9f51fde 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "common/config-manager.h"
#include "common/random.h"
#include "hdb/hdb.h"
@@ -853,12 +854,7 @@ Common::Error HDBGame::run() {
// Initializes Graphics
initGraphics(kScreenWidth, kScreenHeight, &_format);
-#ifdef USE_MAD
- Common::SeekableReadStream *soundStream = _fileMan->findFirstData("M00_AIRLOCK_01_MP3", TYPE_BINARY);
- Audio::SeekableAudioStream *audioStream = Audio::makeMP3Stream(soundStream, DisposeAfterUse::YES);
- Audio::SoundHandle *handle = new Audio::SoundHandle();
- g_hdb->_mixer->playStream(Audio::Mixer::kPlainSoundType, handle, audioStream);
-#endif
+ _sound->test();
start();
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 6474d5e3f0..680d89101c 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -25,15 +25,7 @@
#include "common/scummsys.h"
#include "common/system.h"
-//#include "common/array.h"
-//#include "common/events.h"
-//#include "common/str.h"
-//#include "common/random.h"
#include "common/savefile.h"
-#include "common/config-manager.h"
-#include "graphics/surface.h"
-#include "graphics/thumbnail.h"
-#include "audio/mixer.h"
#include "audio/audiostream.h"
#include "audio/decoders/wave.h"
#include "audio/decoders/mp3.h"
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index 68d1f3c0d2..64cf0401a5 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -20,7 +20,9 @@
*
*/
+#include "common/config-manager.h"
#include "common/random.h"
+#include "graphics/thumbnail.h"
#include "hdb/hdb.h"
#include "hdb/ai.h"
diff --git a/engines/hdb/saveload.cpp b/engines/hdb/saveload.cpp
index 02a0fcaeb2..d53404b075 100644
--- a/engines/hdb/saveload.cpp
+++ b/engines/hdb/saveload.cpp
@@ -20,6 +20,8 @@
*
*/
+#include "graphics/thumbnail.h"
+
#include "hdb/hdb.h"
#include "hdb/ai.h"
#include "hdb/gfx.h"
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp
index 97805e1725..d1a73e06ed 100644
--- a/engines/hdb/sound.cpp
+++ b/engines/hdb/sound.cpp
@@ -21,8 +21,10 @@
*/
#include "common/debug.h"
+#include "audio/mixer.h"
#include "hdb/hdb.h"
+#include "hdb/file-manager.h"
#include "hdb/mpc.h"
#include "hdb/sound.h"
@@ -1387,6 +1389,15 @@ const SoundLookUp soundList[] = {
{LAST_SOUND, NULL, NULL}
};
+void Sound::test() {
+ #ifdef USE_MAD
+ Common::SeekableReadStream *soundStream = g_hdb->_fileMan->findFirstData("M00_AIRLOCK_01_MP3", TYPE_BINARY);
+ Audio::SeekableAudioStream *audioStream = Audio::makeMP3Stream(soundStream, DisposeAfterUse::YES);
+ Audio::SoundHandle *handle = new Audio::SoundHandle();
+ g_hdb->_mixer->playStream(Audio::Mixer::kPlainSoundType, handle, audioStream);
+ #endif
+}
+
bool Sound::init() {
warning("STUB: Sound::init()");
return true;
diff --git a/engines/hdb/sound.h b/engines/hdb/sound.h
index c5350af443..a5a23fdd69 100644
--- a/engines/hdb/sound.h
+++ b/engines/hdb/sound.h
@@ -1411,6 +1411,8 @@ struct SoundLookUp {
class Sound {
public:
+ void test(); // FIXME. Remove
+
bool init();
void save(Common::OutSaveFile *out);
void loadSaveFile(Common::InSaveFile *in);