HDB: Reduce header dependency

This commit is contained in:
Eugene Sandulenko 2019-07-24 13:59:22 +02:00
parent 951943ecec
commit e0b0d85f5b
7 changed files with 20 additions and 14 deletions

View File

@ -23,6 +23,7 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "graphics/thumbnail.h"
#include "hdb/hdb.h"

View File

@ -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();

View File

@ -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"

View File

@ -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"

View File

@ -20,6 +20,8 @@
*
*/
#include "graphics/thumbnail.h"
#include "hdb/hdb.h"
#include "hdb/ai.h"
#include "hdb/gfx.h"

View File

@ -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;

View File

@ -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);