From 20c6cfdd2dbd06c4a7f2249405c02604c99e3fc1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 8 Mar 2003 00:24:23 +0000 Subject: some more dummy code for valgrind debugging svn-id: r6762 --- scumm/object.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'scumm') 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) { -- cgit v1.2.3