From 902a140f3e8058c582496296c7c1e0c55b243dda Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 3 Jul 2014 00:13:33 +0300 Subject: SCUMM: Add support for Steam versions of Indy 3, Indy 4, Loom and Dig Many Thanks to Ben Castricum for the original patch --- engines/scumm/file.h | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'engines/scumm/file.h') diff --git a/engines/scumm/file.h b/engines/scumm/file.h index d6dbc06ddc..f3eaac5d32 100644 --- a/engines/scumm/file.h +++ b/engines/scumm/file.h @@ -53,7 +53,7 @@ public: }; class ScummFile : public BaseScummFile { -private: +protected: int32 _subFileStart; int32 _subFileLen; bool _myEos; // Have we read past the end of the subfile? @@ -64,7 +64,7 @@ private: public: ScummFile(); - bool open(const Common::String &filename); + virtual bool open(const Common::String &filename); bool openSubFile(const Common::String &filename); void clearErr() { _myEos = false; BaseScummFile::clearErr(); } @@ -76,6 +76,18 @@ public: uint32 read(void *dataPtr, uint32 dataSize); }; +class ScummSteamFile : public ScummFile { +private: + GameSettings _steamGame; + + bool openWithSubRange(const Common::String &filename, int32 subFileStart, int32 subFileLen); + +public: + ScummSteamFile(GameSettings game) : ScummFile(), _steamGame(game) {} + + bool open(const Common::String &filename); +}; + class ScummDiskImage : public BaseScummFile { private: Common::SeekableReadStream *_stream; @@ -120,6 +132,18 @@ public: uint32 read(void *dataPtr, uint32 dataSize); }; +struct SteamIndexFile { + byte id; + Common::Platform platform; + const char *pattern; + const char *indexFileName; + const char *executableName; + int32 start; + int32 len; +}; + +extern const SteamIndexFile steamIndexFiles[]; + } // End of namespace Scumm #endif -- cgit v1.2.3