aboutsummaryrefslogtreecommitdiff
path: root/engines/bbvs
diff options
context:
space:
mode:
authorD G Turner2019-10-16 19:12:57 +0100
committerD G Turner2019-10-16 19:12:57 +0100
commit7e31014e987dc80e375e6c71b64cd987a7790f82 (patch)
treea1cbc05d1b11a2374d6705da04d6b50bd726440f /engines/bbvs
parent1be9ecccf5b9ae70f9047226735fab6395e4f476 (diff)
downloadscummvm-rg350-7e31014e987dc80e375e6c71b64cd987a7790f82.tar.gz
scummvm-rg350-7e31014e987dc80e375e6c71b64cd987a7790f82.tar.bz2
scummvm-rg350-7e31014e987dc80e375e6c71b64cd987a7790f82.zip
BBVS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/bbvs')
-rw-r--r--engines/bbvs/bbvs.cpp4
-rw-r--r--engines/bbvs/logic.cpp6
-rw-r--r--engines/bbvs/minigames/bbairguitar.cpp16
-rw-r--r--engines/bbvs/minigames/bbant.cpp16
-rw-r--r--engines/bbvs/minigames/bbloogie.cpp20
-rw-r--r--engines/bbvs/minigames/bbtennis.cpp26
6 files changed, 85 insertions, 3 deletions
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp
index f5daa602ac..97db1ac785 100644
--- a/engines/bbvs/bbvs.cpp
+++ b/engines/bbvs/bbvs.cpp
@@ -460,6 +460,8 @@ bool BbvsEngine::update(int mouseX, int mouseY, uint mouseButtons, Common::KeyCo
updateCommon();
break;
+ default:
+ break;
}
return true;
@@ -579,6 +581,8 @@ void BbvsEngine::updateVerbs() {
case kVerbShowInv:
_mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(8);
break;
+ default:
+ break;
}
}
diff --git a/engines/bbvs/logic.cpp b/engines/bbvs/logic.cpp
index 47f8dd938b..73f103831c 100644
--- a/engines/bbvs/logic.cpp
+++ b/engines/bbvs/logic.cpp
@@ -95,6 +95,8 @@ bool BbvsEngine::evalCondition(Conditions &conditions) {
case kCondIsCameraNumTransition:
result = false;
break;
+ default:
+ break;
}
}
return result;
@@ -223,6 +225,8 @@ int BbvsEngine::evalDialogCondition(Conditions &conditions) {
case kCondIsCameraNumTransition:
success = false;
break;
+ default:
+ break;
}
if (!success)
return -1;
@@ -258,6 +262,8 @@ void BbvsEngine::evalActionResults(ActionResults &results) {
case kActResChangeScene:
_newSceneNum = result.value2;
break;
+ default:
+ break;
}
}
}
diff --git a/engines/bbvs/minigames/bbairguitar.cpp b/engines/bbvs/minigames/bbairguitar.cpp
index bf05406ed5..1ef427586f 100644
--- a/engines/bbvs/minigames/bbairguitar.cpp
+++ b/engines/bbvs/minigames/bbairguitar.cpp
@@ -167,6 +167,8 @@ void MinigameBbAirGuitar::buildDrawList(DrawList &drawList) {
case 1:
buildDrawList1(drawList);
break;
+ default:
+ break;
}
}
@@ -266,6 +268,8 @@ void MinigameBbAirGuitar::initObjects() {
case 1:
initObjects1();
break;
+ default:
+ break;
}
}
@@ -408,6 +412,8 @@ bool MinigameBbAirGuitar::updateStatus(int mouseX, int mouseY, uint mouseButtons
return updateStatus0(mouseX, mouseY, mouseButtons);
case 1:
return updateStatus1(mouseX, mouseY, mouseButtons);
+ default:
+ break;
}
return false;
}
@@ -660,6 +666,8 @@ bool MinigameBbAirGuitar::updateStatus1(int mouseX, int mouseY, uint mouseButton
}
break;
+ default:
+ break;
}
}
}
@@ -716,6 +724,8 @@ bool MinigameBbAirGuitar::updateStatus1(int mouseX, int mouseY, uint mouseButton
}
break;
+ default:
+ break;
}
updateObjs();
@@ -928,6 +938,8 @@ void MinigameBbAirGuitar::afterButtonReleased() {
case 2:
*_currFrameIndex = 1;
break;
+ case 3:
+ break;
case 4:
*_currFrameIndex = 1;
loadTracks();
@@ -976,7 +988,9 @@ void MinigameBbAirGuitar::afterButtonReleased() {
case 25:
case 26:
noteOff(_currButtonNum - 14);
- break;
+ break;
+ default:
+ break;
}
}
diff --git a/engines/bbvs/minigames/bbant.cpp b/engines/bbvs/minigames/bbant.cpp
index 5310d53357..f335de8e2f 100644
--- a/engines/bbvs/minigames/bbant.cpp
+++ b/engines/bbvs/minigames/bbant.cpp
@@ -138,6 +138,8 @@ void MinigameBbAnt::drawSprites() {
case 3:
drawSprites3();
break;
+ default:
+ break;
}
}
@@ -190,6 +192,7 @@ void MinigameBbAnt::initObjects() {
break;
case 2:
case 3:
+ default:
// Nothing
break;
}
@@ -272,6 +275,7 @@ void MinigameBbAnt::initObjects1() {
void MinigameBbAnt::initVars() {
switch (_gameState) {
+ default:
case 0:
// Nothing
break;
@@ -341,6 +345,8 @@ bool MinigameBbAnt::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
return updateStatus2(mouseX, mouseY, mouseButtons);
case 3:
return updateStatus3(mouseX, mouseY, mouseButtons);
+ default:
+ break;
}
return false;
}
@@ -574,6 +580,8 @@ void MinigameBbAnt::getRandomBugObjValues(int &x, int &y, int &animIndexIncr, in
y = _vm->getRandom(190) + 120;
animIndexIncr = 6;
break;
+ default:
+ break;
}
}
@@ -690,6 +698,8 @@ void MinigameBbAnt::updateBugObjAnim(int objIndex) {
case 3:
obj->animIndexIncr = 6;
break;
+ default:
+ break;
}
const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
obj->xIncr = kPosIncrTbl1[obj->animIndexIncr].x * 65536;
@@ -879,6 +889,8 @@ void MinigameBbAnt::updateBugObj1(int objIndex) {
}
break;
+ default:
+ break;
}
}
@@ -1013,6 +1025,8 @@ void MinigameBbAnt::updateFootObj(int objIndex) {
}
break;
+ default:
+ break;
}
}
@@ -1159,6 +1173,8 @@ void MinigameBbAnt::updateObjs(uint mouseButtons) {
case 9:
updateStompObj(i);
break;
+ default:
+ break;
}
}
diff --git a/engines/bbvs/minigames/bbloogie.cpp b/engines/bbvs/minigames/bbloogie.cpp
index b5dd3070a1..c437608f1a 100644
--- a/engines/bbvs/minigames/bbloogie.cpp
+++ b/engines/bbvs/minigames/bbloogie.cpp
@@ -102,6 +102,8 @@ void MinigameBbLoogie::buildDrawList(DrawList &drawList) {
case kGSScoreCountUp:
buildDrawList3(drawList);
break;
+ default:
+ break;
}
}
@@ -267,6 +269,8 @@ void MinigameBbLoogie::initObjects() {
case kGSScoreCountUp:
initObjects3();
break;
+ default:
+ break;
}
}
@@ -350,6 +354,8 @@ void MinigameBbLoogie::initVars() {
case kGSScoreCountUp:
initVars3();
break;
+ default:
+ break;
}
}
@@ -411,6 +417,8 @@ bool MinigameBbLoogie::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
return updateStatus2(mouseX, mouseY, mouseButtons);
case kGSScoreCountUp:
return updateStatus3(mouseX, mouseY, mouseButtons);
+ default:
+ break;
}
return false;
}
@@ -618,6 +626,8 @@ void MinigameBbLoogie::updateObjs(uint mouseButtons) {
case 9:
updatePrincipal(i);
break;
+ default:
+ break;
}
}
@@ -682,6 +692,8 @@ void MinigameBbLoogie::updateObjs(uint mouseButtons) {
obj->frameIndex = 7;
obj->xIncr = 1;
break;
+ default:
+ break;
}
_paperPlaneDelay = 400;
}
@@ -792,6 +804,8 @@ void MinigameBbLoogie::updatePlayer(int objIndex, uint mouseButtons) {
}
break;
+ default:
+ break;
}
}
@@ -1104,6 +1118,8 @@ void MinigameBbLoogie::updatePrincipal(int objIndex) {
obj->status = 5;
++obj->frameIndex;
break;
+ default:
+ break;
}
obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
}
@@ -1187,6 +1203,8 @@ void MinigameBbLoogie::updatePrincipal(int objIndex) {
}
break;
+ default:
+ break;
}
if (!_principalAngry) {
@@ -1221,6 +1239,8 @@ void MinigameBbLoogie::updatePrincipal(int objIndex) {
case 18:
obj->frameIndex = 26;
break;
+ default:
+ break;
}
obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
playSound(1);
diff --git a/engines/bbvs/minigames/bbtennis.cpp b/engines/bbvs/minigames/bbtennis.cpp
index 17959cc31e..ed4c95c794 100644
--- a/engines/bbvs/minigames/bbtennis.cpp
+++ b/engines/bbvs/minigames/bbtennis.cpp
@@ -82,6 +82,8 @@ void MinigameBbTennis::buildDrawList(DrawList &drawList) {
case 2:
buildDrawList2(drawList);
break;
+ default:
+ break;
}
}
@@ -153,6 +155,8 @@ void MinigameBbTennis::buildDrawList1(DrawList &drawList) {
}
break;
+ default:
+ break;
}
drawList.add(index, x, y, priority);
@@ -255,6 +259,8 @@ void MinigameBbTennis::initObjects() {
case 2:
initObjects2();
break;
+ default:
+ break;
}
}
@@ -306,6 +312,8 @@ void MinigameBbTennis::initVars() {
case 2:
initVars2();
break;
+ default:
+ break;
}
}
@@ -348,6 +356,8 @@ bool MinigameBbTennis::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
return updateStatus1(mouseX, mouseY, mouseButtons);
case 2:
return updateStatus2(mouseX, mouseY, mouseButtons);
+ default:
+ break;
}
return false;
}
@@ -480,6 +490,8 @@ void MinigameBbTennis::updateObjs() {
case 7:
updateEnemyTennisBall(i);
break;
+ default:
+ break;
}
}
@@ -691,6 +703,8 @@ void MinigameBbTennis::updateSquirrel(int objIndex) {
}
break;
+ default:
+ break;
}
if (obj->status != 4) {
@@ -862,6 +876,8 @@ void MinigameBbTennis::updateTennisPlayer(int objIndex) {
case 8:
break;
+ default:
+ break;
}
if (obj->status != 8) {
@@ -940,6 +956,8 @@ void MinigameBbTennis::updateThrower(int objIndex) {
}
break;
+ default:
+ break;
}
if (obj->status != 3) {
@@ -1023,6 +1041,9 @@ void MinigameBbTennis::updateNetPlayer(int objIndex) {
}
break;
+ case 4:
+ break;
+
case 5:
if (--obj->ticks == 0) {
++obj->frameIndex;
@@ -1032,9 +1053,8 @@ void MinigameBbTennis::updateNetPlayer(int objIndex) {
}
break;
- case 4:
+ default:
break;
-
}
if (obj->status < 4 && obj->frameIndex != 31) {
@@ -1171,6 +1191,8 @@ void MinigameBbTennis::makeEnemyBall(int x, int y, int frameIndex) {
obj->fltStepY = (float)((y - 180) / 6);
break;
+ default:
+ break;
}
}