diff options
author | Paul Gilbert | 2018-02-22 19:40:22 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-23 15:23:20 -0500 |
commit | bb19a6c771396e415e5007968ae843d220a5f2e5 (patch) | |
tree | 69ad667351ca72ef2e0fd15781856a9791067c25 /engines/xeen/files.cpp | |
parent | 2f6ca8f45ec6ef8bf86adc3ab60346fa9d14f6a9 (diff) | |
download | scummvm-rg350-bb19a6c771396e415e5007968ae843d220a5f2e5.tar.gz scummvm-rg350-bb19a6c771396e415e5007968ae843d220a5f2e5.tar.bz2 scummvm-rg350-bb19a6c771396e415e5007968ae843d220a5f2e5.zip |
XEEN: Add custom maze to the create_xeen tool
This could be used as an example of how other new maps could be
added in the future, and it also gives people a cool result if
they try typing 'ScummVM' into the teleport mirror
Diffstat (limited to 'engines/xeen/files.cpp')
-rw-r--r-- | engines/xeen/files.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp index 2ba3b6f993..a424bd510b 100644 --- a/engines/xeen/files.cpp +++ b/engines/xeen/files.cpp @@ -328,7 +328,11 @@ bool File::open(const Common::String &filename, int ccMode) { int oldMode = files._isDarkCc ? 1 : 0; files.setGameCc(ccMode); - File::open(filename, *_currentArchive); + if (File::exists(filename, *_currentArchive)) + File::open(filename, *_currentArchive); + else + File::open(filename); + files.setGameCc(oldMode); return true; @@ -390,6 +394,10 @@ bool File::exists(const Common::String &filename, int ccMode) { return result; } +bool File::exists(const Common::String &filename, Common::Archive &archive) { + return archive.hasFile(filename); +} + void File::syncBitFlags(Common::Serializer &s, bool *startP, bool *endP) { byte data = 0; |