SCI: Remove unsafe unmarkDeleted function.

It did not undo all effects of a script being deleted (specifically its
superclasses remain unlocked), causing an inconsistent
state. Also removed EcoQuest CD hack that worked around a specific
instance of this problem.

svn-id: r44449
This commit is contained in:
Willem Jan Palenstijn 2009-09-28 20:21:09 +00:00
parent f413356bed
commit 88a9099949
3 changed files with 1 additions and 16 deletions

View File

@ -218,12 +218,6 @@ reg_t kDisposeScript(EngineState *s, int, int argc, reg_t *argv) {
if (scr) {
if (s->_executionStack.back().addr.pc.segment != id)
scr->setLockers(1);
// HACK for EcoQuest CD
if (s->_gameName == "ecoquest" && script == 821) {
warning("kDisposeScript hack for EcoQuest 1 CD: not disposing script 821");
scr->setLockers(2);
}
}
script_uninstantiate(s->segMan, script);

View File

@ -432,13 +432,6 @@ public:
_markedAsDeleted = true;
}
/**
* Marks the script as not deleted.
*/
void unmarkDeleted() {
_markedAsDeleted = false;
}
/**
* Determines whether the script is marked as being deleted.
*/

View File

@ -208,10 +208,8 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP
int seg = s->segMan->getScriptSegment(script);
Script *scr = s->segMan->getScriptIfLoaded(seg);
if (!scr) // Script not present yet?
if (!scr || scr->isMarkedAsDeleted()) // Script not present yet?
seg = script_instantiate(s->resMan, s->segMan, script);
else
scr->unmarkDeleted();
const int temp = s->segMan->validateExportFunc(pubfunct, seg);
if (!temp) {