diff --git a/engines/hdb/detection.cpp b/engines/hdb/detection.cpp index b0895aae2d3..3a4a45e6e92 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 f26b558002a..c2c9f51fde7 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 6474d5e3f0f..680d89101c4 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 68d1f3c0d2a..64cf0401a5c 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 02a0fcaeb23..d53404b075b 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 97805e1725b..d1a73e06ed8 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 c5350af4433..a5a23fdd699 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);