diff options
author | Thanasis Antoniou | 2019-03-22 01:28:41 +0200 |
---|---|---|
committer | Thanasis Antoniou | 2019-03-22 01:29:44 +0200 |
commit | 14b03594c9d4022c2dc621adb9f0a9dad3d630dd (patch) | |
tree | 6c69a26c14d237808b9d653b5632d16d6170724d | |
parent | 2afb6e185dec0d9f1f71cf5078c740ed531251e6 (diff) | |
download | scummvm-rg350-14b03594c9d4022c2dc621adb9f0a9dad3d630dd.tar.gz scummvm-rg350-14b03594c9d4022c2dc621adb9f0a9dad3d630dd.tar.bz2 scummvm-rg350-14b03594c9d4022c2dc621adb9f0a9dad3d630dd.zip |
BLADERUNNER: Rephrasing of if clause sequence in getFramePtr()
-rw-r--r-- | engines/bladerunner/slice_animations.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp index 11ec717b3e..1b2c2e209b 100644 --- a/engines/bladerunner/slice_animations.cpp +++ b/engines/bladerunner/slice_animations.cpp @@ -204,14 +204,17 @@ void *SliceAnimations::getFramePtr(uint32 animation, uint32 frame) { uint32 page = frameOffset / _pageSize; uint32 pageOffset = frameOffset % _pageSize; - if (!_pages[page]._data) - _pages[page]._data = _coreAnimPageFile.loadPage(page); + if (_pages[page]._data == nullptr) { // if not cached already + _pages[page]._data = _coreAnimPageFile.loadPage(page); // look in COREANIM first - if (!_pages[page]._data) - _pages[page]._data = _framesPageFile.loadPage(page); + if (_pages[page]._data == nullptr) { // if not in COREAMIM + _pages[page]._data = _framesPageFile.loadPage(page); // Look in CDFRAMES or HDFRAMES loaded data - if (!_pages[page]._data) - error("Unable to locate page %d for animation %d frame %d", page, animation, frame); + if (_pages[page]._data == nullptr) { + error("Unable to locate page %d for animation %d frame %d", page, animation, frame); + } + } + } _pages[page]._lastAccess = _vm->_time->currentSystem(); |