#include <saveload.h>
Public Types | |
enum | SaveMode { kSaveModeNone, kSaveModeIgnore, kSaveModeExists, kSaveModeSave } |
Public Member Functions | |
SaveLoad (GobEngine *vm) | |
virtual SaveMode | getSaveMode (const char *fileName) const |
virtual Common::List< Common::String > | getFilesMatchingPattern (const char *pattern) const |
int32 | getSize (const char *fileName) |
bool | load (const char *fileName, int16 dataVar, int32 size, int32 offset) |
bool | loadToRaw (const char *fileName, byte *ptr, int32 size, int32 offset) |
bool | save (const char *fileName, int16 dataVar, int32 size, int32 offset) |
bool | saveFromRaw (const char *fileName, byte *ptr, int32 size, int32 offset) |
bool | copySaveGame (const char *fileNameSrc, const char *fileNameDest) |
bool | deleteFile (const char *fileName) |
Static Public Member Functions | |
static const char * | stripPath (const char *fileName, char separator='\\') |
static Common::String | replacePathSeparators (const char *path, char newSeparator) |
Protected Member Functions | |
virtual SaveHandler * | getHandler (const char *fileName) const |
virtual const char * | getDescription (const char *fileName) const |
Protected Attributes | |
GobEngine * | _vm |
A system for saving and loading.
Gob::SaveLoad::SaveLoad | ( | GobEngine * | vm | ) |
The constructor.
targetName | The game's target name. Used as a base for the save names. |
|
static |
"foo\bar\quux.bla" => "quux.bla".
|
static |
Changes all file separator characters (/,:,) in path to newSeparator
|
virtual |
Returns how to handle that file.
Reimplemented in Gob::SaveLoad_v7, Gob::SaveLoad_Playtoons, Gob::SaveLoad_v6, Gob::SaveLoad_v4, Gob::SaveLoad_Inca2, Gob::SaveLoad_v3, Gob::SaveLoad_Adibou1, Gob::SaveLoad_Fascination, Gob::SaveLoad_v2, and Gob::SaveLoad_Geisha.
|
virtual |
Returns all files known by the saving system matching a pattern.
Reimplemented in Gob::SaveLoad_v7.
int32 Gob::SaveLoad::getSize | ( | const char * | fileName | ) |
Returns the file's (virtual) size.
bool Gob::SaveLoad::load | ( | const char * | fileName, |
int16 | dataVar, | ||
int32 | size, | ||
int32 | offset | ||
) |
Loads size bytes from offset into the variables starting with dataVar.
bool Gob::SaveLoad::save | ( | const char * | fileName, |
int16 | dataVar, | ||
int32 | size, | ||
int32 | offset | ||
) |
Saves size bytes from the variables starting with data dataVar at offset.
bool Gob::SaveLoad::deleteFile | ( | const char * | fileName | ) |
Deletes the file.