aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-11-30 23:50:44 +0000
committerD G Turner2019-11-30 23:50:44 +0000
commitc2149c042e03930fea0eaed252a630ca63ec6af6 (patch)
tree15f2f3c6135bbb30b491967145a690d66ad59b94
parentb25c4b21fdd6f911b94fb411087078ecf756691e (diff)
downloadscummvm-rg350-c2149c042e03930fea0eaed252a630ca63ec6af6.tar.gz
scummvm-rg350-c2149c042e03930fea0eaed252a630ca63ec6af6.tar.bz2
scummvm-rg350-c2149c042e03930fea0eaed252a630ca63ec6af6.zip
TITANIC: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
-rw-r--r--engines/titanic/game/chev_code.cpp3
-rw-r--r--engines/titanic/game/fan.cpp2
-rw-r--r--engines/titanic/game/transport/pellerator.cpp3
-rw-r--r--engines/titanic/game/transport/service_elevator.cpp2
-rw-r--r--engines/titanic/npcs/deskbot.cpp13
-rw-r--r--engines/titanic/npcs/doorbot.cpp3
-rw-r--r--engines/titanic/sound/music_room_instrument.cpp3
-rw-r--r--engines/titanic/star_control/star_camera.cpp1
-rw-r--r--engines/titanic/star_control/star_control.cpp3
-rw-r--r--engines/titanic/star_control/surface_area.cpp3
-rw-r--r--engines/titanic/true_talk/barbot_script.cpp2
-rw-r--r--engines/titanic/true_talk/bellbot_script.cpp3
-rw-r--r--engines/titanic/true_talk/deskbot_script.cpp3
-rw-r--r--engines/titanic/true_talk/liftbot_script.cpp2
-rw-r--r--engines/titanic/true_talk/maitred_script.cpp5
15 files changed, 47 insertions, 4 deletions
diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp
index 6c27b1fd83..8b08ce8bbe 100644
--- a/engines/titanic/game/chev_code.cpp
+++ b/engines/titanic/game/chev_code.cpp
@@ -250,6 +250,9 @@ bool CChevCode::CheckChevCode(CCheckChevCode *msg) {
else
classNum = 5;
break;
+
+ default:
+ break;
}
}
}
diff --git a/engines/titanic/game/fan.cpp b/engines/titanic/game/fan.cpp
index a115a569d8..08d2c8f62a 100644
--- a/engines/titanic/game/fan.cpp
+++ b/engines/titanic/game/fan.cpp
@@ -57,6 +57,8 @@ bool CFan::EnterViewMsg(CEnterViewMsg *msg) {
case 2:
playMovie(63, 65, MOVIE_REPEAT);
break;
+ default:
+ break;
}
return true;
diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp
index 55f701f0f0..7d8dda1f20 100644
--- a/engines/titanic/game/transport/pellerator.cpp
+++ b/engines/titanic/game/transport/pellerator.cpp
@@ -127,7 +127,10 @@ bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
playMovie(3, 71, 0);
for (int idx = 0; idx < 3; ++idx)
playMovie(299, 304, 0);
+ break;
+ default:
+ break;
}
}
} else {
diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp
index e3e6306e3a..adae8e0f72 100644
--- a/engines/titanic/game/transport/service_elevator.cpp
+++ b/engines/titanic/game/transport/service_elevator.cpp
@@ -97,6 +97,8 @@ bool CServiceElevator::ServiceElevatorMsg(CServiceElevatorMsg *msg) {
case 3:
_v3 = 2;
break;
+ default:
+ break;
}
CServiceElevatorFloorRequestMsg requestMsg;
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
index 825e12922f..d3ad23b9df 100644
--- a/engines/titanic/npcs/deskbot.cpp
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -239,10 +239,15 @@ bool CDeskbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
break;
case 26:
- _npcFlags |= NPCFLAG_MOVE_FINISH;
- CTurnOff turnOff;
- turnOff.execute(this);
- lockMouse();
+ {
+ _npcFlags |= NPCFLAG_MOVE_FINISH;
+ CTurnOff turnOff;
+ turnOff.execute(this);
+ lockMouse();
+ }
+ break;
+
+ default:
break;
}
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 5512468099..aae1914f95 100644
--- a/engines/titanic/npcs/doorbot.cpp
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -218,6 +218,9 @@ bool CDoorbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
dismissMsg.execute(this);
break;
}
+
+ default:
+ break;
}
return true;
diff --git a/engines/titanic/sound/music_room_instrument.cpp b/engines/titanic/sound/music_room_instrument.cpp
index 99ead2f8eb..15ba768536 100644
--- a/engines/titanic/sound/music_room_instrument.cpp
+++ b/engines/titanic/sound/music_room_instrument.cpp
@@ -84,6 +84,9 @@ CMusicRoomInstrument::CMusicRoomInstrument(CProjectItem *project, CSoundManager
_gameObjects[2] = static_cast<CGameObject *>(_project->findByName("Snake_Head"));
_insStartTime = 0.17;
break;
+
+ default:
+ break;
}
}
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index 4a5515f419..fa1c8f2c82 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -392,6 +392,7 @@ void CStarCamera::setViewportAngle(const FPoint &angles) {
// All three stars are locked on in this case so the camera does not move
// in response to the users mouse movements
case THREE_LOCKED:
+ default:
break;
}
}
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp
index 7922a2f7f2..95ae3883e9 100644
--- a/engines/titanic/star_control/star_control.cpp
+++ b/engines/titanic/star_control/star_control.cpp
@@ -261,6 +261,9 @@ void CStarControl::doAction(StarControlAction action) {
case STAR_19:
_view.starDestinationSet();
break;
+
+ default:
+ break;
}
}
diff --git a/engines/titanic/star_control/surface_area.cpp b/engines/titanic/star_control/surface_area.cpp
index a4b8d44ff7..c34ba1ebe2 100644
--- a/engines/titanic/star_control/surface_area.cpp
+++ b/engines/titanic/star_control/surface_area.cpp
@@ -116,6 +116,9 @@ void CSurfaceArea::pixelToRGB(uint pixel, uint *rgb) {
case 4:
*rgb = pixel;
break;
+
+ default:
+ break;
}
}
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp
index 241976f9cf..b9f3e3aff8 100644
--- a/engines/titanic/true_talk/barbot_script.cpp
+++ b/engines/titanic/true_talk/barbot_script.cpp
@@ -851,6 +851,8 @@ ScriptChangedResult BarbotScript::scriptChanged(const TTroomScript *roomScript,
addResponse(getDialogueId(250579));
break;
+ default:
+ break;
}
if (id >= 250000 && id <= 251900) {
diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp
index 46c57750f8..561cbd2595 100644
--- a/engines/titanic/true_talk/bellbot_script.cpp
+++ b/engines/titanic/true_talk/bellbot_script.cpp
@@ -156,6 +156,9 @@ int BellbotScript::process(const TTroomScript *roomScript, const TTsentence *sen
result = processEntries(&_sentences[getValue(6) ? 5 : 4], 0, roomScript, sentence);
}
break;
+
+ default:
+ break;
}
if (result == 2)
diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp
index 3988002f07..1632df26ef 100644
--- a/engines/titanic/true_talk/deskbot_script.cpp
+++ b/engines/titanic/true_talk/deskbot_script.cpp
@@ -175,6 +175,9 @@ ScriptChangedResult DeskbotScript::scriptChanged(const TTroomScript *roomScript,
case 150:
CTrueTalkManager::setFlags(2, 1);
break;
+
+ default:
+ break;
}
return SCR_2;
diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp
index 6dfa8d88db..9afbf5f3cb 100644
--- a/engines/titanic/true_talk/liftbot_script.cpp
+++ b/engines/titanic/true_talk/liftbot_script.cpp
@@ -320,6 +320,8 @@ int LiftbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'R', 'A', '3'):
tag2 = MKTAG('T', 'R', 'A', 'V');
break;
+ default:
+ break;
}
return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
diff --git a/engines/titanic/true_talk/maitred_script.cpp b/engines/titanic/true_talk/maitred_script.cpp
index 99e9c04384..6c212cb7d6 100644
--- a/engines/titanic/true_talk/maitred_script.cpp
+++ b/engines/titanic/true_talk/maitred_script.cpp
@@ -484,6 +484,8 @@ int MaitreDScript::handleQuote(const TTroomScript *roomScript, const TTsentence
case MKTAG('T', 'R', 'A', '3'):
tag2 = MKTAG('T', 'R', 'A', 'V');
break;
+ default:
+ break;
}
return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
@@ -1062,6 +1064,9 @@ int MaitreDScript::preprocess(const TTroomScript *roomScript, const TTsentence *
applyFlag = true;
}
break;
+
+ default:
+ break;
}
if (applyFlag)