diff options
author | Torbjörn Andersson | 2003-09-20 17:48:53 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-09-20 17:48:53 +0000 |
commit | ffce9177d001c7bb033a4bc1b8393ff231b6c144 (patch) | |
tree | d9776e6a5e29806560e18edb52e713f466268cdc /sword2/save_rest.h | |
parent | 588af50cd6141066780e2a03da87734aec826077 (diff) | |
download | scummvm-rg350-ffce9177d001c7bb033a4bc1b8393ff231b6c144.tar.gz scummvm-rg350-ffce9177d001c7bb033a4bc1b8393ff231b6c144.tar.bz2 scummvm-rg350-ffce9177d001c7bb033a4bc1b8393ff231b6c144.zip |
The usual cleanup, plus make sure to delete SaveFileManager if
open_savefile() fails.
svn-id: r10339
Diffstat (limited to 'sword2/save_rest.h')
-rw-r--r-- | sword2/save_rest.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/sword2/save_rest.h b/sword2/save_rest.h index 1d06b998cd..78c6899b6c 100644 --- a/sword2/save_rest.h +++ b/sword2/save_rest.h @@ -20,29 +20,38 @@ #ifndef SAVE_REST_H #define SAVE_REST_H - -//#include "src\driver96.h" #include "memory.h" #define SAVE_DESCRIPTION_LEN 64 -uint32 SaveGame(uint16 slotNo, uint8 *description); -uint32 RestoreGame(uint16 slotNo); -uint32 GetSaveDescription(uint16 slotNo, uint8 *description); -bool SaveExists(uint16 slotNo); -void FillSaveBuffer(mem *buffer, uint32 size, uint8 *desc); -uint32 RestoreFromBuffer(mem *buffer, uint32 size); -uint32 FindBufferSize( void ); - +uint32 SaveGame(uint16 slotNo, uint8 *description); +uint32 RestoreGame(uint16 slotNo); +uint32 GetSaveDescription(uint16 slotNo, uint8 *description); +bool SaveExists(uint16 slotNo); +void FillSaveBuffer(mem *buffer, uint32 size, uint8 *desc); +uint32 RestoreFromBuffer(mem *buffer, uint32 size); +uint32 FindBufferSize(void); // Save & Restore error codes -// ERROR CODE VALUE MEANING REASON -// ========== ===== ======= ====== -#define SR_OK 0x00000000 // ok No worries -#define SR_ERR_FILEOPEN 0x00000001 // can't open file Could create file for saving, or couldn't find file for loading -#define SR_ERR_INCOMPATIBLE 0x00000002 // (RestoreGame only) incompatible savegame data Savegame file is obsolete. (Won't happen after development stops) -#define SR_ERR_READFAIL 0x00000003 // (RestoreGame only) failed on reading savegame file Something screwed up during the fread() -#define SR_ERR_WRITEFAIL 0x00000004 // (SaveGame only) failed on writing savegame file Something screwed up during the fwrite() - could be hard-drive full..? +#define SR_OK 0x00000000 // No worries +#define SR_ERR_FILEOPEN 0x00000001 // can't open file - Couldn't + // create file for saving, or + // couldn't find file for + // loading. +#define SR_ERR_INCOMPATIBLE 0x00000002 // (RestoreGame only) + // incompatible savegame data. + // Savegame file is obsolete. + // (Won't happen after + // development stops) +#define SR_ERR_READFAIL 0x00000003 // (RestoreGame only) failed on + // reading savegame file - + // Something screwed up during + // the fread() +#define SR_ERR_WRITEFAIL 0x00000004 // (SaveGame only) failed on + // writing savegame file - + // Something screwed up during + // the fwrite() - could be + // hard-drive full..? #endif |