diff options
author | Filippos Karapetis | 2010-07-13 23:46:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-13 23:46:17 +0000 |
commit | 28fca2dba39000c4ef0b54f0566248784f1ee700 (patch) | |
tree | 1cf38625c2fdfbf9ac27c2f53c5e37f43e00c66a | |
parent | 15f5cc43efed6bbb959b332702d38760c41b8be6 (diff) | |
download | scummvm-rg350-28fca2dba39000c4ef0b54f0566248784f1ee700.tar.gz scummvm-rg350-28fca2dba39000c4ef0b54f0566248784f1ee700.tar.bz2 scummvm-rg350-28fca2dba39000c4ef0b54f0566248784f1ee700.zip |
Fixed the signature check for DoSound (play) for SCI2.1 games, so that they start again
svn-id: r50857
-rw-r--r-- | engines/sci/engine/kernel.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 296f7556e8..9cfa6a2dab 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -334,7 +334,17 @@ static const SciKernelMapSubEntry kDoSound_subops[] = { { SIG_SOUNDSCI1EARLY, 4, MAP_CALL(DoSoundUpdate), NULL, NULL }, { SIG_SOUNDSCI1EARLY, 5, MAP_CALL(DoSoundInit), NULL, NULL }, { SIG_SOUNDSCI1EARLY, 6, MAP_CALL(DoSoundDispose), NULL, NULL }, - { SIG_SOUNDSCI1EARLY, 7, MAP_CALL(DoSoundPlay), "oi", NULL }, + // DoSound (play) is called by 2 methods of the Sound object: play and + // playBed. The methods are the same, apart from the second integer + // parameter: it's 0 in play and 1 in playBed, to distinguish the caller. + // In SCI2, the playBed method is removed (thus the second parameter + // is now meaningless), and in SCI2.1 the second parameter is removed + // altogether. Thus, make the second parameter optional and check for + // its existence inside the function itself, so that the signature + // doesn't bomb out in SCI2.1 games. Another way would be to add SCI + // version checking here, but until then this is the only way to prevent + // the signature check from failing in SCI2.1 games. + { SIG_SOUNDSCI1EARLY, 7, MAP_CALL(DoSoundPlay), "o(i)", NULL }, { SIG_SOUNDSCI1EARLY, 8, MAP_CALL(DoSoundStop), NULL, NULL }, { SIG_SOUNDSCI1EARLY, 9, MAP_CALL(DoSoundPause), "[o0]i", NULL }, { SIG_SOUNDSCI1EARLY, 10, MAP_CALL(DoSoundFade), "oiiii", NULL }, |