diff options
author | Strangerke | 2013-09-05 01:27:51 +0200 |
---|---|---|
committer | Strangerke | 2013-09-05 01:27:51 +0200 |
commit | b52c873c5bb764b9385d46a3d77ac44a79ecee12 (patch) | |
tree | 547e18d94f5d3cac7d316b74b97c89565353b0c1 | |
parent | c7e78ec6b75a4a5e976de60f5b92c74b0e48ea50 (diff) | |
download | scummvm-rg350-b52c873c5bb764b9385d46a3d77ac44a79ecee12.tar.gz scummvm-rg350-b52c873c5bb764b9385d46a3d77ac44a79ecee12.tar.bz2 scummvm-rg350-b52c873c5bb764b9385d46a3d77ac44a79ecee12.zip |
AVALANCHE: Fix GCC warnings
-rw-r--r-- | engines/avalanche/acci2.cpp | 15 | ||||
-rw-r--r-- | engines/avalanche/gyro2.h | 2 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 3 | ||||
-rw-r--r-- | engines/avalanche/trip6.cpp | 9 |
4 files changed, 11 insertions, 18 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp index 2123471fa3..6256aa9f47 100644 --- a/engines/avalanche/acci2.cpp +++ b/engines/avalanche/acci2.cpp @@ -265,10 +265,7 @@ Common::String Acci::totalTime() { uint16 h, m, s; h = _vm->_gyro->dna.total_time / ticksInOneSec; // No. of seconds. - if (h < 0) - h = ceil((float)h); - else - h = floor((float)h); + h = floor((float)h); m = h % 3600; h = h / 3600; s = m % 60; @@ -564,18 +561,16 @@ void Acci::parse() { _vm->_gyro->subject.clear(); _vm->_gyro->subjnumber = 0; // Find subject of conversation. - byte i = 0; - while ((i < 11) && !_realWords[i].empty()) { + for (int i = 0; (i < 11) && !_realWords[i].empty(); i++) { if ((_realWords[i][0] == '\'') || (_realWords[i][0] == '\"')) { _vm->_gyro->subjnumber = (byte)_thats[i]; _thats.setChar(kMoved, i); break; } - i++; } if ((_vm->_gyro->subjnumber == 0) && !_thats.empty()) { // Still not found. - for (i = 0; i < _thats.size() - 1; i++) { + for (uint16 i = 0; i < _thats.size() - 1; i++) { if ((byte)_thats[i] == 252) { // The word is "about", or something similar. _vm->_gyro->subjnumber = (byte)_thats[i + 1]; _thats.setChar(0, i + 1); @@ -585,7 +580,7 @@ void Acci::parse() { } if ((_vm->_gyro->subjnumber == 0) && !_thats.empty()) { // STILL not found! Must be the word after "say". - for (i = 0; i < _thats.size() - 1; i++) { + for (uint16 i = 0; i < _thats.size() - 1; i++) { if (((byte)_thats[i] == 7) && ((byte)_thats[i + 1] != 0) && !((225 <= (byte)_thats[i + 1]) && ((byte)_thats[i + 1] <= 229))) { // SAY not followed by a preposition _vm->_gyro->subjnumber = (byte)_thats[i + 1]; @@ -595,7 +590,7 @@ void Acci::parse() { } } - for (int8 i = _thats.size() - 1; i >= 0; i--) { // Reverse order, so first will be used. + for (int16 i = _thats.size() - 1; i >= 0; i--) { // Reverse order, so first will be used. if (((byte)_thats[i] == 253) || ((byte)_thats[i] == 249) || ((1 <= (byte)_thats[i]) && ((byte)_thats[i] <= 49))) _verb = (byte)_thats[i]; else if ((50 <= (byte)_thats[i]) && ((byte)_thats[i] <= 149)) { diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h index 4e4cb0a75b..c8a27468b2 100644 --- a/engines/avalanche/gyro2.h +++ b/engines/avalanche/gyro2.h @@ -122,7 +122,7 @@ struct dnatype { /* here goes... */ /* Ux, uy, & ww now all belong to Trip5 */ worst_place_on_earth, spare_evening; /* Personalisation str's */ - int32 total_time; /* Your total time playing this game, in ticks.*/ + uint32 total_time; /* Your total time playing this game, in ticks.*/ byte jumpstatus; /* Fixes how high you're jumping. */ diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index f31333d990..c5c8062e52 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -1057,7 +1057,7 @@ void Lucerna::checkclick() { _vm->_gyro->newpointer(4); // fletch } - if (holdLeftMouse) + if (holdLeftMouse) { if ((0 <= cursorPos.y) && (cursorPos.y <= 21)) { // Click on the dropdown menu. if (_vm->_gyro->dropsok) _vm->_dropdown->updateMenu(); @@ -1105,6 +1105,7 @@ void Lucerna::checkclick() { _vm->_gyro->mousetext = Common::String(13) + _vm->_gyro->mousetext; } else if (!_vm->_gyro->dropsok) _vm->_gyro->mousetext = Common::String(13) + _vm->_gyro->mousetext; + } } void Lucerna::mouse_init() { diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index cd7a2195bf..2578ce9056 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -1134,23 +1134,20 @@ bool Trip::overlaps_with_mouse() { } void Trip::getback() { - bool endangered; - - - endangered = false; /* Super_Off;*/ while (getset[1 - _vm->_gyro->cp].numleft > 0) { getset[1 - _vm->_gyro->cp].recall(r); - /* +#if 0 + bool endangered = false; if overlaps_with_mouse and not endangered then begin endangered:=true; blitfix; Super_Off; end; - */ +#endif //_vm->_lucerna->mblit(r.x1, r.y1, r.x2, r.y2, 3, 1 - _vm->_gyro->cp); } |