diff options
author | Max Horn | 2009-09-17 00:44:22 +0000 |
---|---|---|
committer | Max Horn | 2009-09-17 00:44:22 +0000 |
commit | 1f0e8ef4705ba242e66d5f8c0c20b2c21078bdf7 (patch) | |
tree | aa40cc4b1911f5d295aec08925a881e2338ce4dc /engines/sci/engine/kscripts.cpp | |
parent | b26f744e239f45d23bf122ca082948a7071a79b0 (diff) | |
download | scummvm-rg350-1f0e8ef4705ba242e66d5f8c0c20b2c21078bdf7.tar.gz scummvm-rg350-1f0e8ef4705ba242e66d5f8c0c20b2c21078bdf7.tar.bz2 scummvm-rg350-1f0e8ef4705ba242e66d5f8c0c20b2c21078bdf7.zip |
SCI: More cleanup
svn-id: r44129
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 5aabd86732..318d4b9c4d 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -318,27 +318,18 @@ reg_t kDisposeScript(EngineState *s, int, int argc, reg_t *argv) { } } -bool is_heap_object(EngineState *s, reg_t pos) { - Object *obj = s->segMan->getObject(pos); - 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) { if (argv[0].offset == 0xffff) // Treated specially return NULL_REG; else - return make_reg(0, is_heap_object(s, argv[0])); + return make_reg(0, s->segMan->isHeapObject(argv[0])); } reg_t kRespondsTo(EngineState *s, int, int argc, reg_t *argv) { reg_t obj = argv[0]; int selector = argv[1].toUint16(); - return make_reg(0, is_heap_object(s, obj) && lookup_selector(s->segMan, obj, selector, NULL, NULL) != kSelectorNone); + return make_reg(0, s->segMan->isHeapObject(obj) && lookup_selector(s->segMan, obj, selector, NULL, NULL) != kSelectorNone); } } // End of namespace Sci |