aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-03-08 00:24:23 +0000
committerMax Horn2003-03-08 00:24:23 +0000
commit20c6cfdd2dbd06c4a7f2249405c02604c99e3fc1 (patch)
tree47a62d00fdba2627e91dcd61f23e966da5d009eb /scumm
parentddd54ed3c5ae798fb15333404822789613f05468 (diff)
downloadscummvm-rg350-20c6cfdd2dbd06c4a7f2249405c02604c99e3fc1.tar.gz
scummvm-rg350-20c6cfdd2dbd06c4a7f2249405c02604c99e3fc1.tar.bz2
scummvm-rg350-20c6cfdd2dbd06c4a7f2249405c02604c99e3fc1.zip
some more dummy code for valgrind debugging
svn-id: r6762
Diffstat (limited to 'scumm')
-rw-r--r--scumm/object.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 5a1aa09a55..81ab29d1de 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -1077,14 +1077,24 @@ int Scumm::getObjOldDir(int obj) {
}
}
+int another_dummy_valgrind_var = 0;
+
int Scumm::getObjNewDir(int obj) {
+ int dir;
if (obj < NUM_ACTORS) {
- return derefActorSafe(obj, "getObjNewDir")->facing;
+ dir = derefActorSafe(obj, "getObjNewDir")->facing;
+ if (dir > 0)
+ another_dummy_valgrind_var++;
} else {
- int x, y, dir;
+ int x, y;
getObjectXYPos(obj, x, y, dir);
- return oldDirToNewDir(dir);
+ if (dir > 0)
+ another_dummy_valgrind_var *= 2;
+ dir = oldDirToNewDir(dir);
+ if (dir > 0)
+ another_dummy_valgrind_var--;
}
+ return dir;
}
int Scumm::findInventory(int owner, int idx) {