diff options
author | Filippos Karapetis | 2009-12-31 08:55:13 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-31 08:55:13 +0000 |
commit | 43f349f4875aabde66414a3b3ba83803b0467a4a (patch) | |
tree | 8a0749da9ad79e38cd47ba0b30393d4c5220f02d | |
parent | 54245f712d18860c1454d4d1b3878bad77d43728 (diff) | |
download | scummvm-rg350-43f349f4875aabde66414a3b3ba83803b0467a4a.tar.gz scummvm-rg350-43f349f4875aabde66414a3b3ba83803b0467a4a.tar.bz2 scummvm-rg350-43f349f4875aabde66414a3b3ba83803b0467a4a.zip |
SCI/new music code: removed some hacks
svn-id: r46793
-rw-r--r-- | engines/sci/sfx/music.cpp | 8 | ||||
-rw-r--r-- | engines/sci/sfx/music.h | 2 | ||||
-rw-r--r-- | engines/sci/sfx/soundcmd.cpp | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp index 5223b87a9f..faf674406c 100644 --- a/engines/sci/sfx/music.cpp +++ b/engines/sci/sfx/music.cpp @@ -37,15 +37,13 @@ namespace Sci { -SciMusic::SciMusic(SciVersion soundVersion) - : _soundVersion(soundVersion), _soundOn(true), _inCriticalSection(false) { +SciMusic::SciMusic(ResourceManager *resMan, SegManager *segMan, SciVersion soundVersion) + : _resMan(resMan), _segMan(segMan), _soundVersion(soundVersion), + _soundOn(true), _inCriticalSection(false) { // Reserve some space in the playlist, to avoid expensive insertion // operations _playList.reserve(10); - - _segMan = ((SciEngine *)g_engine)->getEngineState()->_segMan; // HACK - _resMan = ((SciEngine *)g_engine)->getEngineState()->resMan; // HACK } SciMusic::~SciMusic() { diff --git a/engines/sci/sfx/music.h b/engines/sci/sfx/music.h index eab1c7aff9..fb047cd14f 100644 --- a/engines/sci/sfx/music.h +++ b/engines/sci/sfx/music.h @@ -112,7 +112,7 @@ class SciMusic { public: - SciMusic(SciVersion soundVersion); + SciMusic(ResourceManager *resMan, SegManager *segMan, SciVersion soundVersion); ~SciMusic(); void init(); diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp index 15067e7270..e5647d77e9 100644 --- a/engines/sci/sfx/soundcmd.cpp +++ b/engines/sci/sfx/soundcmd.cpp @@ -134,7 +134,7 @@ SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segM #endif #ifndef USE_OLD_MUSIC_FUNCTIONS - _music = new SciMusic(_soundVersion); + _music = new SciMusic(_resMan, _segMan, _soundVersion); _music->init(); #endif |