mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 04:43:26 +00:00
DIRECTOR: Reorganize dirty channel conditions
A condition is also added for stretch of sprite location updates
This commit is contained in:
parent
9c50f9162c
commit
8276404d23
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user