diff options
author | Max Horn | 2009-10-19 22:52:01 +0000 |
---|---|---|
committer | Max Horn | 2009-10-19 22:52:01 +0000 |
commit | c0f6657797d1d7bfeb64acf6cb3f2b1c0748e7ef (patch) | |
tree | dc7d2db9babec1347d769dc5d4992511c350db67 | |
parent | 03953bf2925240401677cbda428209fd4b49c54a (diff) | |
download | scummvm-rg350-c0f6657797d1d7bfeb64acf6cb3f2b1c0748e7ef.tar.gz scummvm-rg350-c0f6657797d1d7bfeb64acf6cb3f2b1c0748e7ef.tar.bz2 scummvm-rg350-c0f6657797d1d7bfeb64acf6cb3f2b1c0748e7ef.zip |
AGI: cleanup
svn-id: r45256
-rw-r--r-- | engines/agi/saveload.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index e3371329d0..070f530e69 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -874,10 +874,7 @@ int AgiEngine::saveGameDialog() { } int AgiEngine::saveGameSimple() { - char fileName[MAXPATHLEN]; - - sprintf(fileName, "%s", getSavegameFilename(0)); - int result = saveGame(fileName, "Default savegame"); + int result = saveGame(getSavegameFilename(0), "Default savegame"); if (result != errOK) messageBox("Error saving game."); return result; @@ -989,7 +986,7 @@ void AgiEngine::checkQuickLoad() { if (ConfMan.hasKey("save_slot")) { char saveNameBuffer[256]; - snprintf (saveNameBuffer, 256, "%s.%03d", _targetName.c_str(), ConfMan.getInt("save_slot")); + snprintf(saveNameBuffer, 256, "%s.%03d", _targetName.c_str(), ConfMan.getInt("save_slot")); _sprites->eraseBoth(); _sound->stopSound(); @@ -1002,7 +999,7 @@ void AgiEngine::checkQuickLoad() { } Common::Error AgiEngine::loadGameState(int slot) { - static char saveLoadSlot[12]; + char saveLoadSlot[12]; sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), slot); _sprites->eraseBoth(); @@ -1018,7 +1015,7 @@ Common::Error AgiEngine::loadGameState(int slot) { } Common::Error AgiEngine::saveGameState(int slot, const char *desc) { - static char saveLoadSlot[12]; + char saveLoadSlot[12]; sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), slot); if (saveGame(saveLoadSlot, desc) == errOK) return Common::kNoError; |