diff options
author | Strangerke | 2013-09-12 21:44:36 +0200 |
---|---|---|
committer | Strangerke | 2013-09-12 21:44:36 +0200 |
commit | b936611e030f6748013b5360c8617d44643cb335 (patch) | |
tree | f4641b4d15d045b12edbf88a612bfb69c6858103 /engines | |
parent | 11c496c31b6eb410d5bd10d346606a92c82664b4 (diff) | |
download | scummvm-rg350-b936611e030f6748013b5360c8617d44643cb335.tar.gz scummvm-rg350-b936611e030f6748013b5360c8617d44643cb335.tar.bz2 scummvm-rg350-b936611e030f6748013b5360c8617d44643cb335.zip |
AVALANCHE: Fix various warnings reported by GCC and/or wjp
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/acci2.cpp | 24 | ||||
-rw-r--r-- | engines/avalanche/animation.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/avalanche.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 4 |
4 files changed, 17 insertions, 17 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp index 2c2c37a8e1..74ddad958f 100644 --- a/engines/avalanche/acci2.cpp +++ b/engines/avalanche/acci2.cpp @@ -654,9 +654,9 @@ bool Acci::isPersonHere() { // Person equivalent of "holding". else { Common::String tmpStr; if (_person < 175) - tmpStr = Common::String::format("He isn't around at the moment."); + tmpStr = "He isn't around at the moment."; else - tmpStr = Common::String::format("She isn't around at the moment."); + tmpStr = "She isn't around at the moment."; _vm->_scrolls->displayText(tmpStr); return false; } @@ -750,13 +750,13 @@ void Acci::examine() { void Acci::inventory() { byte itemNum = 0; - Common::String tmpStr = Common::String::format("You're carrying "); + Common::String tmpStr = Common::String("You're carrying "); for (byte i = 0; i < kObjectNum; i++) { if (_vm->_gyro->_dna._objects[i]) { itemNum++; if (itemNum == _vm->_gyro->_dna._carryNum) - tmpStr += "and %c"; + tmpStr += "and "; tmpStr += _vm->_gyro->getItem(i + 1); @@ -768,9 +768,9 @@ void Acci::inventory() { } } - if (_vm->_gyro->_dna._wearing == kNothing) { + if (_vm->_gyro->_dna._wearing == kNothing) tmpStr += Common::String::format("...%c%c...and you're stark naked!", Scrolls::kControlNewLine, Scrolls::kControlNewLine); - } else + else tmpStr += '.'; _vm->_scrolls->displayText(tmpStr); @@ -850,10 +850,10 @@ void Acci::peopleInRoom() { if (actPerson == 1) // First on the list. _vm->_scrolls->displayText(_vm->_gyro->getName(i + 150) + Scrolls::kControlToBuffer); else if (actPerson < numPeople) { // The middle... - tmpStr = Common::String::format(", %s%c", _vm->_gyro->getName(i + 150), Scrolls::kControlToBuffer); + tmpStr = Common::String::format(", %s%c", _vm->_gyro->getName(i + 150).c_str(), Scrolls::kControlToBuffer); _vm->_scrolls->displayText(tmpStr); } else { // The end. - tmpStr = Common::String::format(" and %s%c", _vm->_gyro->getName(i + 150), Scrolls::kControlToBuffer); + tmpStr = Common::String::format(" and %s%c", _vm->_gyro->getName(i + 150).c_str(), Scrolls::kControlToBuffer); _vm->_scrolls->displayText(tmpStr); } } @@ -1056,9 +1056,9 @@ void Acci::putProc() { * @remarks Originally called 'not_in_order' */ void Acci::notInOrder() { + Common::String itemStr = _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick]); Common::String tmpStr = Common::String::format("Sorry, I need the ingredients in the right order for this potion. " \ - "What I need next is %s%c2%c", _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick]), - Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); + "What I need next is %s%c2%c", itemStr.c_str(), Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); _vm->_scrolls->displayText(tmpStr); } @@ -1206,7 +1206,7 @@ void Acci::getProc(char thing) { _vm->_gyro->_dna._boxContent = kNothing; _vm->_celer->drawBackgroundSprite(-1, -1, 6); } else { - Common::String tmpStr = Common::String::format("I can't see %s in the box.", _vm->_gyro->getItem(thing)); + Common::String tmpStr = Common::String::format("I can't see %s in the box.", _vm->_gyro->getItem(thing).c_str()); _vm->_scrolls->displayText(tmpStr); } } else @@ -1835,7 +1835,7 @@ void Acci::doThat() { } _vm->_celer->drawBackgroundSprite(-1, -1, 12); - Common::String tmpStr = Common::String::format("Wine, please.%c1%c", Scrolls::kControlRegister, '1', Scrolls::kControlSpeechBubble); + Common::String tmpStr = Common::String::format("Wine, please.%c1%c", Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); _vm->_scrolls->displayText(tmpStr); if (_vm->_gyro->_dna._alcoholLevel == 0) _vm->_lucerna->incScore(3); diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 5bff12307b..615bf94d40 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -226,7 +226,7 @@ void AnimationType::walk() { break; case Gyro::kMagicUnfinished: { bounce(); - Common::String tmpStr = Common::String::format("%cSorry.%cThis place is not available yet!", Scrolls::kControlBell, Scrolls::kControlCenter, Scrolls::kControlRoman); + Common::String tmpStr = Common::String::format("%c%cSorry.%cThis place is not available yet!", Scrolls::kControlBell, Scrolls::kControlCenter, Scrolls::kControlRoman); _anim->_vm->_scrolls->displayText(tmpStr); } break; @@ -352,8 +352,8 @@ void AnimationType::remove() { if ((_info._xLength % 8) > 0) _info._xWidth++; for (byte i = 0; i < _stat._frameNum; i++) { + assert(_animCount > 0); _animCount--; - assert(_animCount >= 0); delete[] _info._mani[_animCount]; delete[] _info._sil[_animCount]; } diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index cdd6b7c3ab..ce3fb8eaf6 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -454,7 +454,7 @@ bool AvalancheEngine::loadGame(const int16 slot) { Common::String tmpStr = Common::String::format("%cLoaded: %c%s.ASG%c%c%c%s%c%csaved on %s.", Scrolls::kControlItalic, Scrolls::kControlRoman, description.c_str(), Scrolls::kControlCenter, - Scrolls::kControlNewLine, Scrolls::kControlNewLine, _gyro->_roomnName, Scrolls::kControlNewLine, + Scrolls::kControlNewLine, Scrolls::kControlNewLine, _gyro->_roomnName.c_str(), Scrolls::kControlNewLine, Scrolls::kControlNewLine, expandDate(t.tm_mday, t.tm_mon, t.tm_year).c_str()); _scrolls->displayText(tmpStr); diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index 3fe95603c1..71d38d3c0c 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -232,7 +232,7 @@ void Lucerna::loadAlso(byte num) { _vm->_gyro->_also[i][j] = new Common::String; *_vm->_gyro->_also[i][j] = readAlsoStringFromFile(); } - tmpStr = Common::String::format("\x9D%s\x9D", *_vm->_gyro->_also[i][0]); + tmpStr = Common::String::format("\x9D%s\x9D", *_vm->_gyro->_also[i][0]->c_str()); *_vm->_gyro->_also[i][0] = tmpStr; } @@ -287,7 +287,7 @@ void Lucerna::loadAlso(byte num) { file.close(); unScramble(); for (byte i = 0; i <= alsoNum; i++) { - tmpStr = Common::String::format(",%s,", *_vm->_gyro->_also[i][0]); + tmpStr = Common::String::format(",%s,", *_vm->_gyro->_also[i][0]->c_str()); *_vm->_gyro->_also[i][0] = tmpStr; } } |