diff options
author | Max Horn | 2009-09-16 23:32:48 +0000 |
---|---|---|
committer | Max Horn | 2009-09-16 23:32:48 +0000 |
commit | 68dfdce043546b6c6720d6c1b8e622ac552a4b00 (patch) | |
tree | e11bc1673774a327fb9038c1ce63b69b70e3700b /engines/sci/engine/kscripts.cpp | |
parent | a277123f54c7dd6f6d784501830b4e8975d47c27 (diff) | |
download | scummvm-rg350-68dfdce043546b6c6720d6c1b8e622ac552a4b00.tar.gz scummvm-rg350-68dfdce043546b6c6720d6c1b8e622ac552a4b00.tar.bz2 scummvm-rg350-68dfdce043546b6c6720d6c1b8e622ac552a4b00.zip |
SCI: Turn some SegManager methods into Script methods
svn-id: r44127
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index f3689a6025..5aabd86732 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -318,9 +318,13 @@ reg_t kDisposeScript(EngineState *s, int, int argc, reg_t *argv) { } } -int is_heap_object(EngineState *s, reg_t pos) { +bool is_heap_object(EngineState *s, reg_t pos) { Object *obj = s->segMan->getObject(pos); - return (obj != NULL && (!(obj->flags & OBJECT_FLAG_FREED)) && (!s->segMan->scriptIsMarkedAsDeleted(pos.segment))); + if (obj == NULL) + return false; + if (obj->flags & OBJECT_FLAG_FREED) + return false; + return !s->segMan->scriptIsMarkedAsDeleted(pos.segment); } reg_t kIsObject(EngineState *s, int, int argc, reg_t *argv) { |