22 #ifndef SCI_ENGINE_FILE_H 23 #define SCI_ENGINE_FILE_H 25 #include "common/memstream.h" 26 #include "common/str-array.h" 27 #include "common/stream.h" 32 kFileOpenModeOpenOrCreate = 0,
33 kFileOpenModeOpenOrFail = 1,
34 kFileOpenModeCreate = 2
52 kMaxShiftedSaveId = 99
56 kVirtualFileHandleStart = 32000,
57 kVirtualFileHandleSci32Save = 32100,
58 kVirtualFileHandleSciAudio = 32300,
59 kVirtualFileHandleEnd = 32300
74 uint32 gameObjectOffset;
108 _outbuffer = NULL_REG;
109 _iter = _files.
begin();
128 MemoryDynamicRWStream(DisposeAfterUse::Flag disposeMemory = DisposeAfterUse::NO) : MemoryWriteStreamDynamic(disposeMemory), _eos(
false) { }
130 uint32 read(
void *dataPtr, uint32 dataSize)
override;
132 bool eos()
const override {
return _eos; }
133 int64 pos()
const override {
return _pos; }
134 int64 size()
const override {
return _size; }
147 class SaveFileRewriteStream :
public MemoryDynamicRWStream {
151 kFileOpenMode mode,
bool compress);
152 ~SaveFileRewriteStream()
override;
154 uint32 write(
const void *dataPtr, uint32 dataSize)
override { _changed =
true;
return MemoryDynamicRWStream::write(dataPtr, dataSize); }
169 int fgets_wrapper(
EngineState *s,
char *dest,
int maxsize,
int handle);
181 int shiftSciToScummVMSaveId(
int saveId);
182 int shiftScummVMToSciSaveId(
int saveId);
187 #endif // SCI_ENGINE_FILE_H
virtual void clearErr()
Definition: stream.h:71
iterator begin()
Definition: array.h:374
Definition: memstream.h:194
bool seek(int64 offs, int whence=SEEK_SET) override
Definition: memstream.h:254
The save game slot number for autosaves.
Definition: file.h:43
The save game slot number for a "new game" save.
Definition: file.h:44
Definition: memstream.h:43
Definition: seg_manager.h:48
Maximum number of savegames.
Definition: file.h:39
Maximum length of a savegame name (excluding terminator character)
Definition: file.h:38
Definition: vm_types.h:39