aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorMax Horn2009-05-29 14:38:22 +0000
committerMax Horn2009-05-29 14:38:22 +0000
commitfb79b185717c9aae7c793e7f07d5d6b94aec4abf (patch)
tree6df973c3f64d5712d6df36caa0af30b6b6012561 /engines/kyra
parent518e005ec27ef323275b364a3cd16d24d7491674 (diff)
downloadscummvm-rg350-fb79b185717c9aae7c793e7f07d5d6b94aec4abf.tar.gz
scummvm-rg350-fb79b185717c9aae7c793e7f07d5d6b94aec4abf.tar.bz2
scummvm-rg350-fb79b185717c9aae7c793e7f07d5d6b94aec4abf.zip
Changed SaveFileManager methods to take Common::String params (instead of char pointers)
svn-id: r41000
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/detection.cpp8
-rw-r--r--engines/kyra/gui.cpp2
-rw-r--r--engines/kyra/gui_v2.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 7c1280cfde..364c856b67 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -1192,7 +1192,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
pattern += ".???";
Common::StringList filenames;
- filenames = saveFileMan->listSavefiles(pattern.c_str());
+ filenames = saveFileMan->listSavefiles(pattern);
Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
@@ -1201,7 +1201,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
int slotNum = atoi(file->c_str() + file->size() - 3);
if (slotNum >= 0 && slotNum <= 999) {
- Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
+ Common::InSaveFile *in = saveFileMan->openForLoading(*file);
if (in) {
if (Kyra::KyraEngine_v1::readSaveHeader(in, false, header) == Kyra::KyraEngine_v1::kRSHENoError) {
// Workaround for old savegames using 'German' as description for kyra3 start savegame (slot 0)
@@ -1226,12 +1226,12 @@ void KyraMetaEngine::removeSaveState(const char *target, int slot) const {
return;
Common::String filename = Kyra::KyraEngine_v1::getSavegameFilename(target, slot);
- g_system->getSavefileManager()->removeSavefile(filename.c_str());
+ g_system->getSavefileManager()->removeSavefile(filename);
}
SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
Common::String filename = Kyra::KyraEngine_v1::getSavegameFilename(target, slot);
- Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
+ Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename);
if (in) {
Kyra::KyraEngine_v1::SaveHeader header;
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index f2661ab4b4..faea2c9a72 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -298,7 +298,7 @@ int GUI::redrawShadedButtonCallback(Button *button) {
void GUI::updateSaveList() {
Common::String pattern = _vm->_targetName + ".???";
- Common::StringList saveFileList = _vm->_saveFileMan->listSavefiles(pattern.c_str());
+ Common::StringList saveFileList = _vm->_saveFileMan->listSavefiles(pattern);
_saveSlots.clear();
for (Common::StringList::const_iterator i = saveFileList.begin(); i != saveFileList.end(); ++i) {
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index ed3082c727..7e3d2b5afb 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -727,7 +727,7 @@ int GUI_v2::deleteMenu(Button *caller) {
break;
Common::String oldName = _vm->getSavegameFilename(*i);
Common::String newName = _vm->getSavegameFilename(*i-1);
- _vm->_saveFileMan->renameSavefile(oldName.c_str(), newName.c_str());
+ _vm->_saveFileMan->renameSavefile(oldName, newName);
}
_saveMenu.menuNameId = _vm->gameFlags().isTalkie ? 9 : 17;
return 0;