aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-03-04 03:18:12 +0000
committerMax Horn2003-03-04 03:18:12 +0000
commitbc60419fa649370ec47e1b66e607d534027e6410 (patch)
treee95a88a44979ae6e2b972b878d0511efef30b67d
parente72bddeea0eadec871f6bdca98170c15d8d703e6 (diff)
downloadscummvm-rg350-bc60419fa649370ec47e1b66e607d534027e6410.tar.gz
scummvm-rg350-bc60419fa649370ec47e1b66e607d534027e6410.tar.bz2
scummvm-rg350-bc60419fa649370ec47e1b66e607d534027e6410.zip
if a script triggers a load, immediatly perform it (this also covers the case where the user requests a load while a SMUSH video is playing. This avoids the annoying affect of seeing 1 frame of the old room immediately after you requested the load
svn-id: r6687
-rw-r--r--scumm/scummvm.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index bebc5ac8f3..349e17573d 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -559,6 +559,7 @@ int Scumm::scummLoop(int delta)
_vars[VAR_GAME_LOADED] = 0;
if (_saveLoadFlag) {
+load_game:
bool success;
const char *errMsg = "Succesfully saved/loaded game state in file:\n\n%s";
char filename[256];
@@ -612,6 +613,14 @@ int Scumm::scummLoop(int delta)
checkExecVerbs();
checkAndRunSentenceScript();
+ // HACK: If a load was requested, immediately perform it. This avoids
+ // drawing the current room right after the load is request but before
+ // it is performed. That was annoying esp. if you loaded while a SMUSH
+ // cutscene was playing.
+ if (_saveLoadFlag && _saveLoadFlag != 1) {
+ goto load_game;
+ }
+
if (_currentRoom == 0) {
gdi._cursorActive = 0;
CHARSET_1();