[Scummvm-git-logs] scummvm master -> 8276404d23ef177cafd6164b949a9ce6940ba169

npjg nathanael.gentrydb8 at gmail.com
Fri Jul 10 03:59:37 UTC 2020


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:
8276404d23 DIRECTOR: Reorganize dirty channel conditions


Commit: 8276404d23ef177cafd6164b949a9ce6940ba169
    https://github.com/scummvm/scummvm/commit/8276404d23ef177cafd6164b949a9ce6940ba169
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-09T23:58:48-04:00

Commit Message:
DIRECTOR: Reorganize dirty channel conditions

A condition is also added for stretch of sprite location updates

Changed paths:
    engines/director/channel.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 4ce3d15194..6adf709edd 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -108,15 +108,20 @@ bool Channel::isDirty(Sprite *nextSprite) {
 	// When a sprite is puppeted setTheSprite ensures that the dirty flag here is
 	// set. Otherwise, we need to rerender when the position, bounding box, or
 	// cast of the sprite changes.
+	if (!nextSprite)
+		return false;
+
 	bool isDirty = _dirty ||
 		_delta != Common::Point(0, 0) ||
+		_sprite->_castId != nextSprite->_castId ||
+		_sprite->_ink != nextSprite->_ink ||
 		(_sprite->_cast && _sprite->_cast->isModified());
 
-	if (nextSprite) {
-		isDirty |= _sprite->_castId != nextSprite->_castId ||
-			_sprite->_ink != nextSprite->_ink ||
-			(_currentPoint != nextSprite->_startPoint &&
-			 !_sprite->_puppet && !_sprite->_moveable);
+	if (!_sprite->_puppet) {
+		if (!_sprite->_moveable)
+			isDirty |= _currentPoint != nextSprite->_startPoint;
+		if (!_sprite->_stretch)
+			isDirty |= _width != nextSprite->_width || _height != nextSprite->_height;
 	}
 
 	return isDirty;




More information about the Scummvm-git-logs mailing list