diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/file.cpp | 6 | ||||
-rw-r--r-- | engines/pink/file.h | 10 | ||||
-rw-r--r-- | engines/pink/pink.cpp | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/engines/pink/file.cpp b/engines/pink/file.cpp index f14d459049..17968d36ea 100644 --- a/engines/pink/file.cpp +++ b/engines/pink/file.cpp @@ -122,7 +122,7 @@ void OrbFile::seekToObject(const char *name) { seek(desc->objectsOffset); } -bool BroFile::open(const Common::String &name, uint32 orbTimestamp) { +bool BroFile::open(const Common::String &name) { if (!File::open(name) || readUint32BE() != 'BRO\0') return false; @@ -132,9 +132,9 @@ bool BroFile::open(const Common::String &name, uint32 orbTimestamp) { if (major != kBroMajorVersion || minor != kBroMinorVersion) return false; - uint32 timestamp = readUint32LE(); + _timestamp = readUint32LE(); - return timestamp == orbTimestamp; + return true; } } // End of namespace Pink diff --git a/engines/pink/file.h b/engines/pink/file.h index 9901a67256..611ef31391 100644 --- a/engines/pink/file.h +++ b/engines/pink/file.h @@ -52,8 +52,8 @@ class Object; class OrbFile : public Common::File { public: OrbFile(); - virtual ~OrbFile(); - virtual bool open(const Common::String &name); + ~OrbFile(); + bool open(const Common::String &name) override; public: void loadGame(PinkEngine *game); @@ -76,7 +76,11 @@ private: class BroFile : public Common::File { public: - bool open(const Common::String &name, uint32 orbTimestamp); + bool open(const Common::String &name); + uint32 getTimestamp() { return _timestamp; } + +private: + uint32 _timestamp; }; } // End of namespace Pink diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp index 1337edc4da..71b42c303f 100644 --- a/engines/pink/pink.cpp +++ b/engines/pink/pink.cpp @@ -79,7 +79,7 @@ Common::Error PinkEngine::init() { else debug("This game doesn't need to use bro"); - if (!_orb.open(orbName) || (_bro && !_bro->open(broName, _orb.getTimestamp()))) + if (!_orb.open(orbName) || (_bro && !_bro->open(broName) && _orb.getTimestamp() == _bro->getTimestamp())) return Common::kNoGameDataFoundError; if (!loadCursors()) |