ENGINES: Cleanup of savegame filenames generation

This removes filename methods when it matched the Engine method.
Secondly, ensuring there was an overriden getSaveStateName method
for engines that didn't do the standard target.00x save filenames
This commit is contained in:
Paul Gilbert 2020-02-06 21:54:41 -08:00 committed by Paul Gilbert
parent c40adffbdd
commit 9f175c4053
78 changed files with 152 additions and 213 deletions

View file

@ -139,7 +139,7 @@ void writeMetaData(Common::OutSaveFile *file, Common::String desc) {
}
Common::Error MacVentureEngine::loadGameState(int slot) {
Common::String saveFileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
Common::String saveFileName = getSaveStateName(slot);
Common::InSaveFile *file;
if(!(file = getSaveFileManager()->openForLoading(saveFileName))) {
error("ENGINE: Missing savegame file %s", saveFileName.c_str());
@ -150,7 +150,7 @@ Common::Error MacVentureEngine::loadGameState(int slot) {
}
Common::Error MacVentureEngine::saveGameState(int slot, const Common::String &desc, bool isAutosave) {
Common::String saveFileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
Common::String saveFileName = getSaveStateName(slot);
Common::SaveFileManager *manager = getSaveFileManager();
// HACK Get a real name!
Common::OutSaveFile *file = manager->openForSaving(saveFileName);