aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kgraphics.cpp2
-rw-r--r--engines/sci/engine/workarounds.cpp2
2 files changed, 3 insertions, 1 deletions
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
};