aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2015-05-08 18:01:51 +0200
committerStrangerke2015-05-08 18:01:51 +0200
commitd34e5d1a5975e9fd525dfec8b9460cfa026378d4 (patch)
treea71e1d9f34fadf34f1648a6664001f7dff5df231
parentfc5a0deb8915bb5bfc85626751539920752b386b (diff)
downloadscummvm-rg350-d34e5d1a5975e9fd525dfec8b9460cfa026378d4.tar.gz
scummvm-rg350-d34e5d1a5975e9fd525dfec8b9460cfa026378d4.tar.bz2
scummvm-rg350-d34e5d1a5975e9fd525dfec8b9460cfa026378d4.zip
SHERLOCK: Fix some more warnings
-rw-r--r--engines/sherlock/scene.cpp3
-rw-r--r--engines/sherlock/screen.cpp18
-rw-r--r--engines/sherlock/screen.h4
3 files changed, 13 insertions, 12 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index c1a73fee90..88f8674913 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -1414,7 +1414,8 @@ void Scene::doBgAnim() {
// since we needed to finish the 'doBgAnim' to finish clearing the portrait
if (people._clearingThePortrait && talk._scriptMoreFlag == 3) {
// Reset the flags and call to talk
- people._clearingThePortrait = talk._scriptMoreFlag = 0;
+ people._clearingThePortrait = false;
+ talk._scriptMoreFlag = 0;
talk.talkTo(talk._scriptName);
}
}
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index 72045a83fb..5623224b97 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -52,9 +52,9 @@ Screen::~Screen() {
/**
* Set the font to use for writing text on the screen
*/
-void Screen::setFont(int fontNumber) {
- _fontNumber = fontNumber;
- Common::String fname = Common::String::format("FONT%d.VGS", fontNumber + 1);
+void Screen::setFont(int fontNumb) {
+ _fontNumber = fontNumb;
+ Common::String fname = Common::String::format("FONT%d.VGS", fontNumb + 1);
// Discard any previous font and read in new one
delete _font;
@@ -278,8 +278,8 @@ void Screen::restoreBackground(const Common::Rect &r) {
/**
* Copies a given area to the screen
*/
-void Screen::slamArea(int16 xp, int16 yp, int16 w, int16 h) {
- slamRect(Common::Rect(xp, yp, xp + w, yp + h));
+void Screen::slamArea(int16 xp, int16 yp, int16 width, int16 height) {
+ slamRect(Common::Rect(xp, yp, xp + width, yp + height));
}
/**
@@ -300,10 +300,10 @@ void Screen::slamRect(const Common::Rect &r) {
* new area covered by the shape as well as the old area, which must be restored
*/
void Screen::flushImage(ImageFrame *frame, const Common::Point &pt,
- int16 *xp, int16 *yp, int16 *w, int16 *h) {
+ int16 *xp, int16 *yp, int16 *width, int16 *height) {
Common::Point imgPos = pt + frame->_offset;
Common::Rect newBounds(imgPos.x, imgPos.y, imgPos.x + frame->_frame.w, imgPos.y + frame->_frame.h);
- Common::Rect oldBounds(*xp, *yp, *xp + *w, *yp + *h);
+ Common::Rect oldBounds(*xp, *yp, *xp + *width, *yp + *height);
// See if the areas of the old and new overlap, and if so combine the areas
if (newBounds.intersects(oldBounds)) {
@@ -321,8 +321,8 @@ void Screen::flushImage(ImageFrame *frame, const Common::Point &pt,
*xp = newBounds.left;
*yp = newBounds.top;
- *w = newBounds.width();
- *h = newBounds.height();
+ *width = newBounds.width();
+ *height = newBounds.height();
}
/**
diff --git a/engines/sherlock/screen.h b/engines/sherlock/screen.h
index b57f535983..13a4549161 100644
--- a/engines/sherlock/screen.h
+++ b/engines/sherlock/screen.h
@@ -107,11 +107,11 @@ public:
void restoreBackground(const Common::Rect &r);
- void slamArea(int16 xp, int16 yp, int16 w, int16 h);
+ void slamArea(int16 xp, int16 yp, int16 width, int16 height);
void slamRect(const Common::Rect &r);
void flushImage(ImageFrame *frame, const Common::Point &pt,
- int16 *xp, int16 *yp, int16 *w, int16 *h);
+ int16 *xp, int16 *yp, int16 *width, int16 *height);
int stringWidth(const Common::String &str);