HDB: Proper prototype for saveGameState()

This commit is contained in:
Eugene Sandulenko 2019-07-09 11:38:52 +02:00
parent 6e0e4411a1
commit d12d3ee647
3 changed files with 5 additions and 5 deletions

View file

@ -256,7 +256,7 @@ bool HDBGame::startMap(const char *name) {
// //
if (!scumm_strnicmp(name, "map", 3) && scumm_stricmp(name, "map30")) { if (!scumm_strnicmp(name, "map", 3) && scumm_stricmp(name, "map30")) {
_menu->fillSavegameSlots(); _menu->fillSavegameSlots();
saveGameState(0); // we ignore the slot parameter in everything else since we just keep saving... saveGameState(0, Common::String::format("Autosave %s", name)); // we ignore the slot parameter in everything else since we just keep saving...
} }
return true; return true;
} }
@ -878,7 +878,7 @@ Common::Error HDBGame::run() {
_sound->playSound(SND_VORTEX_SAVE); _sound->playSound(SND_VORTEX_SAVE);
_ai->stopEntity(e); _ai->stopEntity(e);
_menu->fillSavegameSlots(); _menu->fillSavegameSlots();
saveGameState(_saveInfo.slot); saveGameState(_saveInfo.slot, "FIXME"); // Add here date/level name // TODO
_saveInfo.active = false; _saveInfo.active = false;
} }

View file

@ -157,7 +157,7 @@ public:
_changeLevel = true; _changeLevel = true;
} }
Common::Error saveGameState(int slot); Common::Error saveGameState(int slot, const Common::String &desc);
Common::Error loadGameState(int slot); Common::Error loadGameState(int slot);
void saveGame(Common::OutSaveFile *out); void saveGame(Common::OutSaveFile *out);
void loadGame(Common::InSaveFile *in); void loadGame(Common::InSaveFile *in);

View file

@ -24,7 +24,7 @@
namespace HDB { namespace HDB {
Common::Error HDBGame::saveGameState(int slot) { Common::Error HDBGame::saveGameState(int slot, const Common::String &desc) {
// If no map is loaded, don't try to save // If no map is loaded, don't try to save
if (!g_hdb->_map->isLoaded()) if (!g_hdb->_map->isLoaded())