aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/mouse.cpp
diff options
context:
space:
mode:
authorD G Turner2019-10-04 01:34:31 +0100
committerD G Turner2019-10-04 01:34:31 +0100
commit522c5b654858ea4b1a7341060ecc8e259c7a5331 (patch)
tree25832cb6be3acd3d70c940f007b550a6f37bf393 /engines/bladerunner/mouse.cpp
parent6afe6c18eab16db81ea6d0eb9451037c2a34ddd9 (diff)
downloadscummvm-rg350-522c5b654858ea4b1a7341060ecc8e259c7a5331.tar.gz
scummvm-rg350-522c5b654858ea4b1a7341060ecc8e259c7a5331.tar.bz2
scummvm-rg350-522c5b654858ea4b1a7341060ecc8e259c7a5331.zip
BLADERUNNER: Add Some Missing Switch Default Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/bladerunner/mouse.cpp')
-rw-r--r--engines/bladerunner/mouse.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/bladerunner/mouse.cpp b/engines/bladerunner/mouse.cpp
index 91c4d94368..3d82fa00e6 100644
--- a/engines/bladerunner/mouse.cpp
+++ b/engines/bladerunner/mouse.cpp
@@ -159,6 +159,8 @@ void Mouse::setCursor(int cursor) {
_frame = 0;
_hotspotX = 11;
_hotspotY = 11;
+ default:
+ break;
}
}
@@ -169,6 +171,8 @@ void Mouse::getXY(int *x, int *y) const {
void Mouse::setMouseJitterUp() {
switch (_vm->_settings->getDifficulty()) {
+ default:
+ // fallthrough intended
case kGameDifficultyEasy:
_randomCountdownX = 2;
_randomX = _vm->_rnd.getRandomNumberRng(0, 6) - 3;
@@ -191,6 +195,8 @@ void Mouse::setMouseJitterUp() {
void Mouse::setMouseJitterDown() {
switch (_vm->_settings->getDifficulty()) {
+ default:
+ // fallthrough intended
case kGameDifficultyEasy:
_randomCountdownY = 2;
_randomX = _vm->_rnd.getRandomNumberRng(0, 6) - 3;
@@ -327,6 +333,9 @@ void Mouse::updateCursorFrame() {
case 16:
if (++_frame > 2)
_frame = 0;
+ break;
+ default:
+ break;
}
}
@@ -368,6 +377,8 @@ void Mouse::tick(int x, int y) {
case 3:
cursorId = 15;
break;
+ default:
+ break;
}
setCursor(cursorId);
return;
@@ -410,6 +421,8 @@ void Mouse::tick(int x, int y) {
case 2:
cursorId = 11;
break;
+ default:
+ break;
}
if (!_vm->_playerActor->isMoving() && animationMode != kAnimationModeCombatAim && animationMode != kAnimationModeCombatHit && animationMode != kAnimationModeCombatDie) {
@@ -426,6 +439,8 @@ void Mouse::tick(int x, int y) {
case 2:
cursorId = 10;
break;
+ default:
+ break;
}
if (!_vm->_playerActor->isMoving() && animationMode != kAnimationModeCombatIdle && animationMode != kAnimationModeCombatHit && animationMode != kAnimationModeCombatDie) {
_vm->_playerActor->changeAnimationMode(kAnimationModeCombatIdle, false);