diff options
author | whiterandrek | 2018-06-20 14:00:05 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 48a001648e47c287e7e8229f11c88b6c73d73cbe (patch) | |
tree | 2322a59bfe9418240074da505633a316a822d910 | |
parent | fc57a968187d5b0b50a9ee1d4aa257df676fb23e (diff) | |
download | scummvm-rg350-48a001648e47c287e7e8229f11c88b6c73d73cbe.tar.gz scummvm-rg350-48a001648e47c287e7e8229f11c88b6c73d73cbe.tar.bz2 scummvm-rg350-48a001648e47c287e7e8229f11c88b6c73d73cbe.zip |
PINK: remove hidden overloaded virtual function
-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()) |