aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/vm.cpp
diff options
context:
space:
mode:
authorColin Snover2017-02-03 23:05:27 -0600
committerColin Snover2017-03-30 20:49:37 -0500
commit3678390f3eac8d8373840c91646076154f49aed1 (patch)
tree2241c4b02cef3e61aa124e208615c3febbe42a71 /engines/sci/engine/vm.cpp
parenta1153661c4747711abc52a35a54bc04c8f56f0cf (diff)
downloadscummvm-rg350-3678390f3eac8d8373840c91646076154f49aed1.tar.gz
scummvm-rg350-3678390f3eac8d8373840c91646076154f49aed1.tar.bz2
scummvm-rg350-3678390f3eac8d8373840c91646076154f49aed1.zip
SCI: Add clarifying comment to op_rest
Diffstat (limited to 'engines/sci/engine/vm.cpp')
-rw-r--r--engines/sci/engine/vm.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index b2807e0c53..3535b278c0 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1114,6 +1114,8 @@ void run_vm(EngineState *s) {
case op_rest: // 0x2c (44)
// Pushes all or part of the parameter variable list on the stack
+ // Index 0 is argc, so normally this will be called as &rest 1 to
+ // forward all the arguments.
temp = (uint16) opparams[0]; // First argument
s->r_rest = MAX<int16>(s->xs->argc - temp + 1, 0); // +1 because temp counts the paramcount while argc doesn't