diff options
author | Adrian Frühwirth | 2018-01-30 00:03:19 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-01-31 19:23:56 +0100 |
commit | 90ce265ab89bf6f0898813c578e0ec5abce37512 (patch) | |
tree | 27ba6935d299da7f67b505392e243df278f805fa /engines/tucker/tucker.cpp | |
parent | ce790bff1c14d9329ef60b456da25ec67dbf185e (diff) | |
download | scummvm-rg350-90ce265ab89bf6f0898813c578e0ec5abce37512.tar.gz scummvm-rg350-90ce265ab89bf6f0898813c578e0ec5abce37512.tar.bz2 scummvm-rg350-90ce265ab89bf6f0898813c578e0ec5abce37512.zip |
TUCKER: Print infobar string if no savegame exists
Before, the ingame load dialog pretended to allow loading savegames from
all possible slots even if no savegames existed.
This introduces the original interpreter's behavior which instead loads
a resource string from infobar.txt informing the user that no savegames
are available.
Diffstat (limited to 'engines/tucker/tucker.cpp')
-rw-r--r-- | engines/tucker/tucker.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index cf28b1b656..d9e14b32fb 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -27,6 +27,7 @@ #include "common/debug.h" #include "common/error.h" #include "common/keyboard.h" +#include "common/savefile.h" #include "common/textconsole.h" #include "engines/util.h" @@ -1314,13 +1315,19 @@ void TuckerEngine::updateSfxData3_2() { } void TuckerEngine::saveOrLoad() { + bool hasSavegame = existsSavegame(); + if (!_leftMouseButtonPressed) { _mouseClick = 0; } if (_currentSaveLoadGameState > 0) { - drawSpeechText(_scrollOffset + 120, 170, _infoBarBuf, _saveOrLoadGamePanel + 19, 102); - int len = getStringWidth(_saveOrLoadGamePanel + 19, _infoBarBuf); - drawStringInteger(_currentSaveLoadGameState, len / 2 + 128, 160, 2); + if (_saveOrLoadGamePanel == 0 && !hasSavegame) { + drawSpeechText(_scrollOffset + 120, 170, _infoBarBuf, _saveOrLoadGamePanel + 21, 102); + } else { + drawSpeechText(_scrollOffset + 120, 170, _infoBarBuf, _saveOrLoadGamePanel + 19, 102); + int len = getStringWidth(_saveOrLoadGamePanel + 19, _infoBarBuf); + drawStringInteger(_currentSaveLoadGameState, len / 2 + 128, 160, 2); + } } else { drawSpeechText(_scrollOffset + 120, 170, _infoBarBuf, 21, 102); } @@ -1348,7 +1355,7 @@ void TuckerEngine::saveOrLoad() { if (_mousePosX > 260 && _mousePosX < 290 && _mousePosY > 152 && _mousePosY < 168) { if (_saveOrLoadGamePanel == 1) { saveGameState(_currentSaveLoadGameState, ""); - } else if (_currentSaveLoadGameState > 0) { + } else if (hasSavegame && _currentSaveLoadGameState > 0) { loadGameState(_currentSaveLoadGameState); } _forceRedrawPanelItems = true; |