diff options
author | Max Horn | 2011-06-02 14:11:38 +0200 |
---|---|---|
committer | Max Horn | 2011-06-02 18:31:59 +0200 |
commit | 477d6233c3672d9a60cceea3570bc775df3d9253 (patch) | |
tree | 741ffe9dcb35fd2c9de405b7da74e572451c8304 /engines/cine | |
parent | 86240bb0dc0103e5099d23770cc04cfd907d2c61 (diff) | |
download | scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.tar.gz scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.tar.bz2 scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.zip |
ENGINES: Change 2nd param of Engine::saveGameState to Common::String
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/cine.h | 4 | ||||
-rw-r--r-- | engines/cine/detection.cpp | 6 | ||||
-rw-r--r-- | engines/cine/saveload.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/cine/cine.h b/engines/cine/cine.h index 371ea0dd1f..55376dce29 100644 --- a/engines/cine/cine.h +++ b/engines/cine/cine.h @@ -126,7 +126,7 @@ public: int modifyGameSpeed(int speedChange); int getTimerDelay() const; Common::Error loadGameState(int slot); - Common::Error saveGameState(int slot, const char *desc); + Common::Error saveGameState(int slot, const Common::String &desc); bool canLoadGameStateCurrently(); bool canSaveGameStateCurrently(); @@ -148,7 +148,7 @@ private: void resetEngine(); bool loadPlainSaveFW(Common::SeekableReadStream &in, CineSaveGameFormat saveGameFormat); bool loadTempSaveOS(Common::SeekableReadStream &in); - bool makeLoad(char *saveName); + bool makeLoad(const Common::String &saveName); void makeSaveFW(Common::OutSaveFile &out); void makeSaveOS(Common::OutSaveFile &out); void makeSave(char *saveFileName); diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp index 64eee4574f..738366124c 100644 --- a/engines/cine/detection.cpp +++ b/engines/cine/detection.cpp @@ -232,16 +232,16 @@ Common::Error CineEngine::loadGameState(int slot) { return gameLoaded ? Common::kNoError : Common::kUnknownError; } -Common::Error CineEngine::saveGameState(int slot, const char *desc) { +Common::Error CineEngine::saveGameState(int slot, const Common::String &desc) { // Load savegame descriptions from index file loadSaveDirectory(); // Set description for selected slot making sure it ends with a trailing zero - strncpy(currentSaveName[slot], desc, 20); + strncpy(currentSaveName[slot], desc.c_str(), 20); currentSaveName[slot][sizeof(CommandeType) - 1] = 0; // Update savegame descriptions - Common::String indexFile = Common::String::format("%s.dir", _targetName.c_str()); + Common::String indexFile = _targetName + ".dir"; Common::OutSaveFile *fHandle = _saveFileMan->openForSaving(indexFile); if (!fHandle) { diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp index e51d07b1a5..0ea1a23e8f 100644 --- a/engines/cine/saveload.cpp +++ b/engines/cine/saveload.cpp @@ -765,7 +765,7 @@ bool CineEngine::loadPlainSaveFW(Common::SeekableReadStream &in, CineSaveGameFor return !(in.eos() || in.err()); } -bool CineEngine::makeLoad(char *saveName) { +bool CineEngine::makeLoad(const Common::String &saveName) { Common::SharedPtr<Common::InSaveFile> saveFile(_saveFileMan->openForLoading(saveName)); if (!saveFile) { |