diff options
author | D G Turner | 2019-12-01 00:31:33 +0000 |
---|---|---|
committer | D G Turner | 2019-12-01 00:31:33 +0000 |
commit | 719decda5545af100defe6faadaa919004d3c8af (patch) | |
tree | bb5a0c905d11097c915d10505fa9d51ec9a38e3f /engines | |
parent | f80947183c16e4be5f651f0ba2202446faf1ba8b (diff) | |
download | scummvm-rg350-719decda5545af100defe6faadaa919004d3c8af.tar.gz scummvm-rg350-719decda5545af100defe6faadaa919004d3c8af.tar.bz2 scummvm-rg350-719decda5545af100defe6faadaa919004d3c8af.zip |
SUPERNOVA: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/game-manager.cpp | 3 | ||||
-rw-r--r-- | engines/supernova/screen.cpp | 1 | ||||
-rw-r--r-- | engines/supernova/supernova1/rooms.cpp | 19 | ||||
-rw-r--r-- | engines/supernova/supernova1/state.cpp | 15 | ||||
-rw-r--r-- | engines/supernova/supernova2/rooms.cpp | 14 | ||||
-rw-r--r-- | engines/supernova/supernova2/state.cpp | 10 |
6 files changed, 60 insertions, 2 deletions
diff --git a/engines/supernova/game-manager.cpp b/engines/supernova/game-manager.cpp index 1af355b4d9..8dee92fdc5 100644 --- a/engines/supernova/game-manager.cpp +++ b/engines/supernova/game-manager.cpp @@ -417,6 +417,7 @@ void GameManager::processInput() { _inventoryScroll += 2; break; case onNone: + default: break; } @@ -502,6 +503,7 @@ void GameManager::processInput() { break; case onObject: case onNone: + default: // Fallthrough break; } @@ -539,6 +541,7 @@ void GameManager::processInput() { _currentInputObject = _currentRoom->getObject(_mouseField); break; case onNone: + default: break; } } diff --git a/engines/supernova/screen.cpp b/engines/supernova/screen.cpp index 8aacbe83b0..6d7071720f 100644 --- a/engines/supernova/screen.cpp +++ b/engines/supernova/screen.cpp @@ -547,6 +547,7 @@ void Screen::renderMessage(const char *text, MessagePosition position, int posit switch (position) { case kMessageNormal: + default: x = 160 - rowWidthMax / 2; textColor = kColorWhite99; break; diff --git a/engines/supernova/supernova1/rooms.cpp b/engines/supernova/supernova1/rooms.cpp index 462e0e17e0..a473a113d7 100644 --- a/engines/supernova/supernova1/rooms.cpp +++ b/engines/supernova/supernova1/rooms.cpp @@ -1990,6 +1990,9 @@ bool ArsanoEntrance::interact(Action verb, Object &obj1, Object &obj2) { break; case 3: _gm->reply(kStringArsanoEntrance9, 1, _gm->invertSection(1)); + break; + default: + break; } } while (e != 4); } else if (_gm->dialog(5, row2, _dialog2, 0) != 4) @@ -2043,6 +2046,8 @@ bool ArsanoEntrance::interact(Action verb, Object &obj1, Object &obj2) { _gm->wait(2); _vm->renderImage(_gm->invertSection(3)); break; + default: + break; } removeSentence(0, 1); } @@ -2307,6 +2312,9 @@ void ArsanoRemaining::animation() { break; case 34: _vm->renderImage(4); + break; + default: + break; } _i = (_i + 1) % 35; @@ -2430,6 +2438,9 @@ bool ArsanoRoger::interact(Action verb, Object &obj1, Object &obj2) { _gm->reply(kStringArsanoRoger33, 2, 2 + kSectionInvert); _gm->say(kStringArsanoRoger34); _gm->reply(kStringArsanoRoger35, 2, 2 + kSectionInvert); + break; + default: + break; } } } else if (((verb == ACTION_USE) && Object::combine(obj1, obj2, CHESS, ROGER_W)) || @@ -2557,6 +2568,9 @@ bool ArsanoGlider::interact(Action verb, Object &obj1, Object &obj2) { _vm->renderImage(_gm->invertSection(r + 15)); r--; } + break; + default: + break; } } _gm->wait(4); @@ -2835,6 +2849,9 @@ bool ArsanoMeetup3::interact(Action verb, Object &obj1, Object &obj2) { _gm->say(kStringArsanoMeetup3_23); _gm->reply(kStringArsanoMeetup3_24, 1, 1 + kSectionInvert); _gm->reply(kStringArsanoMeetup3_25, 1, 1 + kSectionInvert); + break; + default: + break; } removeSentence(2, 2); } while (!allSentencesRemoved(4, 2)); @@ -3264,6 +3281,8 @@ bool AxacussCorridor5::handleMoneyDialog() { } _gm->reply(kStringAxacussCorridor5_6, 1, 1 + kSectionInvert); break; + default: + break; } } return false; diff --git a/engines/supernova/supernova1/state.cpp b/engines/supernova/supernova1/state.cpp index 95e6a18578..c75cb00f00 100644 --- a/engines/supernova/supernova1/state.cpp +++ b/engines/supernova/supernova1/state.cpp @@ -513,7 +513,8 @@ void GameManager1::telomat(int nr) { _currentRoom->removeSentence(1, 1); switch (dialog(3, rows1, dial1, 1)) { - case 1: _vm->renderMessage(kStringTelomat18, kMessageTop); + case 1: + _vm->renderMessage(kStringTelomat18, kMessageTop); wait(_messageDuration, true); _vm->removeMessage(); if ((_state._destination == 255) && !_rooms[BCORRIDOR]->isSectionVisible(7)) { @@ -523,7 +524,8 @@ void GameManager1::telomat(int nr) { _state._destination = nr; } break; - case 0: _vm->renderMessage(kStringTelomat19, kMessageTop); + case 0: + _vm->renderMessage(kStringTelomat19, kMessageTop); wait(_messageDuration, true); _vm->removeMessage(); if (dialog(4, rows2, dial2, 0) != 3) { @@ -534,6 +536,9 @@ void GameManager1::telomat(int nr) { _rooms[BCORRIDOR]->setSectionVisible(i + 1, true); _state._eventTime = kMaxTimerValue; _currentRoom->addSentence(0, 1); + break; + default: + break; } _guiEnabled = true; drawMapExits(); @@ -845,6 +850,9 @@ void GameManager1::guardWalkEvent() { case 3: walk(19); walk(18); + break; + default: + break; } if (!_state._playerHidden) { @@ -881,6 +889,9 @@ void GameManager1::guardWalkEvent() { case 3: for (int i = 18; i <= 20; i++) walk(i); + break; + default: + break; } if (behind) { diff --git a/engines/supernova/supernova2/rooms.cpp b/engines/supernova/supernova2/rooms.cpp index 4e8c428fb9..db60a48c35 100644 --- a/engines/supernova/supernova2/rooms.cpp +++ b/engines/supernova/supernova2/rooms.cpp @@ -459,6 +459,8 @@ void Street::animation() { setSectionVisible(4, kShownTrue); setSectionVisible(5, kShownTrue); break; + default: + break; } banks++; if (banks == 10) banks = 0; @@ -779,6 +781,8 @@ bool Kiosk::interact(Action verb, Object &obj1, Object &obj2) { case 2: _gm->reply(kStringImSorry, 1, 1 + kSectionInvert); break; + default: + break; } _gm->drawGUI(); } else @@ -894,6 +898,8 @@ bool CulturePalace::interact(Action verb, Object &obj1, Object &obj2) { _shown[kMaxSection - 2] = true; } break; + default: + break; } } _vm->renderImage(1 + kSectionInvert); @@ -1135,6 +1141,8 @@ bool Checkout::interact(Action verb, Object &obj1, Object &obj2) { case 2: _gm->reply(kStringCheckout47, 1, 1 + kSectionInvert); break; + default: + break; } _gm->drawGUI(); break; @@ -1144,6 +1152,8 @@ bool Checkout::interact(Action verb, Object &obj1, Object &obj2) { case 2: _gm->reply(kStringCheckout49, 1, 1 + kSectionInvert); break; + default: + break; } } } else @@ -1661,6 +1671,8 @@ bool Elevator2::interact(Action verb, Object &obj1, Object &obj2) { setSectionVisible(2, kShownFalse); _vm->renderImage(1 + kSectionInvert); break; + default: + break; } _gm->drawGUI(); } else @@ -1757,6 +1769,8 @@ void Elevator2::jobDescription() { case 2: _gm->reply(kStringElevator52, 1, 1 + kSectionInvert); break; + default: + break; } if (e == 1 || e == 2) _gm->reply(kStringElevator53, 1, 1 + kSectionInvert); diff --git a/engines/supernova/supernova2/state.cpp b/engines/supernova/supernova2/state.cpp index 28a2c0a710..e61d4e1779 100644 --- a/engines/supernova/supernova2/state.cpp +++ b/engines/supernova/supernova2/state.cpp @@ -824,6 +824,8 @@ void GameManager2::taxiPayment(int price, int destination) { case 11: changeRoom(CITY2); break; + default: + break; } } } @@ -1065,6 +1067,8 @@ void GameManager2::passageConstruction() { _rooms[PYR_ENTRANCE]->setSectionVisible(21, kShownTrue); _rooms[PYR_ENTRANCE]->getObject(0)->_click = 9; break; + default: + break; } } _rooms[PYR_ENTRANCE]->setSectionVisible(9, @@ -1158,6 +1162,8 @@ byte GameManager2::wall(int s, int z, int direction, int stepsForward, int steps return wall(s + stepsForward, z, newR, stepsRight, 0); case 3: return wall(s - stepsForward, z, newR, stepsRight, 0); + default: + break; } } switch (direction) { @@ -1169,6 +1175,8 @@ byte GameManager2::wall(int s, int z, int direction, int stepsForward, int steps return horizontal[_state._pyraE][z][s + stepsForward] == 0; case 3: return horizontal[_state._pyraE][z][s + 1 - stepsForward] == 0; + default: + break; } return 0; } @@ -1188,6 +1196,8 @@ bool GameManager2::move(Action verb, Object &obj) { case 3: _state._pyraS--; break; + default: + break; } } else if (verb == ACTION_WALK && obj._id == G_RIGHT) { _state._pyraDirection++; |