diff options
author | Filippos Karapetis | 2010-06-30 09:51:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-30 09:51:21 +0000 |
commit | 8752eed8f241ae2c405a2818b3e30ef735019662 (patch) | |
tree | 0c3383de3c3508cf6e488a5ccb0df13902155ba9 | |
parent | 7595e7c1bec5e56e9ddaabea4b6af43423e8e002 (diff) | |
download | scummvm-rg350-8752eed8f241ae2c405a2818b3e30ef735019662.tar.gz scummvm-rg350-8752eed8f241ae2c405a2818b3e30ef735019662.tar.bz2 scummvm-rg350-8752eed8f241ae2c405a2818b3e30ef735019662.zip |
SCI: Reverting r50516, SSCI didn't reset the node value when deleting the node. Also, a slight fix in VM debug code.
svn-id: r50521
-rw-r--r-- | engines/sci/engine/klists.cpp | 7 | ||||
-rw-r--r-- | engines/sci/engine/vm.cpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 25df4bb563..6842c9b1d8 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -346,12 +346,11 @@ reg_t kDeleteKey(EngineState *s, int argc, reg_t *argv) { if (!n->succ.isNull()) s->_segMan->lookupNode(n->succ)->pred = n->pred; - // Erase the node itself, as the game might reference it again. - // Happens in the intro of QFG1 and in Longbow, when exiting the - // cave. + // Erase references to the predecessor and successor nodes, as the game + // scripts could reference the node itself again. + // Happens in the intro of QFG1 and in Longbow, when exiting the cave. n->pred = NULL_REG; n->succ = NULL_REG; - n->value = NULL_REG; return make_reg(0, 1); // Signal success } diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 46fc46da63..4e0c2710c1 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -815,7 +815,7 @@ static void callKernelFunc(EngineState *s, int kernelFuncNr, int argc) { #if 0 // Used for debugging Common::String debugMsg = kernelFunc.origName + - Common::String::printf("[0x%x]", kernelFuncNum) + + Common::String::printf("[0x%x]", kernelFuncNr) + Common::String::printf(", %d params: ", argc) + " ("; |