From faf0d5c2e31bb015ec9c6c8a5a68d761ad39e549 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 26 Jul 2010 15:40:12 +0000 Subject: SCI: adding workaround for island of dr. brain room 290 elevator puzzle, solves bug #3034485 svn-id: r51319 --- engines/sci/engine/kgraphics.cpp | 2 +- engines/sci/engine/workarounds.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index dae2197533..e991070ee7 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -260,7 +260,7 @@ reg_t kGraphDrawLine(EngineState *s, int argc, reg_t *argv) { reg_t kGraphSaveBox(EngineState *s, int argc, reg_t *argv) { Common::Rect rect = getGraphRect(argv); - uint16 screenMask = (argc > 4) ? argv[4].toUint16() : 0; + uint16 screenMask = argv[4].toUint16() & GFX_SCREEN_MASK_ALL; return g_sci->_gfxPaint16->kernelGraphSaveBox(rect, screenMask); } diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 8bf6e4813c..ce706d17e5 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -149,6 +149,8 @@ const SciWorkaroundEntry kGraphDrawLine_workarounds[] = { // gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kGraphSaveBox_workarounds[] = { { GID_CASTLEBRAIN, 420, 427, 0, "alienIcon", "select", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when selecting a card during the alien card game, gets called with 1 extra parameter + { GID_ISLANDBRAIN, 290, 291, 0, "downElevator", "changeState",0x201f, 0, { WORKAROUND_STILLCALL, 0 } }, // when testing in the elevator puzzle, gets called with 1 argument less - 15 is on stack + { GID_ISLANDBRAIN, 290, 291, 0, "correctElevator", "changeState",0x201f, 0, { WORKAROUND_STILLCALL, 0 } }, // see above SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3