diff options
author | Travis Howell | 2005-02-27 05:14:24 +0000 |
---|---|---|
committer | Travis Howell | 2005-02-27 05:14:24 +0000 |
commit | 68d15ad91d1b808838141cb8ebd57925fb20a00d (patch) | |
tree | 5b3f311b54718d2c71a3f5b2732747dc364409b3 /scumm | |
parent | d5d3bc8e3b04da7e02c633e0a91cafb597f443c5 (diff) | |
download | scummvm-rg350-68d15ad91d1b808838141cb8ebd57925fb20a00d.tar.gz scummvm-rg350-68d15ad91d1b808838141cb8ebd57925fb20a00d.tar.bz2 scummvm-rg350-68d15ad91d1b808838141cb8ebd57925fb20a00d.zip |
Correction, only redraw if flags changed.
svn-id: r16949
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/sprite_he.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index 9ddb31ea33..ae9eafeeb7 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -532,36 +532,39 @@ void ScummEngine_v90he::spriteInfoSet_rotAngle(int spriteId, int value) { void ScummEngine_v90he::spriteInfoSet_flag13(int spriteId, int value) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); + int oldFlags = _spriteTable[spriteId].flags; if (value) _spriteTable[spriteId].flags |= kSF13; else _spriteTable[spriteId].flags &= ~(kSF09 | kSF13); - if (_spriteTable[spriteId].res_id) + if (_spriteTable[spriteId].res_id && _spriteTable[spriteId].flags != oldFlags) _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; } void ScummEngine_v90he::spriteInfoSet_flag14(int spriteId, int value) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); + int oldFlags = _spriteTable[spriteId].flags; if (value) _spriteTable[spriteId].flags |= kSF14; else _spriteTable[spriteId].flags &= ~(kSF09 | kSF14); - if (_spriteTable[spriteId].res_id) + if (_spriteTable[spriteId].res_id && _spriteTable[spriteId].flags != oldFlags) _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; } void ScummEngine_v90he::spriteInfoSet_flag15(int spriteId, int value) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); + int oldFlags = _spriteTable[spriteId].flags; if (value) _spriteTable[spriteId].flags |= kSF15; else _spriteTable[spriteId].flags &= ~(kSF09 | kSF15); - if (_spriteTable[spriteId].res_id) + if (_spriteTable[spriteId].res_id && _spriteTable[spriteId].flags != oldFlags) _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; } @@ -577,12 +580,13 @@ void ScummEngine_v90he::spriteInfoSet_flagActive(int spriteId, int value) { void ScummEngine_v90he::spriteInfoSet_flag20(int spriteId, int value) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); + int oldFlags = _spriteTable[spriteId].flags; if (value) _spriteTable[spriteId].flags |= kSF20; else _spriteTable[spriteId].flags &= ~(kSFChanged | kSF20); - if (_spriteTable[spriteId].res_id) + if (_spriteTable[spriteId].res_id && _spriteTable[spriteId].flags != oldFlags) _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; } |