[Scummvm-cvs-logs] scummvm master -> 26a5efe6e84559ebbbb5fe109a4e18eec22b938a

wjp wjp at usecode.org
Sun Feb 21 12:55:58 CET 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3c3b7ec13d SCI: Skip NULL entries in FindByObject
26a5efe6e8 SCI: Fix redrawAll updating visiblePlanes


Commit: 3c3b7ec13d0c4fea3b335c989033042544ab39eb
    https://github.com/scummvm/scummvm/commit/3c3b7ec13d0c4fea3b335c989033042544ab39eb
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-02-21T12:51:31+01:00

Commit Message:
SCI: Skip NULL entries in FindByObject

Lists can contain gaps if they're searched before Pack() is called.

Changed paths:
    engines/sci/graphics/lists32.h



diff --git a/engines/sci/graphics/lists32.h b/engines/sci/graphics/lists32.h
index f745a2c..bb990e1 100644
--- a/engines/sci/graphics/lists32.h
+++ b/engines/sci/graphics/lists32.h
@@ -184,7 +184,7 @@ class FindByObject {
 public:
 	FindByObject(const reg_t &object) : _object(object) {}
 	bool operator()(const T entry) const {
-		return entry->_object == _object;
+		return entry && entry->_object == _object;
 	}
 };
 


Commit: 26a5efe6e84559ebbbb5fe109a4e18eec22b938a
    https://github.com/scummvm/scummvm/commit/26a5efe6e84559ebbbb5fe109a4e18eec22b938a
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-02-21T12:52:25+01:00

Commit Message:
SCI: Fix redrawAll updating visiblePlanes

It was comparing ScreenItem*'s directly, instead of objects.

Changed paths:
    engines/sci/graphics/plane32.cpp



diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp
index 40cb565..b7dca14 100644
--- a/engines/sci/graphics/plane32.cpp
+++ b/engines/sci/graphics/plane32.cpp
@@ -476,7 +476,7 @@ void Plane::decrementScreenItemArrayCounts(Plane *visiblePlane, const bool force
 				(
 					forceUpdate &&
 					visiblePlane != nullptr &&
-					Common::find(visiblePlane->_screenItemList.begin(), visiblePlane->_screenItemList.end(), item) != visiblePlane->_screenItemList.end()
+					visiblePlane->_screenItemList.findByObject(item->_object) != 0
 				)
 			) {
 				*visiblePlane->_screenItemList[i] = *_screenItemList[i];






More information about the Scummvm-git-logs mailing list