aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-20 11:17:33 +0000
committerMartin Kiewitz2010-07-20 11:17:33 +0000
commita24de29358a94941190044aaadaf3d2003486888 (patch)
treec0f8db603d6fe11f151132299691350357ba7370 /engines
parent35e2c78626b9196bd3c059780e273dd0044c1c26 (diff)
downloadscummvm-rg350-a24de29358a94941190044aaadaf3d2003486888.tar.gz
scummvm-rg350-a24de29358a94941190044aaadaf3d2003486888.tar.bz2
scummvm-rg350-a24de29358a94941190044aaadaf3d2003486888.zip
SCI: renaming kDoSound(resume) to resumeAfterRestore
kDoSound(resumeAfterRestore) is called right after restoring a saved game for sound-sci0 games, we already resume playing music inside restore, so we don't need to implement this at all svn-id: r51058
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/kernel.h2
-rw-r--r--engines/sci/engine/ksound.cpp2
-rw-r--r--engines/sci/sound/soundcmd.cpp17
-rw-r--r--engines/sci/sound/soundcmd.h2
5 files changed, 7 insertions, 18 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 189f6c2000..5f919fee62 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -337,7 +337,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
{ SIG_SOUNDSCI0, 4, MAP_CALL(DoSoundMute), "(i)", NULL },
{ SIG_SOUNDSCI0, 5, MAP_CALL(DoSoundStop), "o", NULL },
{ SIG_SOUNDSCI0, 6, MAP_CALL(DoSoundPause), "i", NULL },
- { SIG_SOUNDSCI0, 7, MAP_CALL(DoSoundResume), "", NULL },
+ { SIG_SOUNDSCI0, 7, MAP_CALL(DoSoundResumeAfterRestore), "", NULL },
{ SIG_SOUNDSCI0, 8, MAP_CALL(DoSoundMasterVolume), "(i)", NULL },
{ SIG_SOUNDSCI0, 9, MAP_CALL(DoSoundUpdate), "o", NULL },
{ SIG_SOUNDSCI0, 10, MAP_CALL(DoSoundFade), "o", NULL },
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 81106625bf..53b0dcb68e 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -475,7 +475,7 @@ reg_t kDoSoundMute(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundStop(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundStopAll(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundPause(EngineState *s, int argc, reg_t *argv);
-reg_t kDoSoundResume(EngineState *s, int argc, reg_t *argv);
+reg_t kDoSoundResumeAfterRestore(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundMasterVolume(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundUpdate(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundFade(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 69ae68674b..4e5ddc5e96 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -54,7 +54,7 @@ CREATE_DOSOUND_FORWARD(DoSoundMute)
CREATE_DOSOUND_FORWARD(DoSoundStop)
CREATE_DOSOUND_FORWARD(DoSoundStopAll)
CREATE_DOSOUND_FORWARD(DoSoundPause)
-CREATE_DOSOUND_FORWARD(DoSoundResume)
+CREATE_DOSOUND_FORWARD(DoSoundResumeAfterRestore)
CREATE_DOSOUND_FORWARD(DoSoundMasterVolume)
CREATE_DOSOUND_FORWARD(DoSoundUpdate)
CREATE_DOSOUND_FORWARD(DoSoundFade)
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 8e750def4a..8fa60e357b 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -250,20 +250,9 @@ reg_t SoundCommandParser::kDoSoundPause(int argc, reg_t *argv, reg_t acc) {
}
// SCI0 only command
-reg_t SoundCommandParser::kDoSoundResume(int argc, reg_t *argv, reg_t acc) {
- // this doesn't seem to do what we think it's doing
- // it's called with no arguments at all (just restore a game in qfg1)
- return acc;
- reg_t obj = argv[0];
-
- MusicEntry *musicSlot = _music->getSlot(obj);
- if (!musicSlot) {
- warning("kDoSound(resume):: Slot not found (%04x:%04x)", PRINT_REG(obj));
- return acc;
- }
-
- writeSelectorValue(_segMan, musicSlot->soundObj, SELECTOR(state), kSoundPlaying);
- _music->soundResume(musicSlot);
+// It's called right after restoring a game - it's responsible to kick off playing music again
+// we don't need this at all, so we don't do anything here
+reg_t SoundCommandParser::kDoSoundResumeAfterRestore(int argc, reg_t *argv, reg_t acc) {
return acc;
}
diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h
index a8bc1eb280..10915e8ea9 100644
--- a/engines/sci/sound/soundcmd.h
+++ b/engines/sci/sound/soundcmd.h
@@ -85,7 +85,7 @@ public:
reg_t kDoSoundDummy(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundMute(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundPause(int argc, reg_t *argv, reg_t acc);
- reg_t kDoSoundResume(int argc, reg_t *argv, reg_t acc);
+ reg_t kDoSoundResumeAfterRestore(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundStop(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundStopAll(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundDispose(int argc, reg_t *argv, reg_t acc);