aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-29 09:00:08 +0000
committerFilippos Karapetis2010-06-29 09:00:08 +0000
commit9f1320d5cc1d0892e0b3ea9812b6599125bd1c65 (patch)
tree5817eb4bc245a9b673c2452cb2a9fe9173f1fa29 /engines/sci/engine
parent5e030bebcc8e1a1cf918559c729039fc50a470e7 (diff)
downloadscummvm-rg350-9f1320d5cc1d0892e0b3ea9812b6599125bd1c65.tar.gz
scummvm-rg350-9f1320d5cc1d0892e0b3ea9812b6599125bd1c65.tar.bz2
scummvm-rg350-9f1320d5cc1d0892e0b3ea9812b6599125bd1c65.zip
SCI: Made the SoundCommandParser a member of the SciEngine class and removed it from the EngineState, since it's static throughout the course of a game
svn-id: r50484
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kevent.cpp2
-rw-r--r--engines/sci/engine/ksound.cpp2
-rw-r--r--engines/sci/engine/savegame.cpp4
-rw-r--r--engines/sci/engine/state.cpp1
-rw-r--r--engines/sci/engine/state.h1
5 files changed, 4 insertions, 6 deletions
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index e38550adee..bc8ddc34fc 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -156,7 +156,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
// like SCI01 and later do with cmdUpdateSoundCues. kGetEvent is called
// quite often, so emulate the SCI01 behavior of cmdUpdateSoundCues with
// this call
- s->_soundCmd->updateSci0Cues();
+ g_sci->_soundCmd->updateSci0Cues();
}
#endif
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 0172b005ac..3d8869e89e 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -39,7 +39,7 @@ namespace Sci {
* Used for synthesized music playback
*/
reg_t kDoSound(EngineState *s, int argc, reg_t *argv) {
- return s->_soundCmd->parseCommand(argc, argv, s->r_acc);
+ return g_sci->_soundCmd->parseCommand(argc, argv, s->r_acc);
}
reg_t kDoCdAudio(EngineState *s, int argc, reg_t *argv) {
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 7804265d0d..bf7b88b699 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -385,7 +385,7 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) {
#ifdef USE_OLD_MUSIC_FUNCTIONS
sync_songlib(s, _sound._songlib);
#else
- _soundCmd->syncPlayList(s);
+ g_sci->_soundCmd->syncPlayList(s);
#endif
}
@@ -978,7 +978,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
s->_sound._suspended = s->_sound._suspended;
reconstruct_sounds(s);
#else
- s->_soundCmd->reconstructPlayList(meta.savegame_version);
+ g_sci->_soundCmd->reconstructPlayList(meta.savegame_version);
#endif
// Message state:
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 9bd8f380a1..f13a44e704 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -87,7 +87,6 @@ void EngineState::reset(bool isRestoring) {
if (!isRestoring) {
_memorySegmentSize = 0;
- _soundCmd = 0;
_fileHandles.resize(5);
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 2fcad5b2e4..07843a68e3 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -109,7 +109,6 @@ public:
SfxState _sound; /**< sound subsystem */
int sfx_init_flags; /**< flags the sfx subsystem was initialised with */
#endif
- SoundCommandParser *_soundCmd;
uint32 gameStartTime; /**< The time at which the interpreter was started */
uint32 lastWaitTime; /**< The last time the game invoked Wait() */