diff options
author | Strangerke | 2015-05-08 18:28:45 +0200 |
---|---|---|
committer | Strangerke | 2015-05-08 18:28:45 +0200 |
commit | bf0882badc0f29aa8df687fb6f2d0fddded209ab (patch) | |
tree | b92a2c794b6a1a82c833924bed7500f36e2b0885 /engines/sherlock | |
parent | d34e5d1a5975e9fd525dfec8b9460cfa026378d4 (diff) | |
download | scummvm-rg350-bf0882badc0f29aa8df687fb6f2d0fddded209ab.tar.gz scummvm-rg350-bf0882badc0f29aa8df687fb6f2d0fddded209ab.tar.bz2 scummvm-rg350-bf0882badc0f29aa8df687fb6f2d0fddded209ab.zip |
SHERLOCK: Fix some more GCC warnings
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/screen.cpp | 18 | ||||
-rw-r--r-- | engines/sherlock/screen.h | 4 | ||||
-rw-r--r-- | engines/sherlock/talk.cpp | 16 |
3 files changed, 19 insertions, 19 deletions
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index 5623224b97..e22c4daad7 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -329,13 +329,13 @@ void Screen::flushImage(ImageFrame *frame, const Common::Point &pt, * Prints the text passed onto the back buffer at the given position and color. * The string is then blitted to the screen */ -void Screen::print(const Common::Point &pt, byte color, const char *format, ...) { +void Screen::print(const Common::Point &pt, byte color, const char *formatStr, ...) { // Create the string to display char buffer[100]; va_list args; - va_start(args, format); - vsprintf(buffer, format, args); + va_start(args, formatStr); + vsprintf(buffer, formatStr, args); va_end(args); Common::String str(buffer); @@ -363,13 +363,13 @@ void Screen::print(const Common::Point &pt, byte color, const char *format, ...) /** * Print a strings onto the back buffer without blitting it to the screen */ -void Screen::gPrint(const Common::Point &pt, byte color, const char *format, ...) { +void Screen::gPrint(const Common::Point &pt, byte color, const char *formatStr, ...) { // Create the string to display char buffer[100]; va_list args; - va_start(args, format); - vsprintf(buffer, format, args); + va_start(args, formatStr); + vsprintf(buffer, formatStr, args); va_end(args); Common::String str(buffer); @@ -519,10 +519,10 @@ Common::Rect Screen::getDisplayBounds() { * Synchronize the data for a savegame */ void Screen::synchronize(Common::Serializer &s) { - int fontNumber = _fontNumber; - s.syncAsByte(fontNumber); + int fontNumb = _fontNumber; + s.syncAsByte(fontNumb); if (s.isLoading()) - setFont(fontNumber); + setFont(fontNumb); } } // End of namespace Sherlock diff --git a/engines/sherlock/screen.h b/engines/sherlock/screen.h index 13a4549161..7e33a12b7b 100644 --- a/engines/sherlock/screen.h +++ b/engines/sherlock/screen.h @@ -102,8 +102,8 @@ public: void verticalTransition(); - void print(const Common::Point &pt, byte color, const char *format, ...); - void gPrint(const Common::Point &pt, byte color, const char *format, ...); + void print(const Common::Point &pt, byte color, const char *formatStr, ...); + void gPrint(const Common::Point &pt, byte color, const char *formatStr, ...); void restoreBackground(const Common::Rect &r); diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 55a79f8170..6d56149c6c 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -604,7 +604,7 @@ void Talk::stripVoiceCommands() { // Scan for an sound effect byte, which indicates to play a sound for (uint idx = 0; idx < statement._reply.size(); ++idx) { - if (statement._reply[idx] == SFX_COMMAND) { + if (statement._reply[idx] == (int)SFX_COMMAND) { // Replace instruction character with a space, and delete the // rest of the name following it statement._reply = Common::String(statement._reply.c_str(), @@ -1391,11 +1391,11 @@ void Talk::doScript(const Common::String &script) { str += str[0] & 127; for (uint idx = 0; idx < scene._bgShapes.size(); ++idx) { - Object &obj = scene._bgShapes[idx]; - if (scumm_stricmp(tempString.c_str(), obj._name.c_str()) == 0) { + Object &object = scene._bgShapes[idx]; + if (scumm_stricmp(tempString.c_str(), object._name.c_str()) == 0) { // Only toggle the object if it's not in the desired state already - if ((obj._type == HIDDEN && state) || (obj._type != HIDDEN && !state)) - obj.toggleHidden(); + if ((object._type == HIDDEN && state) || (object._type != HIDDEN && !state)) + object.toggleHidden(); } } break; @@ -1460,13 +1460,13 @@ void Talk::doScript(const Common::String &script) { case WALK_TO_CANIMATION: { ++str; - CAnim &anim = scene._cAnim[str[0] - 1]; + CAnim &animation = scene._cAnim[str[0] - 1]; - // Save the current point in the script, since it might be intterupted by + // Save the current point in the script, since it might be interrupted by // doing bg anims in the next call, so we need to know where to return to _scriptCurrentIndex = (str + 1) - scriptStart; - people.walkToCoords(anim._goto, anim._gotoDir); + people.walkToCoords(animation._goto, animation._gotoDir); if (_talkToAbort) return; break; |