aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
authorMax Horn2006-02-05 15:49:09 +0000
committerMax Horn2006-02-05 15:49:09 +0000
commitb621575dbd490677e86dea9717404e41f75a34b0 (patch)
tree79a95e43d2d5c258c4a12a653f1c3e1979d53a1c /scumm/script_v6.cpp
parentb3e1252b02c63539bfbc42d67fa200a1602d6bb8 (diff)
downloadscummvm-rg350-b621575dbd490677e86dea9717404e41f75a34b0.tar.gz
scummvm-rg350-b621575dbd490677e86dea9717404e41f75a34b0.tar.bz2
scummvm-rg350-b621575dbd490677e86dea9717404e41f75a34b0.zip
Make debugging a little bit easier :-)
svn-id: r20407
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 2f5ced6da5..e4876b3b0d 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -527,13 +527,15 @@ int ScummEngine_v6::readArray(int array, int idx, int base) {
array, base, idx, FROM_LE_16(ah->dim1), FROM_LE_16(ah->dim2));
}
+ int val;
if (FROM_LE_16(ah->type) != kIntArray) {
- return ah->data[offset];
+ val = ah->data[offset];
} else if (_version == 8) {
- return (int32)READ_LE_UINT32(ah->data + offset * 4);
+ val = (int32)READ_LE_UINT32(ah->data + offset * 4);
} else {
- return (int16)READ_LE_UINT16(ah->data + offset * 2);
+ val = (int16)READ_LE_UINT16(ah->data + offset * 2);
}
+ return val;
}
void ScummEngine_v6::writeArray(int array, int idx, int base, int value) {
@@ -2042,7 +2044,8 @@ void ScummEngine_v6::o6_verbOps() {
void ScummEngine_v6::o6_getActorFromXY() {
int y = pop();
int x = pop();
- push(getActorFromPos(x, y));
+ int r = getActorFromPos(x, y);
+ push(r);
}
void ScummEngine_v6::o6_findObject() {