aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-02-08 19:05:01 +0100
committerStrangerke2014-02-08 19:05:01 +0100
commit074c11f7e1423ba6541fe86e8302b7ae52a369f8 (patch)
tree4d3948d937e70c4721584041309f9bd243a2268e /engines
parent1ba4cce14b7fc272036d56a240fc7f0f7c133e56 (diff)
downloadscummvm-rg350-074c11f7e1423ba6541fe86e8302b7ae52a369f8.tar.gz
scummvm-rg350-074c11f7e1423ba6541fe86e8302b7ae52a369f8.tar.bz2
scummvm-rg350-074c11f7e1423ba6541fe86e8302b7ae52a369f8.zip
TSAGE: Silent some CppCheck warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/core.cpp6
-rw-r--r--engines/tsage/graphics.cpp3
2 files changed, 4 insertions, 5 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 16fe45044b..ba14830add 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1593,12 +1593,12 @@ bool SceneItem::startAction(CursorType action, Event &event) {
}
void SceneItem::doAction(int action) {
- const char *msg = NULL;
-
if (g_vm->getGameID() == GType_Ringworld2) {
Event dummyEvent;
((Ringworld2::SceneExt *)GLOBALS._sceneManager._scene)->display((CursorType)action, dummyEvent);
} else {
+ const char *msg = NULL;
+
switch ((int)action) {
case CURSOR_LOOK:
msg = LOOK_SCENE_HOTSPOT;
@@ -2909,7 +2909,6 @@ void BackgroundSceneObject::copySceneToBackground() {
void SceneObjectList::draw() {
Common::Array<SceneObject *> objList;
int paneNum = 0;
- int xAmount = 0, yAmount = 0;
if (_objList.size() == 0) {
// Alternate draw mode
@@ -2936,6 +2935,7 @@ void SceneObjectList::draw() {
g_globals->_scrollFollower->_position.x - g_globals->_sceneManager._scene->_sceneBounds.left,
g_globals->_scrollFollower->_position.y - g_globals->_sceneManager._scene->_sceneBounds.top);
int loadCount = 0;
+ int xAmount = 0, yAmount = 0;
if (objPos.x >= scrollerRect.right) {
xAmount = 8;
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 97857aca34..eb7adbe53a 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -1483,7 +1483,6 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
const char *nextWord = NULL;
const char *sStart = s;
int numChars = 1;
- int strWidth = 1;
char nextChar;
for (;;) {
@@ -1497,7 +1496,7 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
nextWord = s;
}
- strWidth = getStringWidth(sStart, numChars);
+ int strWidth = getStringWidth(sStart, numChars);
if (strWidth > maxWidth) {
if (nextWord) {
s = nextWord;