mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 02:44:56 +00:00
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:
parent
f413356bed
commit
88a9099949
@ -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);
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user