From de4060d4a170e2e60dabebcd485172f0b194b0a8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 25 May 2014 14:05:14 +0200 Subject: TUCKER: Skip the display of the intro and of the chapter number when a game is loaded from launcher --- engines/tucker/resource.cpp | 5 ++++- engines/tucker/sequences.cpp | 2 +- engines/tucker/tucker.cpp | 4 +++- engines/tucker/tucker.h | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp index dd9d426cde..9cba7b523d 100644 --- a/engines/tucker/resource.cpp +++ b/engines/tucker/resource.cpp @@ -535,7 +535,10 @@ void TuckerEngine::loadObj() { return; } debug(2, "loadObj() partNum %d locationNum %d", _partNum, _locationNum); - if ((_gameFlags & kGameFlagDemo) == 0) { + // If a savegame is loaded from the launcher, skip the display chapter + if (_startSlot != -1) + _startSlot = -1; + else if ((_gameFlags & kGameFlagDemo) == 0) { handleNewPartSequence(); } _currentPartNum = _partNum; diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp index 4a68c14eea..d9f284e443 100644 --- a/engines/tucker/sequences.cpp +++ b/engines/tucker/sequences.cpp @@ -40,7 +40,7 @@ void TuckerEngine::handleIntroSequence() { _player = new AnimationSequencePlayer(_system, _mixer, _eventMan, &_compressedSound, firstSequence); _player->mainLoop(); delete _player; - _player = 0; + _player = nullptr; } void TuckerEngine::handleCreditsSequence() { diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 3b35fc65be..de555cd7b6 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -50,6 +50,7 @@ TuckerEngine::TuckerEngine(OSystem *system, Common::Language language, uint32 fl _currentSaveLoadGameState = 1; _fileLoadSize = 0; _csDataSize = 0; + _startSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1; _player = nullptr; _loadTempBuf = nullptr; @@ -91,7 +92,8 @@ Common::Error TuckerEngine::run() { initGraphics(kScreenWidth, kScreenHeight, false); syncSoundSettings(); _compressedSound.openFile(); - handleIntroSequence(); + if (_startSlot == -1) + handleIntroSequence(); if ((_gameFlags & kGameFlagIntroOnly) == 0 && !shouldQuit()) { mainLoop(); } diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h index adcd02b2fe..a423915a5f 100644 --- a/engines/tucker/tucker.h +++ b/engines/tucker/tucker.h @@ -613,6 +613,7 @@ protected: CompressedSound _compressedSound; Common::Language _gameLang; uint32 _gameFlags; + int _startSlot; bool _quitGame; bool _fastMode; -- cgit v1.2.3