BLADERUNNER: Disable ScummVM autosaving

Also slightly update the cases for canSaveGameStateCurrently()

The game has its own autosave mechanism (at the start of each new Act). Also currently the label for the ScummVM autosave can be in the wrong language (since it is in the ScummVM's GUI language, but not necessarily in the game's own GUI language) and in KIA it could appear illegible as "?????? ??????" for non Latin languages.
This commit is contained in:
antoniou79 2022-01-14 00:04:56 +02:00
parent 58cb82684d
commit 87108db0a1
3 changed files with 18 additions and 0 deletions

View File

@ -284,6 +284,8 @@ Common::Error BladeRunnerEngine::loadGameState(int slot) {
bool BladeRunnerEngine::canSaveGameStateCurrently() {
return
playerHasControl() &&
_gameIsRunning &&
!_gameJustLaunched &&
!_sceneScript->isInsideScript() &&
!_aiScripts->isInsideScript() &&
!_kia->isOpen() &&

View File

@ -277,6 +277,20 @@ public:
Common::Error loadGameState(int slot) override;
bool canSaveGameStateCurrently() override;
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
/**
* NOTE: Disable support for external autosave (ScummVM's feature).
* Main reason is that it's not easy to properly label this autosave,
* since currently it would translate "Autosave" to the ScummVM GUI language
* which ends up showing as "?????? ??????" on non-latin languages (eg. Greek),
* and in addition is inconsistent with the game's own GUI language.
* Secondary reason is that the game already has an autosaving mechanism,
* albeit only at the start of a new Act.
* And final reason would be to prevent an autosave at an unforeseen moment,
* if we've failed to account for all cases that the game should not save by itself;
* currently those are listed in BladeRunnerEngine::canSaveGameStateCurrently().
*/
int getAutosaveSlot() const override { return -1; }
void pauseEngineIntern(bool pause) override;
Common::Error run() override;

View File

@ -41,6 +41,8 @@ public:
int getMaximumSaveSlot() const override;
void removeSaveState(const char *target, int slot) const override;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
// Disable autosave (see mirrored method in bladerunner.h for detailed explanation)
int getAutosaveSlot() const override { return -1; }
};
const char *BladeRunnerMetaEngine::getName() const {