diff options
author | Filippos Karapetis | 2009-10-10 15:58:51 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-10 15:58:51 +0000 |
commit | d6f5d93dbf554bf7e133b0de7e675b6453736356 (patch) | |
tree | 13c1f08b23745536e400344e00a55a0d4bcb2bb4 /engines/sci/engine/kscripts.cpp | |
parent | 8fd29ecf9f5b7f66824b7df45e3f04dfc2b5cfeb (diff) | |
download | scummvm-rg350-d6f5d93dbf554bf7e133b0de7e675b6453736356.tar.gz scummvm-rg350-d6f5d93dbf554bf7e133b0de7e675b6453736356.tar.bz2 scummvm-rg350-d6f5d93dbf554bf7e133b0de7e675b6453736356.zip |
Started rewriting the Object struct into a class
svn-id: r44878
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index e409e1a010..6d0433d62a 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -123,15 +123,14 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { } *clone_obj = *parent_obj; - clone_obj->_flags = 0; // Mark as clone clone_obj->setInfoSelector(make_reg(0, SCRIPT_INFO_CLONE)); - clone_obj->setSpeciesSelector(clone_obj->_pos); + clone_obj->setSpeciesSelector(clone_obj->getPos()); if (parent_obj->isClass()) - clone_obj->setSuperClassSelector(parent_obj->_pos); - s->_segMan->getScript(parent_obj->_pos.segment)->incrementLockers(); - s->_segMan->getScript(clone_obj->_pos.segment)->incrementLockers(); + clone_obj->setSuperClassSelector(parent_obj->getPos()); + s->_segMan->getScript(parent_obj->getPos().segment)->incrementLockers(); + s->_segMan->getScript(clone_obj->getPos().segment)->incrementLockers(); return clone_addr; } @@ -167,8 +166,8 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) { } #endif - victim_obj->_flags |= OBJECT_FLAG_FREED; - + victim_obj->markAsFreed(); + _k_view_list_mark_free(s, victim_addr); // Free on view list, if neccessary return s->r_acc; |