aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-01-08 19:34:24 -0600
committerColin Snover2017-01-09 19:34:54 -0600
commitb818e54027bf7730893e4199e02684e2a02cfb99 (patch)
treef1f6690cfa0d28072b658b9cb601a73da9292390
parent70cfdb6a1f79fa25a699e42bf27e6e3fdcb8521d (diff)
downloadscummvm-rg350-b818e54027bf7730893e4199e02684e2a02cfb99.tar.gz
scummvm-rg350-b818e54027bf7730893e4199e02684e2a02cfb99.tar.bz2
scummvm-rg350-b818e54027bf7730893e4199e02684e2a02cfb99.zip
SCI32: Fix crashes and bad cel positioning in GK2 demo
-rw-r--r--engines/sci/engine/workarounds.cpp1
-rw-r--r--engines/sci/graphics/frameout.cpp7
-rw-r--r--engines/sci/sound/music.cpp3
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 9051ab7463..e574b960fb 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -553,6 +553,7 @@ const SciWorkaroundEntry kDoSoundPlay_workarounds[] = {
{ GID_PQ4, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
{ GID_KQ7, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
{ GID_GK1, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Mac version always passes an extra null argument
+ { GID_GK2, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument when clicking on buttons
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index fe43c75e5a..57512f1b66 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -85,7 +85,6 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
switch (g_sci->getGameId()) {
case GID_HOYLE5:
- case GID_GK2:
case GID_LIGHTHOUSE:
case GID_LSL7:
case GID_PHANTASMAGORIA2:
@@ -95,6 +94,12 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
_currentBuffer.scriptWidth = 640;
_currentBuffer.scriptHeight = 480;
break;
+ case GID_GK2:
+ if (!g_sci->isDemo()) {
+ _currentBuffer.scriptWidth = 640;
+ _currentBuffer.scriptHeight = 480;
+ }
+ break;
default:
// default script width for other games is 320x200
break;
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 487d30e840..488bd0360c 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -127,7 +127,8 @@ void SciMusic::init() {
_pMidiDrv->setTimerCallback(this, &miditimerCallback);
_dwTempo = _pMidiDrv->getBaseTempo();
} else {
- if (g_sci->getGameId() == GID_FUNSEEKER) {
+ if (g_sci->getGameId() == GID_FUNSEEKER ||
+ (g_sci->getGameId() == GID_GK2 && g_sci->isDemo())) {
// HACK: The Fun Seeker's Guide demo doesn't have patch 3 and the version
// of the Adlib driver (adl.drv) that it includes is unsupported. That demo
// doesn't have any sound anyway, so this shouldn't be fatal.