aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sfx/music.cpp8
-rw-r--r--engines/sci/sfx/music.h2
-rw-r--r--engines/sci/sfx/soundcmd.cpp2
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