[Scummvm-git-logs] scummvm master -> 6acba833de9ae202ac3dec05264d87b172649d3a

sev- noreply at scummvm.org
Sat Jul 1 14:39:48 UTC 2023


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:
6acba833de DIRECTOR: Properly fix `set rect of sprite`


Commit: 6acba833de9ae202ac3dec05264d87b172649d3a
    https://github.com/scummvm/scummvm/commit/6acba833de9ae202ac3dec05264d87b172649d3a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-07-01T16:39:35+02:00

Commit Message:
DIRECTOR: Properly fix `set rect of sprite`

We used to check against puppet: wrong, it even gets autopuppeted
We used to check against stretch: wrong, we just do not stretch the sprite

This properly fixes cursors in devo and darkeye without disabling setting
the rect property.

See commit 18f140ef91b29d3aa6397be5765b05e9fe467363

Changed paths:
    engines/director/channel.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 80f9bc521e6..21381e3d370 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -565,22 +565,20 @@ void Channel::setHeight(int h) {
 }
 
 void Channel::setBbox(int l, int t, int r, int b) {
-	if (_sprite->_stretch || _sprite->_puppet) {
-		if (!(_sprite->_cast && _sprite->_cast->_type == kCastShape) && !_sprite->_stretch)
-			return;
-		_width = r - l;
-		_height = b - t;
-
-		Common::Rect source(_width, _height);
-		if (_sprite->_cast) {
-			source = _sprite->_cast->getBbox(_width, _height);
-		}
-		_currentPoint.x = (int16)(l - source.left);
-		_currentPoint.y = (int16)(t - source.top);
+	if (!(_sprite->_cast && _sprite->_cast->_type == kCastShape) && !_sprite->_stretch)
+		return;
+	_width = r - l;
+	_height = b - t;
 
-		if (_width <= 0 || _height <= 0)
-			_width = _height = 0;
+	Common::Rect source(_width, _height);
+	if (_sprite->_cast) {
+		source = _sprite->_cast->getBbox(_width, _height);
 	}
+	_currentPoint.x = (int16)(l - source.left);
+	_currentPoint.y = (int16)(t - source.top);
+
+	if (_width <= 0 || _height <= 0)
+		_width = _height = 0;
 
 	if (!_sprite->_puppet && g_director->getVersion() >= 600) {
 		// Based on Director in a Nutshell, page 15




More information about the Scummvm-git-logs mailing list