aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-09-22 23:36:25 +0200
committeruruk2013-09-22 23:36:25 +0200
commit02caaa573539bcd0760a47ecfd3c24c813568cc0 (patch)
tree5511ffdf5d24c5f0a1dedd6e837b9d5d8f3a64a7 /engines/avalanche
parent61eb94e5c8a7502563d5720a9db71ba1646b49bb (diff)
downloadscummvm-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.cpp12
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) {