22 #ifndef __PAKFS_SAVE_MANAGER__ 23 #define __PAKFS_SAVE_MANAGER__ 25 #include <common/savefile.h> 26 #include <common/compression/deflate.h> 30 bool pakfs_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 {
54 int64
pos()
const override {
55 return pakfs_tell(fd);
57 int64
size()
const override {
61 bool readSaveGame(
const char *filename) {
62 fd = pakfs_open(filename,
"r");
72 uint32 write(
const void *buf, uint32 cnt);
74 virtual int64
pos()
const {
75 return pakfs_tell(fd);
79 fd = pakfs_open(_filename,
"w");
86 flushCurrentPakData();
92 return (pakfs_error(fd) == 1);
114 if (s->readSaveGame(filename.c_str())) {
134 if (s->readSaveGame(filename.c_str())) {
143 return ::pakfs_deleteSaveGame(filename.c_str());
149 return InPAKSave().readSaveGame(filename.c_str());
SeekableReadStream * wrapCompressedReadStream(SeekableReadStream *toBeWrapped, DisposeAfterUse::Flag disposeParent=DisposeAfterUse::YES, uint64 knownSize=0)
Definition: pakfs_save_manager.h:67
Definition: pakfs_save_manager.h:32
Definition: savefile.h:54
WriteStream * wrapCompressedWriteStream(WriteStream *toBeWrapped)
Common::InSaveFile * openForLoading(const Common::String &filename) override
Definition: pakfs_save_manager.h:132
virtual int64 pos() const
Definition: pakfs_save_manager.h:74
void clearErr() override
Definition: pakfs_save_manager.h:51
bool removeSavefile(const Common::String &filename) override
Definition: pakfs_save_manager.h:142
Common::OutSaveFile * openForSaving(const Common::String &filename, bool compress=true) override
Definition: pakfs_save_manager.h:122
void clearErr()
Definition: pakfs_save_manager.h:96
int64 size() const override
Definition: pakfs_save_manager.h:57
bool exists(const Common::String &filename) override
Definition: pakfs_save_manager.h:148
void finalize()
Definition: pakfs_save_manager.h:99
bool eos() const override
Definition: pakfs_save_manager.h:48
bool err() const
Definition: pakfs_save_manager.h:90
Definition: pakfs_save_manager.h:104
Common::InSaveFile * openRawFile(const Common::String &filename) override
Definition: pakfs_save_manager.h:112
Definition: savefile.h:142
int64 pos() const override
Definition: pakfs_save_manager.h:54
void updateSavefilesList(Common::StringArray &lockedFiles) override
Definition: pakfs_save_manager.h:106