From b818e54027bf7730893e4199e02684e2a02cfb99 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sun, 8 Jan 2017 19:34:24 -0600 Subject: SCI32: Fix crashes and bad cel positioning in GK2 demo --- engines/sci/engine/workarounds.cpp | 1 + engines/sci/graphics/frameout.cpp | 7 ++++++- engines/sci/sound/music.cpp | 3 ++- 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. -- cgit v1.2.3