From 11ef6ef9da41a3f8438dac4d1da19a89b749c9d9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 21 Oct 2019 00:14:37 +0100 Subject: HUGO: Fix Missing Default Switch Cases These are flagged by GCC if -Wswitch-default is enabled. --- engines/hugo/display.cpp | 2 ++ engines/hugo/hugo.cpp | 4 ++++ engines/hugo/intro.cpp | 6 ++++++ engines/hugo/inventory.cpp | 3 +++ engines/hugo/object_v1w.cpp | 2 ++ engines/hugo/object_v2d.cpp | 2 ++ engines/hugo/object_v3d.cpp | 2 ++ engines/hugo/route.cpp | 4 ++++ 8 files changed, 25 insertions(+) (limited to 'engines/hugo') diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 77df20eda5..2a466e6f84 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -385,6 +385,8 @@ void Screen::displayList(int update, ...) { } _dlAddIndex = 0; // Reset add-list break; + default: + break; } } diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index ed82c04d7d..9c609c3c3a 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -287,6 +287,8 @@ Common::Error HugoEngine::run() { _object = new ObjectHandler_v3d(this); _normalTPS = 9; break; + default: + break; } if (!loadHugoDat()) @@ -422,6 +424,8 @@ void HugoEngine::runMachine() { gameStatus._viewState = kViewIdle; _status._doQuitFl = true; break; + default: + break; } } diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index e15291e03b..6c40740e4e 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -223,6 +223,8 @@ bool intro_v1d::introPlay() { strcpy(buffer, "E n j o y !"); _font.drawString(&_surf, buffer, 0, 100, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; + default: + break; } _vm->_screen->displayBackground(); @@ -339,6 +341,8 @@ bool intro_v3d::introPlay() { case 35: Utils::notifyBox(_vm->_text->getTextIntro(kIntro3)); break; + default: + break; } } @@ -431,6 +435,8 @@ bool intro_v3w::introPlay() { case 35: Utils::notifyBox(_vm->_text->getTextIntro(kIntro3)); break; + default: + break; } } diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp index b638322847..d0afabcfb4 100644 --- a/engines/hugo/inventory.cpp +++ b/engines/hugo/inventory.cpp @@ -202,6 +202,8 @@ int16 InventoryHandler::processInventory(const int action, ...) { } } break; + default: + break; } return objId; // For the INV_GET action } @@ -215,6 +217,7 @@ void InventoryHandler::runInventory() { debugC(1, kDebugInventory, "runInventory"); switch (_inventoryState) { + default: case kInventoryOff: // Icon bar off screen break; case kInventoryUp: // Icon bar moving up diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index 736128b006..524edf901c 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -228,6 +228,8 @@ void ObjectHandler_v1w::moveObjects() { obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; + default: + break; } if (obj->_vx || obj->_vy) { diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp index 7acd05fe61..d8cc70554b 100644 --- a/engines/hugo/object_v2d.cpp +++ b/engines/hugo/object_v2d.cpp @@ -231,6 +231,8 @@ void ObjectHandler_v2d::moveObjects() { obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; + default: + break; } if (obj->_vx || obj->_vy) { diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp index 4805fde460..e1a92ee15a 100644 --- a/engines/hugo/object_v3d.cpp +++ b/engines/hugo/object_v3d.cpp @@ -112,6 +112,8 @@ void ObjectHandler_v3d::moveObjects() { obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; + default: + break; } if (obj->_vx || obj->_vy) { diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 17c23ea785..ed1a7fd788 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -108,6 +108,8 @@ void Route::setDirection(const uint16 keyCode) { case Common::KEYCODE_KP3: obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; break; + default: + break; } } @@ -171,6 +173,8 @@ void Route::setWalk(const uint16 direction) { // Note: in v1 Dos and v2 Dos, obj->vy is set to DY obj->_vy = kStepDy / 2; break; + default: + break; } _oldWalkDirection = direction; obj->_cycling = kCycleForward; -- cgit v1.2.3