aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kscripts.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-31 14:16:29 -0400
committerMatthew Hoops2011-05-31 14:16:29 -0400
commitaa49b38c5a8032586cb94fc4ca07149eecabe64a (patch)
treeea5c7617f8c482c8cf4141b728b3ccff5a7f84c7 /engines/sci/engine/kscripts.cpp
parentd3ea9ab2a9334747eb445c1b45aa30cb17ffdf1b (diff)
parentc86a6c466fabe31fbf36363aa8d0ac8ea6001b9f (diff)
downloadscummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.gz
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.bz2
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: engines/groovie/script.cpp
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r--engines/sci/engine/kscripts.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index b9baa3540a..d83254b2c4 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -49,7 +46,7 @@ reg_t kLoad(EngineState *s, int argc, reg_t *argv) {
}
// Unloads an arbitrary resource of type 'restype' with resource numbber 'resnr'
-// behaviour of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with
+// behavior of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with
// 1 or 3+ parameters is not right according to sierra sci
reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) {
if (argc >= 2) {
@@ -195,7 +192,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) {
}
// SCI uses this technique to find out, if it's a clone and if it's supposed to get freed
- // At least kq4early relies on this behaviour. The scripts clone "Sound", then set bit 1 manually
+ // At least kq4early relies on this behavior. The scripts clone "Sound", then set bit 1 manually
// and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues
// later, because kIsObject would then return false and Sound object wouldn't get checked.
uint16 infoSelector = object->getInfoSelector().offset;
@@ -262,7 +259,7 @@ reg_t kDisposeScript(EngineState *s, int argc, reg_t *argv) {
SegmentId id = s->_segMan->getScriptSegment(script);
Script *scr = s->_segMan->getScriptIfLoaded(id);
- if (scr) {
+ if (scr && !scr->isMarkedAsDeleted()) {
if (s->_executionStack.back().addr.pc.segment != id)
scr->setLockers(1);
}