diff options
author | D G Turner | 2019-11-16 10:10:45 +0000 |
---|---|---|
committer | D G Turner | 2019-11-16 10:10:45 +0000 |
commit | 4b6cb6878488577eb0c047e3baea412eb98d02c2 (patch) | |
tree | 00c4dfc70f13e9b67b07253878aacba765f6c0af /engines/dm/menus.cpp | |
parent | cc2973f04f5e46eb1c07ee5ff1e400cf9a85e64e (diff) | |
download | scummvm-rg350-4b6cb6878488577eb0c047e3baea412eb98d02c2.tar.gz scummvm-rg350-4b6cb6878488577eb0c047e3baea412eb98d02c2.tar.bz2 scummvm-rg350-4b6cb6878488577eb0c047e3baea412eb98d02c2.zip |
DM: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/dm/menus.cpp')
-rw-r--r-- | engines/dm/menus.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index f547bbe934..56836e5346 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -694,6 +694,9 @@ int16 MenuMan::getChampionSpellCastResult(uint16 champIndex) { break; } } + break; + default: + break; } championMan.addSkillExperience(champIndex, curSpell->_skillIndex, experience); championMan.disableAction(champIndex, curSpell->getDuration()); @@ -1352,6 +1355,8 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) { if (actionPerformed) _vm->_timeline->_events[curChampion->_enableActionEventIndex]._Bu._slotOrdinal = _vm->indexToOrdinal(kDMSlotActionHand); break; + default: + break; } if (setDirectionFl) { @@ -1522,13 +1527,17 @@ bool MenuMan::isMeleeActionPerformed(int16 champIndex, Champion *champ, int16 ac switch (viewCell) { case kDMViewCellBackRight: /* Champion is on the back right of the square and tries to attack a creature in the front right of its square */ case kDMViewCellBackLeft: /* Champion is on the back left of the square and tries to attack a creature in the front left of its square */ - uint16 cellDelta = (viewCell == kDMViewCellBackRight) ? 3 : 1; - /* Check if there is another champion in front */ - if (_vm->_championMan->getIndexInCell(_vm->normalizeModulo4(championCell + cellDelta)) != kDMChampionNone) { - _actionDamage = kDMDamageCantReach; - return false; + { + uint16 cellDelta = (viewCell == kDMViewCellBackRight) ? 3 : 1; + /* Check if there is another champion in front */ + if (_vm->_championMan->getIndexInCell(_vm->normalizeModulo4(championCell + cellDelta)) != kDMChampionNone) { + _actionDamage = kDMDamageCantReach; + return false; + } } break; + default: + break; } if ((actionIndex == kDMActionDisrupt) && !getFlag(dungeon.getCreatureAttributes(_actionTargetGroupThing), kDMCreatureMaskNonMaterial)) @@ -1578,6 +1587,8 @@ bool MenuMan::isGroupFrightenedByAction(int16 champIndex, uint16 actionIndex, in frightAmount = 12; experience = 45; break; + default: + break; } frightAmount += championMan.getSkillLevel(champIndex, kDMSkillInfluence); |