aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-12 12:09:29 -0400
committerPaul Gilbert2014-04-12 12:09:29 -0400
commit8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda (patch)
tree67786ffb7944e812e1ba18e48d448eb80cc2c603 /engines/mads/nebular
parentbb82a344a96bcf63c63ab6a297b83eaefa0383d6 (diff)
downloadscummvm-rg350-8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda.tar.gz
scummvm-rg350-8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda.tar.bz2
scummvm-rg350-8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda.zip
MADS: Fix a bunch of GCC warnings
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp10
-rw-r--r--engines/mads/nebular/game_nebular.cpp5
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp2
3 files changed, 10 insertions, 7 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 13019d589c..30b28fe9d7 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -169,12 +169,12 @@ bool DialogsNebular::show(int msgId) {
} else if (commandCheck("VERB", valStr, commandText)) {
dialogText += getVocab(action._activeAction._verbId);
} else if (commandCheck("INDEX", valStr, commandText)) {
- int idx = atoi(valStr.c_str());
- if (_indexList[idx])
- dialogText += getVocab(_indexList[idx]);
+ int idxLocal = atoi(valStr.c_str());
+ if (_indexList[idxLocal])
+ dialogText += getVocab(_indexList[idxLocal]);
} else if (commandCheck("NUMBER", valStr, commandText)) {
- int idx = atoi(valStr.c_str());
- dialogText += Common::String::format("%.4d", _indexList[idx]);
+ int idxLocal = atoi(valStr.c_str());
+ dialogText += Common::String::format("%.4d", _indexList[idxLocal]);
} else if (commandCheck("NOUN1", valStr, commandText)) {
if (!textNoun(dialogText, 1, valStr))
dialogText += getVocab(action._activeAction._objectNameId);
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 30a67f920b..4142cb4708 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -704,7 +704,7 @@ void GameNebular::step() {
}
break;
- case 2:
+ case FACING_SOUTH:
if (randomVal < 500) {
for (int count = 0; count < 10; ++count) {
_player.addWalker((randomVal < 250) ? 1 : 2, 0);
@@ -722,6 +722,9 @@ void GameNebular::step() {
}
}
break;
+
+ default:
+ break;
}
}
}
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index 3d87e9e7c3..d6390ddfc8 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -1298,7 +1298,7 @@ void Scene103::step() {
if (_globals._frameTime <= _scene->_frameStartTime) {
pt = _vm->_game->_player._playerPos;
- int dist = _vm->hypotenuse(pt.x - 79, pt.y - 137);
+ dist = _vm->hypotenuse(pt.x - 79, pt.y - 137);
_vm->_sound->command(29, (dist * -127 / 378) + 127);
pt = _vm->_game->_player._playerPos;