[Scummvm-cvs-logs] scummvm master -> 139bdec3ba3811e1dec00527caaba0d5c3fedcaa
m-kiewitz
m_kiewitz at users.sourceforge.net
Mon Apr 27 18:22:08 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
139bdec3ba SCI: immediate restore now uses delayed restore
Commit: 139bdec3ba3811e1dec00527caaba0d5c3fedcaa
https://github.com/scummvm/scummvm/commit/139bdec3ba3811e1dec00527caaba0d5c3fedcaa
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-04-27T18:21:41+02:00
Commit Message:
SCI: immediate restore now uses delayed restore
instead of the old hackish method
Changed paths:
engines/sci/sci.cpp
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index d07ab43..668ad05 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -282,25 +282,13 @@ Common::Error SciEngine::run() {
// Check whether loading a savestate was requested
int directSaveSlotLoading = ConfMan.getInt("save_slot");
if (directSaveSlotLoading >= 0) {
- // call GameObject::play (like normally)
- initStackBaseWithSelector(SELECTOR(play));
- // We set this, so that the game automatically quit right after init
- _gamestate->variables[VAR_GLOBAL][4] = TRUE_REG;
+ _gamestate->_delayedRestoreGame = true;
+ _gamestate->_delayedRestoreGameId = directSaveSlotLoading;
// Jones only initializes its menus when restarting/restoring, thus set
// the gameIsRestarting flag here before initializing. Fixes bug #6536.
if (g_sci->getGameId() == GID_JONES)
_gamestate->gameIsRestarting = GAMEISRESTARTING_RESTORE;
-
- _gamestate->_executionStackPosChanged = false;
- run_vm(_gamestate);
-
- // As soon as we get control again, actually restore the game
- reg_t restoreArgv[2] = { NULL_REG, make_reg(0, directSaveSlotLoading) }; // special call (argv[0] is NULL)
- kRestoreGame(_gamestate, 2, restoreArgv);
-
- // this indirectly calls GameObject::init, which will setup menu, text font/color codes etc.
- // without this games would be pretty badly broken
}
// Show any special warnings for buggy scripts with severe game bugs,
More information about the Scummvm-git-logs
mailing list