22 #ifndef __FRAMFS_SAVE_MANAGER__ 23 #define __FRAMFS_SAVE_MANAGER__ 25 #include <common/savefile.h> 26 #include <common/compression/deflate.h> 30 bool fram_deleteSaveGame(
const char *filename);
36 uint32 read(
void *buf, uint32 cnt)
override;
37 bool skip(uint32 offset)
override;
38 bool seek(int64 offs,
int whence)
override;
48 bool eos()
const override {
49 return framfs_eof(fd);
54 int64
pos()
const override {
55 return framfs_tell(fd);
57 int64
size()
const override {
61 bool readSaveGame(
const char *filename) {
62 fd = framfs_open(filename,
"r");
72 uint32 write(
const void *buf, uint32 cnt);
73 virtual int64
pos()
const {
74 return framfs_tell(fd);
78 fd = framfs_open(_filename,
"w");
90 return (framfs_error(fd) == 1);
112 if (s->readSaveGame(filename.c_str())) {
132 if (s->readSaveGame(filename.c_str())) {
141 return ::fram_deleteSaveGame(filename.c_str());
147 return InFRAMSave().readSaveGame(filename.c_str());
void clearErr() override
Definition: framfs_save_manager.h:51
SeekableReadStream * wrapCompressedReadStream(SeekableReadStream *toBeWrapped, DisposeAfterUse::Flag disposeParent=DisposeAfterUse::YES, uint64 knownSize=0)
int64 size() const override
Definition: framfs_save_manager.h:57
Definition: savefile.h:54
WriteStream * wrapCompressedWriteStream(WriteStream *toBeWrapped)
Common::OutSaveFile * openForSaving(const Common::String &filename, bool compress=true) override
Definition: framfs_save_manager.h:120
bool removeSavefile(const Common::String &filename) override
Definition: framfs_save_manager.h:140
Definition: framfs_save_manager.h:67
Common::InSaveFile * openForLoading(const Common::String &filename) override
Definition: framfs_save_manager.h:130
Definition: framfs_save_manager.h:102
bool eos() const override
Definition: framfs_save_manager.h:48
void clearErr()
Definition: framfs_save_manager.h:94
void updateSavefilesList(Common::StringArray &lockedFiles) override
Definition: framfs_save_manager.h:104
bool err() const
Definition: framfs_save_manager.h:88
virtual int64 pos() const
Definition: framfs_save_manager.h:73
bool exists(const Common::String &filename) override
Definition: framfs_save_manager.h:146
Definition: savefile.h:142
int64 pos() const override
Definition: framfs_save_manager.h:54
Common::InSaveFile * openRawFile(const Common::String &filename) override
Definition: framfs_save_manager.h:110
Definition: framfs_save_manager.h:32
void finalize()
Definition: framfs_save_manager.h:97