diff options
author | Max Horn | 2005-04-10 15:13:40 +0000 |
---|---|---|
committer | Max Horn | 2005-04-10 15:13:40 +0000 |
commit | e79c168d35d9c3633e3dfb618bd05466b0efc307 (patch) | |
tree | fe4fa01fd852546eaa3229f62069109d98eb8a67 /queen/queen.cpp | |
parent | e03861fdd4ca4cb676788c4ae4ea19647107fd6b (diff) | |
download | scummvm-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 'queen/queen.cpp')
-rw-r--r-- | queen/queen.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/queen/queen.cpp b/queen/queen.cpp index 70f2f038cd..4a3f045a4d 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -252,7 +252,7 @@ void QueenEngine::saveGameState(uint16 slot, const char *desc) { debug(3, "Saving game to slot %d", slot); char name[20]; makeGameStateName(slot, name); - SaveFile *file = _saveFileMan->openSavefile(name, true); + OutSaveFile *file = _saveFileMan->openForSaving(name); if (file) { // save data byte *saveData = new byte[30000]; @@ -287,7 +287,7 @@ void QueenEngine::saveGameState(uint16 slot, const char *desc) { void QueenEngine::loadGameState(uint16 slot) { debug(3, "Loading game from slot %d", slot); GameStateHeader header; - SaveFile *file = readGameStateHeader(slot, &header); + InSaveFile *file = readGameStateHeader(slot, &header); if (file && header.dataSize != 0) { byte *saveData = new byte[header.dataSize]; byte *p = saveData; @@ -308,10 +308,10 @@ void QueenEngine::loadGameState(uint16 slot) { } } -SaveFile *QueenEngine::readGameStateHeader(uint16 slot, GameStateHeader *gsh) { +InSaveFile *QueenEngine::readGameStateHeader(uint16 slot, GameStateHeader *gsh) { char name[20]; makeGameStateName(slot, name); - SaveFile *file = _saveFileMan->openSavefile(name, false); + InSaveFile *file = _saveFileMan->openForLoading(name); if (file && file->readUint32BE() == 'SCVM') { gsh->version = file->readUint32BE(); gsh->flags = file->readUint32BE(); @@ -340,7 +340,7 @@ void QueenEngine::findGameStateDescriptions(char descriptions[100][32]) { for (int i = 0; i < SAVESTATE_MAX; ++i) { if (marks[i]) { GameStateHeader header; - SaveFile *f = readGameStateHeader(i, &header); + InSaveFile *f = readGameStateHeader(i, &header); strcpy(descriptions[i], header.description); delete f; } |