diff options
| author | Thanasis Antoniou | 2019-03-21 12:12:34 +0200 |
|---|---|---|
| committer | Thanasis Antoniou | 2019-03-21 12:12:34 +0200 |
| commit | 0d10297969317118d27ecef5eeeb3721b02030fc (patch) | |
| tree | da7f94059981f7e030de411c5f1552d6a018fed8 /engines/bladerunner/slice_animations.cpp | |
| parent | 8fa1bf8cbdd516c8120d5861c20f729a07c0812e (diff) | |
| download | scummvm-rg350-0d10297969317118d27ecef5eeeb3721b02030fc.tar.gz scummvm-rg350-0d10297969317118d27ecef5eeeb3721b02030fc.tar.bz2 scummvm-rg350-0d10297969317118d27ecef5eeeb3721b02030fc.zip | |
BLADERUNNER: Handle gracefully missing HDFRAMES or required CDFRAMESx file
Diffstat (limited to 'engines/bladerunner/slice_animations.cpp')
| -rw-r--r-- | engines/bladerunner/slice_animations.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp index 5db08063b8..11ec717b3e 100644 --- a/engines/bladerunner/slice_animations.cpp +++ b/engines/bladerunner/slice_animations.cpp @@ -95,12 +95,15 @@ bool SliceAnimations::openCoreAnim() { } bool SliceAnimations::openFrames(int fileNumber) { + if (_framesPageFile._fileNumber == -1) { // Running for the first time, need to probe // First, try HDFRAMES.DAT if (_framesPageFile.open("HDFRAMES.DAT")) { _framesPageFile._fileNumber = 0; return true; + } else { + warning("SliceAnimations::openFrames: HDFRAMES.DAT resource not found. Falling back to using CDFRAMESx.DAT files instead..."); } } @@ -114,10 +117,14 @@ bool SliceAnimations::openFrames(int fileNumber) { _framesPageFile._fileNumber = fileNumber; - if (fileNumber == 1 && _framesPageFile.open("CDFRAMES.DAT")) // For Chapter1 we try both CDFRAMES.DAT and CDFRAMES1.DAT + if (fileNumber == 1 && _framesPageFile.open("CDFRAMES.DAT")) {// For Chapter1 we try both CDFRAMES.DAT and CDFRAMES1.DAT return true; + } - return _framesPageFile.open(Common::String::format("CDFRAMES%d.DAT", fileNumber)); + if (_framesPageFile.open(Common::String::format("CDFRAMES%d.DAT", fileNumber))) { + return true; + } + return false; } bool SliceAnimations::PageFile::open(const Common::String &name) { |
