diff options
author | Martin Kiewitz | 2010-07-15 19:23:18 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-15 19:23:18 +0000 |
commit | ddd01ffcb6a5b3766892529523c912c7c623835c (patch) | |
tree | 069a493a6bf1f35613f1d7bb8a73e80bcbb99b96 /engines/sci/engine/kgraphics.cpp | |
parent | 20a0ad6833fd50ed32e660a652ab962cb75d92ca (diff) | |
download | scummvm-rg350-ddd01ffcb6a5b3766892529523c912c7c623835c.tar.gz scummvm-rg350-ddd01ffcb6a5b3766892529523c912c7c623835c.tar.bz2 scummvm-rg350-ddd01ffcb6a5b3766892529523c912c7c623835c.zip |
SCI: some big changes to kCantBeHere - kCantBeHere returns the actual "problem" instead of being a plain boolean - part of solving lsl1 casino door / qfg1vga gate
svn-id: r50919
Diffstat (limited to 'engines/sci/engine/kgraphics.cpp')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 5f258f604b..11412ac1f3 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -382,17 +382,16 @@ reg_t kCanBeHere(EngineState *s, int argc, reg_t *argv) { reg_t curObject = argv[0]; reg_t listReference = (argc > 1) ? argv[1] : NULL_REG; - bool canBeHere = g_sci->_gfxCompare->kernelCanBeHere(curObject, listReference); - return make_reg(0, canBeHere); + reg_t canBeHere = g_sci->_gfxCompare->kernelCanBeHere(curObject, listReference); + return make_reg(0, canBeHere.isNull() ? 1 : 0); } -// kCantBeHere does the same thing as kCanBeHere, except that it returns the opposite result. reg_t kCantBeHere(EngineState *s, int argc, reg_t *argv) { reg_t curObject = argv[0]; reg_t listReference = (argc > 1) ? argv[1] : NULL_REG; - bool canBeHere = g_sci->_gfxCompare->kernelCanBeHere(curObject, listReference); - return make_reg(0, !canBeHere); + reg_t canBeHere = g_sci->_gfxCompare->kernelCanBeHere(curObject, listReference); + return make_reg(0, canBeHere.isNull() ? 0 : 1); } reg_t kIsItSkip(EngineState *s, int argc, reg_t *argv) { |