From dd849ac5b77a238917cf970c0b1d842be79409e3 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 10 Oct 2014 14:11:38 +0200 Subject: PRINCE: Fix more warnings --- engines/prince/prince.cpp | 8 ++++++-- engines/prince/prince.h | 2 +- engines/prince/script.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index b5a652e02e..78de9a8cb0 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -600,7 +600,7 @@ void PrinceEngine::makeInvCursor(int itemNr) { _cursor2->fillRect(cur2Rect, 255); _cursor2->copyRectToSurface(*cur1Surface, 0, 0, cur1Rect); - byte *src1 = (byte *)itemSurface->getBasePtr(0, 0); + const byte *src1 = (const byte *)itemSurface->getBasePtr(0, 0); byte *dst1 = (byte *)_cursor2->getBasePtr(cur1W, cur1H); if (itemH % 2) { @@ -611,7 +611,7 @@ void PrinceEngine::makeInvCursor(int itemNr) { } for (int y = 0; y < itemH; y++) { - byte *src2 = src1; + const byte *src2 = src1; byte *dst2 = dst1; if (y % 2 == 0) { for (int x = 0; x < itemW; x++, src2++) { @@ -2604,6 +2604,8 @@ void PrinceEngine::checkOptions() { case Common::EN_ANY: optText = optionsTextEN[i]; break; + default: + break; }; uint16 textW = getTextWidth(optText.c_str()); uint16 textX = _optionsX + _optionsWidth / 2 - textW / 2; @@ -2651,6 +2653,8 @@ void PrinceEngine::checkInvOptions() { case Common::EN_ANY: invText = invOptionsTextEN[i]; break; + default: + break; }; uint16 textW = getTextWidth(invText.c_str()); uint16 textX = _optionsX + _invOptionsWidth / 2 - textW / 2; diff --git a/engines/prince/prince.h b/engines/prince/prince.h index bc258cbe5c..9e892f1206 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -649,7 +649,7 @@ private: Font *_font; MusicPlayer *_midiPlayer; - static const uint32 kMaxSamples = 60; + static const int kMaxSamples = 60; Audio::RewindableAudioStream *_audioStream[kMaxSamples]; Audio::SoundHandle _soundHandle[kMaxSamples]; diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 8f1aa9fede..b778bd3288 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -1883,7 +1883,7 @@ void Interpreter::O_VIEWFLCLOOP() { // Not used in script void Interpreter::O_FLCSPEED() { - error("O_FLCSPEED speed %d"); + error("O_FLCSPEED speed"); } void Interpreter::O_OPENINVENTORY() { -- cgit v1.2.3