[Scummvm-cvs-logs] SF.net SVN: scummvm:[50760] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Jul 9 18:05:48 CEST 2010
Revision: 50760
http://scummvm.svn.sourceforge.net/scummvm/?rev=50760&view=rev
Author: m_kiewitz
Date: 2010-07-09 16:05:47 +0000 (Fri, 09 Jul 2010)
Log Message:
-----------
SCI: actually all sound-sci0 games used a completely different kDoSoundPause logic, implement it - fixes all sorts of games not pausing when going to restore menu and more
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/sound/soundcmd.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2010-07-09 14:11:27 UTC (rev 50759)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2010-07-09 16:05:47 UTC (rev 50760)
@@ -260,7 +260,7 @@
{ SIG_SOUNDSCI0, 3, MAP_CALL(DoSoundDispose), "o", NULL },
{ SIG_SOUNDSCI0, 4, MAP_CALL(DoSoundMute), "(i)", NULL },
{ SIG_SOUNDSCI0, 5, MAP_CALL(DoSoundStop), "o", NULL },
- { SIG_SOUNDSCI0, 6, MAP_CALL(DoSoundPause), "[o0i]", NULL },
+ { SIG_SOUNDSCI0, 6, MAP_CALL(DoSoundPause), "i", NULL },
{ SIG_SOUNDSCI0, 7, MAP_CALL(DoSoundResume), "o", NULL },
{ SIG_SOUNDSCI0, 8, MAP_CALL(DoSoundMasterVolume), "(i)", NULL },
{ SIG_SOUNDSCI0, 9, MAP_CALL(DoSoundUpdate), "o", NULL },
Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-07-09 14:11:27 UTC (rev 50759)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-07-09 16:05:47 UTC (rev 50760)
@@ -209,30 +209,30 @@
}
reg_t SoundCommandParser::kDoSoundPause(int argc, reg_t *argv, reg_t acc) {
+ if (_soundVersion <= SCI_VERSION_0_LATE) {
+ uint16 value = argv[0].toUint16();
+ MusicEntry *musicSlot = _music->getActiveSci0MusicSlot();
+ switch (value) {
+ case 1:
+ if ((musicSlot) && (musicSlot->status == kSoundPlaying))
+ _music->soundPause(musicSlot);
+ return make_reg(0, 0);
+ case 0:
+ if ((musicSlot) && (musicSlot->status == kSoundPaused)) {
+ _music->soundResume(musicSlot);
+ return make_reg(0, 1);
+ }
+ return make_reg(0, 0);
+ default:
+ error("kDoSoundPause: parameter 0 is invalid for sound-sci0");
+ }
+ }
+
reg_t obj = argv[0];
uint16 value = argc > 1 ? argv[1].toUint16() : 0;
-
if (!obj.segment) { // pause the whole playlist
// SCI0 games (up to including qfg1) give us 0/1 for either resuming or pausing the current music
// this one doesn't count, so pausing 2 times and resuming once means here that we are supposed to resume
- if (_soundVersion <= SCI_VERSION_0_LATE) {
- // TODO: this code doesn't work right currently
- return make_reg(0, 0);
- MusicEntry *musicSlot = _music->getActiveSci0MusicSlot();
- switch (obj.offset) {
- case 1:
- if ((musicSlot) && (musicSlot->status == kSoundPlaying))
- _music->soundPause(musicSlot);
- return make_reg(0, 0);
- case 0:
- if ((musicSlot) && (musicSlot->status == kSoundPaused))
- _music->soundResume(musicSlot);
- return make_reg(0, 1);
- return make_reg(0, 0);
- default:
- error("kDoSoundPause: parameter 0 is invalid for sound-sci0");
- }
- }
// Pausing/Resuming the whole playlist was introduced in the SCI1 late sound scheme.
if (_soundVersion <= SCI_VERSION_1_EARLY)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list