25 #include "common/file.h" 26 #include "common/stream.h" 28 #include "scumm/detection.h" 44 void setEnc(byte value) { _encbyte = value; }
47 virtual bool openSubFile(
const Common::Path &filename) = 0;
50 int64
pos()
const override = 0;
51 int64
size()
const override = 0;
52 bool seek(int64 offs,
int whence = SEEK_SET)
override = 0;
56 bool isOpen()
const {
return !!_baseStream; }
60 virtual bool eos()
const = 0;
61 virtual uint32
read(
void *dataPtr, uint32 dataSize) = 0;
74 void setSubfileRange(int64 start, int32 len);
85 bool eos()
const override;
86 int64
pos()
const override;
87 int64
size()
const override;
88 bool seek(int64 offs,
int whence = SEEK_SET)
override;
89 uint32
read(
void *dataPtr, uint32 dataSize)
override;
97 byte _roomDisks[59] = {}, _roomTracks[59] = {}, _roomSectors[59] = {};
106 int _numGlobalObjects = 0;
108 int _numCostumes = 0;
111 const int *_resourcesPerFile;
113 bool openDisk(
char num);
115 bool generateIndex();
116 bool generateResource(
int res);
122 uint16 fileReadUint16LE();
128 bool openSubFile(
const Common::Path &filename)
override;
130 void close()
override;
131 bool eos()
const override {
return _stream->
eos(); }
132 int64
pos()
const override {
return _stream->
pos(); }
133 int64
size()
const override {
return _stream->
size(); }
134 bool seek(int64 offs,
int whence = SEEK_SET)
override {
return _stream->
seek(offs, whence); }
135 uint32
read(
void *dataPtr, uint32 dataSize)
override;
142 const char *indexFileName;
143 const char *executableName;
150 class ScummSteamFile :
public ScummFile {
154 bool openWithSubRange(
const Common::Path &filename, int32 subFileStart, int32 subFileLen);
168 class ScummPAKFile :
public ScummFile {
170 PAKFileHashMap _pakIndex;
172 void readIndex(
const Common::Path &containerFile,
bool isFT);
175 ScummPAKFile(
const ScummEngine *vm,
bool indexFiles =
true);
176 ~ScummPAKFile()
override { _pakIndex.clear(); }
178 bool openSubFile(
const Common::Path &filePath)
override;
180 void setPAKFileIndex(
Common::String fileName,
const PAKFile &pakFile);
bool eos() const override
Definition: file.h:131
bool seek(int64 offs, int whence=SEEK_SET) override
Definition: file.h:134
virtual int64 size() const =0
virtual int64 pos() const =0
int64 size() const override
Definition: file.h:133
int64 pos() const override
Definition: file.h:132
virtual bool seek(int64 offset, int whence=SEEK_SET)=0
virtual void clearErr()
Definition: stream.h:71
virtual bool eos() const =0
int64 size() const override=0
Definition: detection.h:45
bool seek(int64 offs, int whence=SEEK_SET) override=0
int64 pos() const override=0
virtual uint32 read(void *dataPtr, uint32 dataSize)=0