From e79c168d35d9c3633e3dfb618bd05466b0efc307 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 10 Apr 2005 15:13:40 +0000 Subject: split SaveFileManager::openSavefile and class SaveFile into two, each, one for loading and one for saving svn-id: r17517 --- sword2/save_rest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sword2') 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; } -- cgit v1.2.3