aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2019-11-27 02:34:35 +0000
committerD G Turner2019-11-27 02:34:35 +0000
commita45106412a9ead12ce2edaade717f61d9f2b5609 (patch)
treee54d2b26f05c001163fc3fbc1c206279dc7ac853 /engines
parenta997ac72f1e0bdef68f925f4d57bf49affffae91 (diff)
downloadscummvm-rg350-a45106412a9ead12ce2edaade717f61d9f2b5609.tar.gz
scummvm-rg350-a45106412a9ead12ce2edaade717f61d9f2b5609.tar.bz2
scummvm-rg350-a45106412a9ead12ce2edaade717f61d9f2b5609.zip
PRINCE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines')
-rw-r--r--engines/prince/draw.cpp2
-rw-r--r--engines/prince/hero.cpp20
-rw-r--r--engines/prince/mob.cpp2
-rw-r--r--engines/prince/prince.cpp6
4 files changed, 30 insertions, 0 deletions
diff --git a/engines/prince/draw.cpp b/engines/prince/draw.cpp
index a924f99def..275b66aa1b 100644
--- a/engines/prince/draw.cpp
+++ b/engines/prince/draw.cpp
@@ -344,6 +344,8 @@ void PrinceEngine::showBackAnims() {
seq._data2 = _randomSource.getRandomNumber(seq._data - 1);
continue; // for bug in original game
break;
+ default:
+ break;
}
} else {
_backAnimList[i].backAnims[activeSubAnim]._frame++;
diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp
index 8ade649a9f..f0424006bc 100644
--- a/engines/prince/hero.cpp
+++ b/engines/prince/hero.cpp
@@ -534,6 +534,8 @@ int Hero::rotateHero(int oldDirection, int newDirection) {
return kMove_MLU;
case kHeroDirDown:
return kMove_MLD;
+ default:
+ break;
}
break;
case kHeroDirRight:
@@ -544,6 +546,8 @@ int Hero::rotateHero(int oldDirection, int newDirection) {
return kMove_MRU;
case kHeroDirDown:
return kMove_MRD;
+ default:
+ break;
}
break;
case kHeroDirUp:
@@ -554,6 +558,8 @@ int Hero::rotateHero(int oldDirection, int newDirection) {
return kMove_MUR;
case kHeroDirDown:
return kMove_MUD;
+ default:
+ break;
}
break;
case kHeroDirDown:
@@ -564,8 +570,12 @@ int Hero::rotateHero(int oldDirection, int newDirection) {
return kMove_MDR;
case kHeroDirUp:
return kMove_MDU;
+ default:
+ break;
}
break;
+ default:
+ break;
}
error("rotateHero - wrong directions - old %d, new %d", oldDirection, newDirection);
}
@@ -585,6 +595,8 @@ void Hero::heroStanding() {
case kHeroDirDown:
_moveSetType = kMove_SD;
break;
+ default:
+ break;
}
}
@@ -637,6 +649,8 @@ void Hero::showHero() {
case kHeroDirDown:
_moveSetType = kMove_TD;
break;
+ default:
+ break;
}
if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
_phase++;
@@ -656,6 +670,8 @@ void Hero::showHero() {
case 1:
_moveSetType = kMove_BORED2;
break;
+ default:
+ break;
}
if (_moveSet[_moveSetType] != nullptr) {
if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
@@ -899,6 +915,8 @@ void Hero::heroMoveGotIt(int x, int y, int dir) {
case kHeroDirDown:
_moveSetType = kMove_MD;
break;
+ default:
+ break;
}
if (_vm->_flags->getFlagValue(Flags::HEROFAST) || _state == kHeroStateRun) {
@@ -949,6 +967,8 @@ void Hero::scrollHero() {
_vm->_flags->setFlagValue(Flags::SCROLLVALUE, scrollValue - scrollValue2);
}
break;
+ default:
+ break;
}
int locationWidth = _vm->_sceneWidth;
diff --git a/engines/prince/mob.cpp b/engines/prince/mob.cpp
index de15991dba..5a369aa337 100644
--- a/engines/prince/mob.cpp
+++ b/engines/prince/mob.cpp
@@ -237,6 +237,8 @@ int PrinceEngine::checkMob(Graphics::Surface *screen, Common::Array<Mob> &mobLis
case '\xfc':
mobName.setChar('\x82', i);
break;
+ default:
+ break;
}
}
}
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index cb314aa058..8f6acd7541 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -570,6 +570,8 @@ void PrinceEngine::keyHandler(Common::Event event) {
case Common::KEYCODE_ESCAPE:
_flags->setFlagValue(Flags::ESCAPED2, 1);
break;
+ default:
+ break;
}
}
@@ -627,6 +629,8 @@ void PrinceEngine::correctStringDEU(char *s) {
case '\xfc':
*s = '\x82';
break;
+ default:
+ break;
}
s++;
}
@@ -1023,6 +1027,8 @@ void PrinceEngine::mouseWeirdo() {
case 3:
mousePos.y -= kCelStep;
break;
+ default:
+ break;
}
mousePos.x = CLIP(mousePos.x, (int16) 315, (int16) 639);
_flags->setFlagValue(Flags::MXFLAG, mousePos.x);