DIRECTOR: Don't override shape dimensions

This commit is contained in:
Nathanael Gentry 2020-08-21 16:51:28 -04:00
parent 0bab9810c0
commit 828595c9fc

View File

@ -183,9 +183,13 @@ void Sprite::setCast(uint16 castId) {
((TextCastMember *)_cast)->_buttonType = (ButtonType)(_spriteType - 8);
}
Common::Rect dims = _cast->getInitialRect();
_width = dims.width();
_height = dims.height();
// TODO: Respect sprite width/height settings. Need to determine how to read
// them properly.
if (_cast->_type != kCastShape) {
Common::Rect dims = _cast->getInitialRect();
_width = dims.width();
_height = dims.height();
}
} else {
warning("Sprite::setCast(): CastMember id %d(%s) has null member", castId, numToCastNum(castId));
}