[Scummvm-git-logs] scummvm master -> 14b03594c9d4022c2dc621adb9f0a9dad3d630dd
antoniou79
antoniou at cti.gr
Fri Mar 22 00:30:03 CET 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
14b03594c9 BLADERUNNER: Rephrasing of if clause sequence in getFramePtr()
Commit: 14b03594c9d4022c2dc621adb9f0a9dad3d630dd
https://github.com/scummvm/scummvm/commit/14b03594c9d4022c2dc621adb9f0a9dad3d630dd
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-03-22T01:29:44+02:00
Commit Message:
BLADERUNNER: Rephrasing of if clause sequence in getFramePtr()
Changed paths:
engines/bladerunner/slice_animations.cpp
diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp
index 11ec717..1b2c2e2 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();
More information about the Scummvm-git-logs
mailing list