aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-14 09:00:44 +0000
committerMartin Kiewitz2010-07-14 09:00:44 +0000
commit646ea5828c091ef59c0c97f2cfdc02a67aa99f95 (patch)
treef48425c94bbaa9b3541323b82aeb25ec516f818f /engines/sci/engine
parentd5ff65bc023c5e68db8a3fed4dc4cf6decc6356e (diff)
downloadscummvm-rg350-646ea5828c091ef59c0c97f2cfdc02a67aa99f95.tar.gz
scummvm-rg350-646ea5828c091ef59c0c97f2cfdc02a67aa99f95.tar.bz2
scummvm-rg350-646ea5828c091ef59c0c97f2cfdc02a67aa99f95.zip
SCI: moving hack signature for kDoSound(play) to SCI1LATE only, adding comment about this and changing signature for SCI1EARLY back to what it was.
svn-id: r50874
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 56713766aa..1be3a63a8f 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -341,17 +341,11 @@ 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 },
- // 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, 7, MAP_CALL(DoSoundPlay), "oi", NULL },
+ // ^^ FIXME: In SCI1-SCI1.1 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. It's passed on, we should find out what
+ // it actually does internally
{ 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 },
@@ -369,7 +363,12 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
{ SIG_SOUNDSCI1LATE, 5, MAP_CALL(DoSoundSuspend), "i", NULL },
{ SIG_SOUNDSCI1LATE, 6, MAP_CALL(DoSoundInit), NULL, NULL },
{ SIG_SOUNDSCI1LATE, 7, MAP_CALL(DoSoundDispose), NULL, NULL },
- { SIG_SOUNDSCI1LATE, 8, MAP_CALL(DoSoundPlay), NULL, NULL },
+ { SIG_SOUNDSCI1LATE, 8, MAP_CALL(DoSoundPlay), "o(i)", NULL },
+ // ^^ HACK: In SCI2, the playBed method is removed (thus the second parameter
+ // is now meaningless, but it's still passed and needed), and in SCI2.1 the second parameter is removed
+ // altogether. We should actually create a new sound version called SCI21 to change the signature only
+ // for this version and above. There should be no signature here at all, so that the signature for SCI1LATE
+ // is taken from SCI1EARLY.
{ SIG_SOUNDSCI1LATE, 9, MAP_CALL(DoSoundStop), NULL, NULL },
{ SIG_SOUNDSCI1LATE, 10, MAP_CALL(DoSoundPause), NULL, NULL },
{ SIG_SOUNDSCI1LATE, 11, MAP_CALL(DoSoundFade), "oiiii(i)", kDoSoundFade_workarounds },