diff options
author | Strangerke | 2013-09-30 20:53:06 +0200 |
---|---|---|
committer | Strangerke | 2013-09-30 20:53:06 +0200 |
commit | b160a156c1653f32c57ce9479cb27c44e5ed4dc7 (patch) | |
tree | 778dceff2aafe61ca575617de23e1f9001e3483b | |
parent | 53f6c2f693755014b0dfe1652e85eeab9cfc18a9 (diff) | |
download | scummvm-rg350-b160a156c1653f32c57ce9479cb27c44e5ed4dc7.tar.gz scummvm-rg350-b160a156c1653f32c57ce9479cb27c44e5ed4dc7.tar.bz2 scummvm-rg350-b160a156c1653f32c57ce9479cb27c44e5ed4dc7.zip |
AVALANCHE: Little refactoring in background
-rw-r--r-- | engines/avalanche/background.cpp | 30 |
1 files 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; |