SCUMM: v7-8: Fix correct moment to call checkExecVerbs()
Also, remove 20 years old workarounds because of this
This commit is contained in:
parent
5b58afff61
commit
6ee5f03ffa
3 changed files with 18 additions and 31 deletions
|
@ -739,11 +739,6 @@ bool ScummEngine::loadState(int slot, bool compat, Common::String &filename) {
|
|||
sh = _screenH;
|
||||
|
||||
#ifdef ENABLE_SCUMM_7_8
|
||||
// Remove any blast text leftovers
|
||||
if (_game.version >= 7) {
|
||||
((ScummEngine_v7 *)this)->removeBlastTexts();
|
||||
}
|
||||
|
||||
if (_game.version == 8 && isUsingOriginalGUI()) {
|
||||
// If we are loading a savegame from the ScummVM launcher these two
|
||||
// variables are going to be unassigned, since the game does not save these
|
||||
|
|
|
@ -781,27 +781,6 @@ void ScummEngine_v6::o6_startScript() {
|
|||
return;
|
||||
}
|
||||
|
||||
// WORKAROUND bug #3591: When turning pages in the recipe book
|
||||
// (found on Blood Island), there is a brief moment where it displays
|
||||
// text from two different pages at the same time.
|
||||
//
|
||||
// The content of the books is drawing (in an endless loop) by local
|
||||
// script 2007. Changing the page is handled by script 2006, which
|
||||
// first stops script 2007; then switches the page; then restarts
|
||||
// script 2007. But it fails to clear the blast texts beforehand.
|
||||
// Hence, the next time blast text is drawn, both the old one (from
|
||||
// the old instance of script 2007) and the new text (from the new
|
||||
// instance) are briefly drawn simultaneously.
|
||||
//
|
||||
// This looks like a script bug to me (a missing call to clearTextQueue).
|
||||
// But this could also hint at a subtle bug in ScummVM; we should check
|
||||
// whether this bug occurs with the original engine or not.
|
||||
if (_game.id == GID_CMI && script == 2007 &&
|
||||
_currentRoom == 62 && vm.slot[_currentScript].number == 2006) {
|
||||
|
||||
removeBlastTexts();
|
||||
}
|
||||
|
||||
runScript(script, (flags & 1) != 0, (flags & 2) != 0, args);
|
||||
}
|
||||
|
||||
|
|
|
@ -2373,13 +2373,19 @@ void ScummEngine::scummLoop(int delta) {
|
|||
|
||||
processInput();
|
||||
|
||||
// In v7-8 this function is executed at the end of processInput().
|
||||
// we emulate the same behavior by calling it here...
|
||||
if (_game.version >= 7)
|
||||
checkExecVerbs();
|
||||
|
||||
// Saving is performed here in v8; this is important when saving the thumbnail,
|
||||
// which would otherwise miss blastObjects (and possibly more) on the bitmap.
|
||||
// Speaking of the devil, blastObjects are removed right after this operation...
|
||||
// We also remove blastTexts here, being that this isn't done explicitly in the
|
||||
// original, but we still need to...
|
||||
// which would otherwise miss blastObjects/Texts on the bitmap.
|
||||
if (_game.version == 8) {
|
||||
scummLoop_handleSaveLoad();
|
||||
}
|
||||
|
||||
// BlastObjects/Texts are removed in this moment of the codepath, in v7-8...
|
||||
if (_game.version >= 7) {
|
||||
((ScummEngine_v6 *)this)->removeBlastObjects();
|
||||
#ifdef ENABLE_SCUMM_7_8
|
||||
((ScummEngine_v7 *)this)->removeBlastTexts();
|
||||
|
@ -2432,8 +2438,15 @@ load_game:
|
|||
if (_game.heversion >= 80) {
|
||||
((SoundHE *)_sound)->processSoundCode();
|
||||
}
|
||||
|
||||
runAllScripts();
|
||||
checkExecVerbs();
|
||||
|
||||
// SCUMM v7-8 executes checkExecVerbs inside the function
|
||||
// which processes keyboard inputs, so we handle it above
|
||||
// in that case.
|
||||
if (_game.version < 7)
|
||||
checkExecVerbs();
|
||||
|
||||
checkAndRunSentenceScript();
|
||||
|
||||
if (shouldQuit())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue