SCI: bit more work on restore dialog replacing
(works now, if enabled - but music isn't yet paused) svn-id: r52317
This commit is contained in:
parent
a484a99e9f
commit
f1f24b7b28
1 changed files with 7 additions and 2 deletions
|
@ -254,8 +254,8 @@ Common::Error SciEngine::run() {
|
||||||
|
|
||||||
debug("Emulating SCI version %s\n", getSciVersionDesc(getSciVersion()));
|
debug("Emulating SCI version %s\n", getSciVersionDesc(getSciVersion()));
|
||||||
|
|
||||||
// ENABLE THIS FOR REPLACING SIERRA GAME RESTORE DIALOG WITH SCUMMVM RESTORE
|
// Patch in our save/restore code, so that dialogs are replaced
|
||||||
//patchGameSaveRestore(segMan);
|
patchGameSaveRestore(segMan);
|
||||||
|
|
||||||
if (_gameDescription->flags & ADGF_ADDENGLISH) {
|
if (_gameDescription->flags & ADGF_ADDENGLISH) {
|
||||||
// if game is multilingual
|
// if game is multilingual
|
||||||
|
@ -347,6 +347,9 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) {
|
||||||
const uint16 kernelCount = _kernel->getKernelNamesSize();
|
const uint16 kernelCount = _kernel->getKernelNamesSize();
|
||||||
byte kernelIdRestore = 0;
|
byte kernelIdRestore = 0;
|
||||||
|
|
||||||
|
// DISABLE NEXT LINE FOR REPLACING SIERRA GAME RESTORE DIALOG WITH SCUMMVM RESTORE
|
||||||
|
return;
|
||||||
|
|
||||||
for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) {
|
for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) {
|
||||||
Common::String kernelName = _kernel->getKernelName(kernelNr);
|
Common::String kernelName = _kernel->getKernelName(kernelNr);
|
||||||
if (kernelName == "RestoreGame")
|
if (kernelName == "RestoreGame")
|
||||||
|
@ -521,6 +524,7 @@ void SciEngine::runGame() {
|
||||||
_gamestate->_segMan->resetSegMan();
|
_gamestate->_segMan->resetSegMan();
|
||||||
initGame();
|
initGame();
|
||||||
initStackBaseWithSelector(SELECTOR(play));
|
initStackBaseWithSelector(SELECTOR(play));
|
||||||
|
patchGameSaveRestore(_gamestate->_segMan);
|
||||||
_gamestate->gameIsRestarting = GAMEISRESTARTING_RESTART;
|
_gamestate->gameIsRestarting = GAMEISRESTARTING_RESTART;
|
||||||
if (_gfxMenu)
|
if (_gfxMenu)
|
||||||
_gfxMenu->reset();
|
_gfxMenu->reset();
|
||||||
|
@ -529,6 +533,7 @@ void SciEngine::runGame() {
|
||||||
_gamestate->abortScriptProcessing = kAbortNone;
|
_gamestate->abortScriptProcessing = kAbortNone;
|
||||||
_gamestate->_executionStack.clear();
|
_gamestate->_executionStack.clear();
|
||||||
initStackBaseWithSelector(SELECTOR(replay));
|
initStackBaseWithSelector(SELECTOR(replay));
|
||||||
|
patchGameSaveRestore(_gamestate->_segMan);
|
||||||
_gamestate->shrinkStackToBase();
|
_gamestate->shrinkStackToBase();
|
||||||
_gamestate->abortScriptProcessing = kAbortNone;
|
_gamestate->abortScriptProcessing = kAbortNone;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue