diff options
author | Paul Gilbert | 2014-04-12 12:09:29 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-12 12:09:29 -0400 |
commit | 8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda (patch) | |
tree | 67786ffb7944e812e1ba18e48d448eb80cc2c603 /engines | |
parent | bb82a344a96bcf63c63ab6a297b83eaefa0383d6 (diff) | |
download | scummvm-rg350-8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda.tar.gz scummvm-rg350-8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda.tar.bz2 scummvm-rg350-8b2a7525cc6af408f05e2bac9b1b16ed0b36dcda.zip |
MADS: Fix a bunch of GCC warnings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/action.cpp | 6 | ||||
-rw-r--r-- | engines/mads/animation.cpp | 4 | ||||
-rw-r--r-- | engines/mads/detection_tables.h | 2 | ||||
-rw-r--r-- | engines/mads/game.h | 1 | ||||
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 10 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 5 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 2 | ||||
-rw-r--r-- | engines/mads/rails.cpp | 2 | ||||
-rw-r--r-- | engines/mads/screen.cpp | 4 | ||||
-rw-r--r-- | engines/mads/sequence.cpp | 2 | ||||
-rw-r--r-- | engines/mads/user_interface.cpp | 1 |
11 files changed, 23 insertions, 16 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp index f3e1d2db1e..2d3c1159ff 100644 --- a/engines/mads/action.cpp +++ b/engines/mads/action.cpp @@ -403,6 +403,9 @@ void MADSAction::checkActionAtMousePos() { } } break; + + default: + break; } } @@ -618,6 +621,9 @@ void MADSAction::leftClick() { break; } break; + + default: + break; } } diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp index 0547c6b379..ddad63ca2f 100644 --- a/engines/mads/animation.cpp +++ b/engines/mads/animation.cpp @@ -315,8 +315,8 @@ void Animation::load(UserInterface &interfaceSurface, MSurface &depthSurface, } if (_header._manualFlag) { - Common::String resName = "*" + _header._spriteSetNames[_header._spritesIndex]; - SpriteAsset *sprites = new SpriteAsset(_vm, resName, flags); + Common::String assetResName = "*" + _header._spriteSetNames[_header._spritesIndex]; + SpriteAsset *sprites = new SpriteAsset(_vm, assetResName, flags); _spriteSets[_header._spritesIndex] = sprites; _spriteListIndexes[_header._spritesIndex] = _scene->_sprites.add(sprites); diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h index d7614cfb6e..4eb1dd51db 100644 --- a/engines/mads/detection_tables.h +++ b/engines/mads/detection_tables.h @@ -59,7 +59,7 @@ static const MADSGameDescription gameDescriptions[] = { 0 }, - { AD_TABLE_END_MARKER } + { AD_TABLE_END_MARKER, 0, 0 } }; } // End of namespace MADS diff --git a/engines/mads/game.h b/engines/mads/game.h index c7cb66081d..2c87d70d9d 100644 --- a/engines/mads/game.h +++ b/engines/mads/game.h @@ -51,7 +51,6 @@ enum KernelMode { enum ProtectionResult { PROTECTION_SUCCEED = 0, PROTECTION_FAIL = 1, PROTECTION_ESCAPE = 2 }; -; class Game { private: 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; diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp index 4daa774023..0c179f8dc1 100644 --- a/engines/mads/rails.cpp +++ b/engines/mads/rails.cpp @@ -114,7 +114,7 @@ void Rails::setupRouteNode(int *routeIndexP, int nodeIndex, int flags, int route for (int idx = _nodes.size() - 2; idx > 0; --idx) { int nodePos = idx - 1; if (!_nodes[nodePos]._active && ((currentNode._distances[nodePos] & flags) != 0)) - setupRouteNode(routeIndexP, nodePos, 0x8000, routeLength + distanceVal & 0x3fff); + setupRouteNode(routeIndexP, nodePos, 0x8000, routeLength + (distanceVal & 0x3fff)); } } diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index 9824a3e7cc..f4441ca969 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -389,7 +389,7 @@ void ScreenObjects::elementHighlighted() { int index; int indexEnd = -1; int var8 = 0; - int uiCount; + //int uiCount; switch (userInterface._category) { case CAT_COMMAND: @@ -461,7 +461,7 @@ void ScreenObjects::elementHighlighted() { break; default: - uiCount = size() - _uiCount; + //uiCount = size() - _uiCount; index = scene._hotspots.size(); indexEnd = index - 1; varA = 0; diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index 409dc303fe..d27f9d289f 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -149,7 +149,7 @@ int SequenceList::addTimer(int time, int abortVal) { if (!_entries[seqIndex]._active) break; } - assert(seqIndex < (int)_entries.size()); + assert(seqIndex < _entries.size()); SequenceEntry &se = _entries[seqIndex]; se._active = true; diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index a850c9a68f..13d5569045 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -865,7 +865,6 @@ void UserInterface::updateSelection(ScrCategory category, int newIndex, int *idx *idx = newIndex; if (oldIndex >= 0) { - Common::Rect bounds; writeVocab(category, oldIndex); if (getBounds(category, oldIndex, bounds)) |