aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index a56eab4ddf..9ec8842ab3 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -928,10 +928,17 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
error("[VM] k%s: signature mismatch via method %s::%s (script %d, localCall %x)", kernelSubCall.name, originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset);
}
// FIXME: implement some real workaround type logic - ignore call, still do call etc.
- if (workaround.segment == 2)
+ switch (workaround.segment) {
+ case 0: // don't do kernel call, leave acc alone
+ return;
+ case 1: // call kernel anyway
+ break;
+ case 2: // don't do kernel call, fake acc
s->r_acc = make_reg(0, workaround.offset);
- if (workaround.segment)
return;
+ default:
+ error("unknown workaround type");
+ }
}
if (!kernelSubCall.function)
error("[VM] k%s: subfunction-id %d requested, but not available", kernelCall.name, subId);