diff options
author | Strangerke | 2013-09-04 18:34:58 +0200 |
---|---|---|
committer | Strangerke | 2013-09-04 18:34:58 +0200 |
commit | 08e8e92e3a0206b963dacfeecc96b75008c88c02 (patch) | |
tree | ccdfd371fed0911692dac47e0fb856b20f06af70 /engines | |
parent | 97843d9e943325a29c1dc50ab681a80fac96e6d8 (diff) | |
download | scummvm-rg350-08e8e92e3a0206b963dacfeecc96b75008c88c02.tar.gz scummvm-rg350-08e8e92e3a0206b963dacfeecc96b75008c88c02.tar.bz2 scummvm-rg350-08e8e92e3a0206b963dacfeecc96b75008c88c02.zip |
AVALANCHE: Fix even more GCC warnings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/acci2.cpp | 9 | ||||
-rw-r--r-- | engines/avalanche/celer2.cpp | 21 | ||||
-rw-r--r-- | engines/avalanche/enid2.cpp | 3 | ||||
-rw-r--r-- | engines/avalanche/trip6.cpp | 4 |
4 files changed, 20 insertions, 17 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp index 673539745f..01c7d9a1a4 100644 --- a/engines/avalanche/acci2.cpp +++ b/engines/avalanche/acci2.cpp @@ -1372,8 +1372,8 @@ void Acci::doThat() { case kVerbCodeTalk: if (_person == kPardon) { if (_vm->_gyro->subjnumber == 99) // They typed "say password". - _vm->_scrolls->display(Common::String("Yes, but kWhat ") + _vm->_scrolls->kControlItalic + "is" + _vm->_scrolls->kControlRoman + " the password?"); - else if (((1 <= _vm->_gyro->subjnumber) && (_vm->_gyro->subjnumber <= 49)) || (_vm->_gyro->subjnumber == 253) || (_vm->_gyro->subjnumber == 449)) { + _vm->_scrolls->display(Common::String("Yes, but what ") + _vm->_scrolls->kControlItalic + "is" + _vm->_scrolls->kControlRoman + " the password?"); + else if (((1 <= _vm->_gyro->subjnumber) && (_vm->_gyro->subjnumber <= 49)) || (_vm->_gyro->subjnumber == 253) || (_vm->_gyro->subjnumber == 249)) { _thats.deleteChar(0); for (byte i = 0; i < 10; i++) @@ -1890,9 +1890,10 @@ void Acci::doThat() { for (byte i = 0; i < _thats.size(); i++) { Common::String temp = _realWords[i]; temp.toUppercase(); - for (byte i = 0; i < kVocabulary[_vm->_gyro->dna.pass_num + kFirstPassword]._word.size(); i++) - if (kVocabulary[_vm->_gyro->dna.pass_num + kFirstPassword]._word[i] != temp[i]) + for (byte j = 0; j < kVocabulary[_vm->_gyro->dna.pass_num + kFirstPassword]._word.size(); j++) { + if (kVocabulary[_vm->_gyro->dna.pass_num + kFirstPassword]._word[j] != temp[j]) ok = false; + } } if (ok) { diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp index d7f318f863..5c95acabe5 100644 --- a/engines/avalanche/celer2.cpp +++ b/engines/avalanche/celer2.cpp @@ -152,14 +152,15 @@ void Celer::updateBackgroundSprites() { case r__lustiesroom: if (!(_vm->_gyro->dna.lustie_is_asleep)) { byte direction = 0; + uint16 angle = _vm->_lucerna->bearing(2); if ((_vm->_gyro->roomtime % 45) > 42) direction = 4; // du Lustie blinks. // Bearing of Avvy from du Lustie. - else if (((_vm->_lucerna->bearing(2) >= 0) && (_vm->_lucerna->bearing(2) <= 45)) || ((_vm->_lucerna->bearing(2) >= 315) && (_vm->_lucerna->bearing(2) <= 360))) + else if ((angle <= 45) || ((angle >= 315) && (angle <= 360))) direction = 1; // Middle. - else if ((_vm->_lucerna->bearing(2) >= 45) && (_vm->_lucerna->bearing(2) <= 180)) + else if ((angle >= 45) && (angle <= 180)) direction = 2; // Left. - else if ((_vm->_lucerna->bearing(2) >= 181) && (_vm->_lucerna->bearing(2) <= 314)) + else if ((angle >= 181) && (angle <= 314)) direction = 3; // Right. if (direction != _vm->_gyro->dna.dogfoodpos) { // Only if it's changed. @@ -195,11 +196,12 @@ void Celer::updateBackgroundSprites() { case r__nottspub: { // Bearing of Avvy from Port. byte direction = 0; - if (((_vm->_lucerna->bearing(5) >= 0) && (_vm->_lucerna->bearing(5) <= 45)) || ((_vm->_lucerna->bearing(5) >= 315) && (_vm->_lucerna->bearing(5) <= 360))) + uint16 angle = _vm->_lucerna->bearing(5); + if ((angle <= 45) || ((angle >= 315) && (angle <= 360))) direction = 2; // Middle. - else if ((_vm->_lucerna->bearing(5) >= 45) && (_vm->_lucerna->bearing(5) <= 180)) + else if ((angle >= 45) && (angle <= 180)) direction = 6; // Left. - else if ((_vm->_lucerna->bearing(5) >= 181) && (_vm->_lucerna->bearing(5) <= 314)) + else if ((angle >= 181) && (angle <= 314)) direction = 8; // Right. if ((_vm->_gyro->roomtime % 60) > 57) @@ -226,11 +228,12 @@ void Celer::updateBackgroundSprites() { // Bearing of Avvy from Duck. byte direction = 0; - if (((_vm->_lucerna->bearing(2) >= 0) && (_vm->_lucerna->bearing(2) <= 45)) || ((_vm->_lucerna->bearing(2) >= 315) && (_vm->_lucerna->bearing(2) <= 360))) + uint16 angle = _vm->_lucerna->bearing(2); + if ((angle <= 45) || ((angle >= 315) && (angle <= 360))) direction = 4; // Middle. - else if ((_vm->_lucerna->bearing(2) >= 45) && (_vm->_lucerna->bearing(2) <= 180)) + else if ((angle >= 45) && (angle <= 180)) direction = 6; // Left. - else if ((_vm->_lucerna->bearing(2) >= 181) && (_vm->_lucerna->bearing(2) <= 314)) + else if ((angle >= 181) && (angle <= 314)) direction = 8; // Right. if ((_vm->_gyro->roomtime % 45) > 42) diff --git a/engines/avalanche/enid2.cpp b/engines/avalanche/enid2.cpp index 1e7c816947..7a257d04f5 100644 --- a/engines/avalanche/enid2.cpp +++ b/engines/avalanche/enid2.cpp @@ -96,7 +96,8 @@ Common::String Enid::expanddate(byte d, byte m, uint16 y) { day = _vm->_gyro->strf(d); - if (((d >= 0) && (d <= 9)) || ((d >= 21) && (d <= 31))) { + // d is always positive + if ((d <= 9) || ((d >= 21) && (d <= 31))) { switch (d % 10) { case 1: day = day + "st"; diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index 9f494db175..cd7a2195bf 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -1454,10 +1454,8 @@ void Trip::getsetclear() { } void Trip::hide_in_the_cupboard() { - const char nowt = '\xFA'; /* As in Acci. */ - if (_vm->_gyro->dna.avvys_in_the_cupboard) { - if (_vm->_gyro->dna.wearing == nowt) + if (_vm->_gyro->dna.wearing == Acci::kNothing) _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "AVVY!" + _vm->_scrolls->kControlRoman + "Get dressed first!"); else { tr[0].visible = true; |