[Scummvm-git-logs] scummvm master -> ef6a7b7daff63422462f9519e670f83e32e07229

sev- noreply at scummvm.org
Fri Jun 2 22:03:49 UTC 2023


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:
9b9fa9f8ad DIRECTOR: LINGO: spritebox Lingo command sets sprite stretch to true
ef6a7b7daf DIRECTOR: Setting sprite box is allowed for stretched sprites, and add sanity checks


Commit: 9b9fa9f8ad8cb47b0b7d772a0b863ff7a17983ac
    https://github.com/scummvm/scummvm/commit/9b9fa9f8ad8cb47b0b7d772a0b863ff7a17983ac
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-06-03T00:03:36+02:00

Commit Message:
DIRECTOR: LINGO: spritebox Lingo command sets sprite stretch to true

Changed paths:
    engines/director/lingo/lingo-builtins.cpp


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index d924ea173d7..f5030b5196f 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -2645,6 +2645,8 @@ void LB::b_spriteBox(int nargs) {
 	int spriteId = g_lingo->pop().asInt();
 	Channel *channel = g_director->getCurrentMovie()->getScore()->getChannelById(spriteId);
 
+	channel->_sprite->_stretch = true;
+
 	if (!channel)
 		return;
 


Commit: ef6a7b7daff63422462f9519e670f83e32e07229
    https://github.com/scummvm/scummvm/commit/ef6a7b7daff63422462f9519e670f83e32e07229
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-06-03T00:03:36+02:00

Commit Message:
DIRECTOR: Setting sprite box is allowed for stretched sprites, and add sanity checks

This fixed picking animals in zoo in the7colors. --start-movie=06DEPTSTORE:7F:DeptP3-06

Changed paths:
    engines/director/channel.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 205edb45b7f..2370268b403 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -554,7 +554,7 @@ void Channel::setHeight(int h) {
 }
 
 void Channel::setBbox(int l, int t, int r, int b) {
-	if (_sprite->_puppet) {
+	if (_sprite->_puppet || _sprite->_stretch) {
 		if (!(_sprite->_cast && _sprite->_cast->_type == kCastShape) && !_sprite->_stretch)
 			return;
 		_width = r - l;
@@ -566,6 +566,9 @@ void Channel::setBbox(int l, int t, int r, int b) {
 		}
 		_currentPoint.x = (int16)(l - source.left);
 		_currentPoint.y = (int16)(t - source.top);
+
+		if (_width <= 0 || _height <= 0)
+			_width = _height = 0;
 	}
 }
 




More information about the Scummvm-git-logs mailing list