aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-11-30 19:45:43 +0000
committerD G Turner2019-11-30 19:45:43 +0000
commit46eafcf96be99c04aedcd8cdec69595a3c62a55b (patch)
treed4d60e38d8cd000984104d91ab31b4e3318d4dcd
parent6f678e6e84ae1a21c825fde582a956ac189cec3f (diff)
downloadscummvm-rg350-46eafcf96be99c04aedcd8cdec69595a3c62a55b.tar.gz
scummvm-rg350-46eafcf96be99c04aedcd8cdec69595a3c62a55b.tar.bz2
scummvm-rg350-46eafcf96be99c04aedcd8cdec69595a3c62a55b.zip
TONY: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
-rw-r--r--engines/tony/custom.cpp2
-rw-r--r--engines/tony/font.cpp1
-rw-r--r--engines/tony/gfxengine.cpp3
-rw-r--r--engines/tony/loc.cpp2
-rw-r--r--engines/tony/mpal/expr.cpp3
-rw-r--r--engines/tony/mpal/loadmpc.cpp3
-rw-r--r--engines/tony/tony.cpp7
-rw-r--r--engines/tony/tonychar.cpp162
8 files changed, 183 insertions, 0 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 989702cd3c..6bd53bb4b1 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -1086,6 +1086,8 @@ void tonyMacbeth(CORO_PARAM, uint32 nPos, uint32, uint32, uint32) {
case 9:
GLOBALS._nTonyNextTalkType = GLOBALS._tony->TALK_MACBETH9;
break;
+ default:
+ break;
}
}
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 66a8f9cbbe..b9711cde25 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -471,6 +471,7 @@ void RMText::writeText(Common::String text, RMFontColor *font, int *time) {
switch (_aHorType) {
case HLEFT:
+ default:
x = 0;
break;
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index efbf63a6f5..1851eac56d 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -341,6 +341,9 @@ SKIPCLICKSINISTRO:
_rcWipeEllipse.right += FSTEP;
_rcWipeEllipse.bottom += FSTEP;
break;
+
+ default:
+ break;
}
}
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index fe553b5fab..9ee6f23a4e 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -1305,6 +1305,8 @@ void RMCharacter::newBoxEntered(int nBox) {
case PAT_WALKLEFT:
setPattern(PAT_WALKRIGHT);
break;
+ default:
+ break;
}
}
}
diff --git a/engines/tony/mpal/expr.cpp b/engines/tony/mpal/expr.cpp
index 1fdf637062..0972068ead 100644
--- a/engines/tony/mpal/expr.cpp
+++ b/engines/tony/mpal/expr.cpp
@@ -314,6 +314,9 @@ bool compareExpressions(MpalHandle h1, MpalHandle h2) {
return false;
}
break;
+
+ default:
+ break;
}
++one;
diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp
index 01892a40e6..1e6e77b6a3 100644
--- a/engines/tony/mpal/loadmpc.cpp
+++ b/engines/tony/mpal/loadmpc.cpp
@@ -283,6 +283,9 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
case 2:
return NULL;
+
+ default:
+ break;
}
// Attrib
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 2d9e93c1da..b3338e7a40 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -296,6 +296,7 @@ void TonyEngine::playMusic(int nChannel, const Common::String &fname, int nFX, b
break;
case 22:
+ default:
break;
}
@@ -386,6 +387,9 @@ void TonyEngine::playSFX(int nChannel, int nFX) {
case 1:
_sfx[nChannel]->setLoop(true);
break;
+
+ default:
+ break;
}
_sfx[nChannel]->play();
@@ -414,6 +418,9 @@ void TonyEngine::playUtilSFX(int nChannel, int nFX) {
case 1:
_utilSfx[nChannel]->setLoop(true);
break;
+
+ default:
+ break;
}
_utilSfx[nChannel]->setVolume(52);
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index 224d923142..8c88e9467b 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -352,6 +352,8 @@ int RMTony::getCurPattern() {
return PAT_WALKLEFT;
case PAT_PAST_WALKRIGHT:
return PAT_WALKRIGHT;
+ default:
+ break;
}
return nPatt;
@@ -384,6 +386,8 @@ void RMTony::setPattern(int nPatt, bool bPlayP0) {
case PAT_WALKRIGHT:
nPatt = PAT_PAST_WALKRIGHT;
break;
+ default:
+ break;
}
}
@@ -408,6 +412,8 @@ void RMTony::take(int nWhere, int nPart) {
case 2:
setPattern(PAT_TAKEUP_DOWN1);
break;
+ default:
+ break;
}
break;
@@ -422,6 +428,8 @@ void RMTony::take(int nWhere, int nPart) {
case 2:
setPattern(PAT_TAKERIGHT_DOWN1);
break;
+ default:
+ break;
}
break;
@@ -436,8 +444,13 @@ void RMTony::take(int nWhere, int nPart) {
case 2:
setPattern(PAT_TAKELEFT_DOWN1);
break;
+ default:
+ break;
}
break;
+
+ default:
+ break;
}
} else if (nPart == 1) {
setPattern(getCurPattern() + 1);
@@ -460,6 +473,9 @@ void RMTony::take(int nWhere, int nPart) {
case PAT_TAKERIGHT_DOWN2:
setPattern(PAT_STANDRIGHT);
break;
+
+ default:
+ break;
}
}
}
@@ -481,6 +497,8 @@ void RMTony::put(int nWhere, int nPart) {
case 2:
setPattern(PAT_PUTUP_DOWN1);
break;
+ default:
+ break;
}
break;
@@ -495,6 +513,8 @@ void RMTony::put(int nWhere, int nPart) {
case 2:
setPattern(PAT_PUTRIGHT_DOWN1);
break;
+ default:
+ break;
}
break;
@@ -509,8 +529,13 @@ void RMTony::put(int nWhere, int nPart) {
case 2:
setPattern(PAT_PUTLEFT_DOWN1);
break;
+ default:
+ break;
}
break;
+
+ default:
+ break;
}
} else if (nPart == 1) {
setPattern(getCurPattern() + 1);
@@ -533,6 +558,9 @@ void RMTony::put(int nWhere, int nPart) {
case PAT_PUTRIGHT_DOWN2:
setPattern(PAT_STANDRIGHT);
break;
+
+ default:
+ break;
}
}
}
@@ -574,6 +602,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
case PAT_STANDUP:
_talkDirection = UP;
break;
+
+ default:
+ break;
}
// Puts the body in front by default
@@ -598,6 +629,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
case RIGHT:
setPattern(PAT_PAST_TALKRIGHT);
break;
+
+ default:
+ break;
}
return false;
}
@@ -635,6 +669,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
bodyLoopPat = BPAT_STANDUP;
_nBodyOffset.set(6, 53);
break;
+
+ default:
+ break;
}
break;
@@ -672,6 +709,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_HIPSRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -703,6 +743,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_LAUGHRIGHT_LOOP;
bodyLoopPat = BPAT_LAUGHRIGHT;
break;
+
+ default:
+ break;
}
break;
@@ -725,6 +768,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_LAUGHRIGHT_LOOP;
bodyLoopPat = BPAT_LAUGHRIGHT;
break;
+
+ default:
+ break;
}
break;
@@ -743,6 +789,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_INDICATERIGHT;
break;
+
+ default:
+ break;
}
break;
@@ -779,6 +828,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_SCAREDLEFT_LOOP;
bodyLoopPat = BPAT_SCAREDLEFT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -820,6 +872,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headStartPat = PAT_SCAREDLEFT_START;
headLoopPat = PAT_SCAREDLEFT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -866,6 +921,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_WITHRABBITRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -886,6 +944,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_WITHRECIPERIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -906,6 +967,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_WITHCARDSRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -926,6 +990,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_WITHSNOWMANRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -945,6 +1012,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
case RIGHT:
headLoopPat = PAT_TALK_RIGHT;
break;
+
+ default:
+ break;
}
break;
@@ -964,6 +1034,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
bodyLoopPat = BPAT_STANDRIGHT;
_nBodyOffset.set(6, 56);
break;
+
+ default:
+ break;
}
break;
@@ -984,6 +1057,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_DISGUSTEDRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1004,6 +1080,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_SARCASTICRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1087,6 +1166,9 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
break;
}
break;
+
+ default:
+ break;
}
return true;
@@ -1149,6 +1231,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
finalPat = PAT_STANDRIGHT;
headStandPat = PAT_HEAD_RIGHT;
break;
+
+ default:
+ break;
}
if (_bShepherdess) {
@@ -1180,6 +1265,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
case RIGHT:
bodyEndPat = BPAT_HIPSRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1208,6 +1296,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
case RIGHT:
headEndPat = PAT_DISGUSTEDRIGHT_END;
break;
+
+ default:
+ break;
}
bodyEndPat = 0;
@@ -1224,6 +1315,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
case RIGHT:
headEndPat = PAT_SARCASTICRIGHT_END;
break;
+
+ default:
+ break;
}
bodyEndPat = 0;
@@ -1252,6 +1346,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
headEndPat = PAT_SCAREDLEFT_END;
bodyEndPat = BPAT_SCAREDLEFT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1275,6 +1372,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
headEndPat = PAT_SCAREDLEFT_END;
bodyEndPat = 0;
break;
+
+ default:
+ break;
}
break;
@@ -1291,6 +1391,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
finalPat = PAT_STANDRIGHT;
bodyEndPat = BPAT_WITHRABBITRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1307,6 +1410,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
finalPat = PAT_STANDRIGHT;
bodyEndPat = BPAT_WITHRECIPERIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1323,6 +1429,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
finalPat = PAT_STANDRIGHT;
bodyEndPat = BPAT_WITHCARDSRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1339,6 +1448,9 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
finalPat = PAT_STANDRIGHT;
bodyEndPat = BPAT_WITHSNOWMANRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1514,6 +1626,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
_talkDirection = UP;
headPat = PAT_HEAD_LEFT;
break;
+
+ default:
+ break;
}
_bBodyFront = true;
@@ -1534,6 +1649,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
bodyStartPat = BPAT_WITHRABBITRIGHT_START;
bodyLoopPat = BPAT_WITHRABBITRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1552,6 +1670,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
bodyStartPat = BPAT_WITHCARDSRIGHT_START;
bodyLoopPat = BPAT_WITHCARDSRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1570,6 +1691,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
bodyStartPat = BPAT_WITHRECIPERIGHT_START;
bodyLoopPat = BPAT_WITHRECIPERIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1588,6 +1712,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
bodyStartPat = BPAT_WITHSNOWMANRIGHT_START;
bodyLoopPat = BPAT_WITHSNOWMANRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1606,6 +1733,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
bodyStartPat = BPAT_WITHNOTEBOOKRIGHT_START;
bodyLoopPat = BPAT_WITHNOTEBOOKRIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1624,6 +1754,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
bodyStartPat = BPAT_WITHMEGAPHONERIGHT_START;
bodyLoopPat = BPAT_WITHMEGAPHONERIGHT_LOOP;
break;
+
+ default:
+ break;
}
break;
@@ -1646,6 +1779,9 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
headLoopPat = PAT_TALKBEARD_RIGHT;
headPat = 0;
break;
+
+ default:
+ break;
}
break;
@@ -1675,6 +1811,7 @@ void RMTony::startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &he
_nBodyOffset.set(6, 56);
break;
+ case UP:
default:
break;
}
@@ -1725,6 +1862,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case DOWN:
finalPat = PAT_STANDRIGHT;
break;
+
+ default:
+ break;
}
switch (nTalk) {
@@ -1739,6 +1879,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHSNOWMANRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1753,6 +1896,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHRECIPERIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1767,6 +1913,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHRABBITRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1781,6 +1930,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHCARDSRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1795,6 +1947,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHNOTEBOOKRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1809,6 +1964,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHMEGAPHONERIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1823,6 +1981,9 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
case RIGHT:
bodyEndPat = BPAT_WITHBEARDRIGHT_END;
break;
+
+ default:
+ break;
}
break;
@@ -1840,6 +2001,7 @@ void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &f
headEndPat = PAT_SCAREDRIGHT_END;
break;
+ case UP:
default:
break;
}