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/saveload.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/saveload.cpp')
-rw-r--r-- | engines/tucker/saveload.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp index 92da2d4d9b..8ed969c88e 100644 --- a/engines/tucker/saveload.cpp +++ b/engines/tucker/saveload.cpp @@ -126,4 +126,9 @@ bool TuckerEngine::canSaveGameStateCurrently() { return !_player && _cursorType < 2; } +bool TuckerEngine::existsSavegame() { + Common::String pattern = generateGameStateFileName(_targetName.c_str(), 0, true); + return !_saveFileMan->listSavefiles(pattern).empty(); +} + } // namespace Tucker |