diff options
author | uruk | 2013-09-22 23:36:25 +0200 |
---|---|---|
committer | uruk | 2013-09-22 23:36:25 +0200 |
commit | 02caaa573539bcd0760a47ecfd3c24c813568cc0 (patch) | |
tree | 5511ffdf5d24c5f0a1dedd6e837b9d5d8f3a64a7 /engines/avalanche | |
parent | 61eb94e5c8a7502563d5720a9db71ba1646b49bb (diff) | |
download | scummvm-rg350-02caaa573539bcd0760a47ecfd3c24c813568cc0.tar.gz scummvm-rg350-02caaa573539bcd0760a47ecfd3c24c813568cc0.tar.bz2 scummvm-rg350-02caaa573539bcd0760a47ecfd3c24c813568cc0.zip |
AVALANCHE: Optimize Animation::updateSpeed().
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/animation.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 70f007ae4d..18164c7673 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -933,15 +933,13 @@ void Animation::updateSpeed() { _sprites[0]._moveX = (_sprites[0]._moveX / 3) * _sprites[0]._speedX; - if (_sprites[0]._speedX == _vm->_avalot->kRun) - _vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorYellow); - else - _vm->_graphics->_surface.drawLine(336, 199, 338, 199, kColorYellow); - - if (_sprites[0]._speedX == _vm->_avalot->kRun) + if (_sprites[0]._speedX == _vm->_avalot->kRun) { _vm->_graphics->_surface.drawLine(336, 199, 338, 199, kColorLightblue); - else + _vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorYellow); + } else { _vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorLightblue); + _vm->_graphics->_surface.drawLine(336, 199, 338, 199, kColorYellow); + } } void Animation::changeDirection(byte t, byte dir) { |