diff options
author | Strangerke | 2014-02-16 14:38:22 +0100 |
---|---|---|
committer | Strangerke | 2014-02-16 14:39:59 +0100 |
commit | 8df46608ad3f56012163b2e4e19d748bb187466d (patch) | |
tree | 36b673984bc97a07b78c31f764bdfc549c0aa4aa /engines/queen | |
parent | 553843a2b52f27fcfe431253cb4f86afc1680e2e (diff) | |
download | scummvm-rg350-8df46608ad3f56012163b2e4e19d748bb187466d.tar.gz scummvm-rg350-8df46608ad3f56012163b2e4e19d748bb187466d.tar.bz2 scummvm-rg350-8df46608ad3f56012163b2e4e19d748bb187466d.zip |
QUEEN: Silent some CppCheck warnings by reducing some variable scopes
Diffstat (limited to 'engines/queen')
-rw-r--r-- | engines/queen/cutaway.cpp | 3 | ||||
-rw-r--r-- | engines/queen/graphics.cpp | 4 | ||||
-rw-r--r-- | engines/queen/talk.cpp | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/engines/queen/cutaway.cpp b/engines/queen/cutaway.cpp index 1e53c00564..ade1220a5e 100644 --- a/engines/queen/cutaway.cpp +++ b/engines/queen/cutaway.cpp @@ -552,7 +552,6 @@ void Cutaway::dumpCutawayAnim(CutawayAnim &anim) { const byte *Cutaway::handleAnimation(const byte *ptr, CutawayObject &object) { // lines 1517-1770 in cutaway.c int frameCount = 0; - int header = 0; int i; CutawayAnim objAnim[56]; @@ -560,7 +559,7 @@ const byte *Cutaway::handleAnimation(const byte *ptr, CutawayObject &object) { // Read animation frames for (;;) { - header = (int16)READ_BE_INT16(ptr); + int header = (int16)READ_BE_INT16(ptr); ptr += 2; if (-2 == header) diff --git a/engines/queen/graphics.cpp b/engines/queen/graphics.cpp index 70f7d7c94b..d98ddd635f 100644 --- a/engines/queen/graphics.cpp +++ b/engines/queen/graphics.cpp @@ -522,7 +522,7 @@ void Graphics::setBobText(const BobSlot *pbs, const char *text, int textX, int t // Calc text position - short x, y, width, height; + short x, y, width; if (flags) { if (flags == 2) @@ -540,7 +540,7 @@ void Graphics::setBobText(const BobSlot *pbs, const char *text, int textX, int t BobFrame *pbf = _vm->bankMan()->fetchFrame(pbs->frameNum); width = (pbf->width * pbs->scale) / 100; - height = (pbf->height * pbs->scale) / 100; + short height = (pbf->height * pbs->scale) / 100; y = y - height - 16 - lineCount * 9; } diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp index 1531510ba4..dd3ce0022e 100644 --- a/engines/queen/talk.cpp +++ b/engines/queen/talk.cpp @@ -1252,7 +1252,6 @@ int16 Talk::selectSentence() { _vm->input()->clearKeyVerb(); if (sentenceCount > 0) { - int zone = 0; int oldZone = 0; while (0 == selectedSentence) { @@ -1263,7 +1262,7 @@ int16 Talk::selectSentence() { _vm->update(); Common::Point mouse = _vm->input()->getMousePos(); - zone = _vm->grid()->findZoneForPos(GS_PANEL, mouse.x, mouse.y); + int zone = _vm->grid()->findZoneForPos(GS_PANEL, mouse.x, mouse.y); int mouseButton = _vm->input()->mouseButton(); _vm->input()->clearMouseButton(); |