From b160a156c1653f32c57ce9479cb27c44e5ed4dc7 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 30 Sep 2013 20:53:06 +0200 Subject: AVALANCHE: Little refactoring in background --- engines/avalanche/background.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/engines/avalanche/background.cpp b/engines/avalanche/background.cpp index e9d3672d4f..0d350c17e3 100644 --- a/engines/avalanche/background.cpp +++ b/engines/avalanche/background.cpp @@ -110,21 +110,21 @@ void Background::update() { case 199: _vm->_npcFacing = 177; // Impossible value for this. break; - } - - if ((_vm->_roomTime % 200 >= 0) && (_vm->_roomTime % 200 <= 178)) { // Normally. - byte direction = 0; - uint16 angle = _vm->bearing(1); - if (((angle >= 1) && (angle <= 90)) || ((angle >= 358) && (angle <= 360))) - direction = 3; - else if ((angle >= 293) && (angle <= 357)) - direction = 2; - else if ((angle >= 271) && (angle <= 292)) - direction = 4; - - if (direction != _vm->_npcFacing) { // Dogfood. - draw(-1, -1, direction - 1); - _vm->_npcFacing = direction; + default: + if (_vm->_roomTime % 200 <= 178) { // Normally. + byte direction = 0; + uint16 angle = _vm->bearing(1); + if (((angle >= 1) && (angle <= 90)) || ((angle >= 358) && (angle <= 360))) + direction = 3; + else if ((angle >= 293) && (angle <= 357)) + direction = 2; + else if ((angle >= 271) && (angle <= 292)) + direction = 4; + + if (direction != _vm->_npcFacing) { // Dogfood. + draw(-1, -1, direction - 1); + _vm->_npcFacing = direction; + } } } break; -- cgit v1.2.3