aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorMax Horn2005-04-10 15:13:40 +0000
committerMax Horn2005-04-10 15:13:40 +0000
commite79c168d35d9c3633e3dfb618bd05466b0efc307 (patch)
treefe4fa01fd852546eaa3229f62069109d98eb8a67 /sword2
parente03861fdd4ca4cb676788c4ae4ea19647107fd6b (diff)
downloadscummvm-rg350-e79c168d35d9c3633e3dfb618bd05466b0efc307.tar.gz
scummvm-rg350-e79c168d35d9c3633e3dfb618bd05466b0efc307.tar.bz2
scummvm-rg350-e79c168d35d9c3633e3dfb618bd05466b0efc307.zip
split SaveFileManager::openSavefile and class SaveFile into two, each, one for loading and one for saving
svn-id: r17517
Diffstat (limited to 'sword2')
-rw-r--r--sword2/save_rest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/sword2/save_rest.cpp b/sword2/save_rest.cpp
index fc159faf2a..610b50435d 100644
--- a/sword2/save_rest.cpp
+++ b/sword2/save_rest.cpp
@@ -183,9 +183,9 @@ uint32 Sword2Engine::saveData(uint16 slotNo, byte *buffer, uint32 bufferSize) {
sprintf(saveFileName, "%s.%.3d", _targetName.c_str(), slotNo);
- SaveFile *out;
+ OutSaveFile *out;
- if (!(out = _saveFileMan->openSavefile(saveFileName, true))) {
+ if (!(out = _saveFileMan->openForSaving(saveFileName))) {
return SR_ERR_FILEOPEN;
}
@@ -261,9 +261,9 @@ uint32 Sword2Engine::restoreData(uint16 slotNo, byte *buffer, uint32 bufferSize)
sprintf(saveFileName, "%s.%.3d", _targetName.c_str(), slotNo);
- SaveFile *in;
+ InSaveFile *in;
- if (!(in = _saveFileMan->openSavefile(saveFileName, false))) {
+ if (!(in = _saveFileMan->openForLoading(saveFileName))) {
// error: couldn't open file
return SR_ERR_FILEOPEN;
}
@@ -405,9 +405,9 @@ uint32 Sword2Engine::getSaveDescription(uint16 slotNo, byte *description) {
sprintf(saveFileName, "%s.%.3d", _targetName.c_str(), slotNo);
- SaveFile *in;
+ InSaveFile *in;
- if (!(in = _saveFileMan->openSavefile(saveFileName, false))) {
+ if (!(in = _saveFileMan->openForLoading(saveFileName))) {
return SR_ERR_FILEOPEN;
}
@@ -432,9 +432,9 @@ bool Sword2Engine::saveExists(uint16 slotNo) {
sprintf(saveFileName, "%s.%.3d", _targetName.c_str(), slotNo);
- SaveFile *in;
+ InSaveFile *in;
- if (!(in = _saveFileMan->openSavefile(saveFileName, false))) {
+ if (!(in = _saveFileMan->openForLoading(saveFileName))) {
return false;
}