[Scummvm-git-logs] scummvm master -> 11ef6ef9da41a3f8438dac4d1da19a89b749c9d9

digitall 547637+digitall at users.noreply.github.com
Mon Oct 21 01:18:08 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
11ef6ef9da HUGO: Fix Missing Default Switch Cases


Commit: 11ef6ef9da41a3f8438dac4d1da19a89b749c9d9
    https://github.com/scummvm/scummvm/commit/11ef6ef9da41a3f8438dac4d1da19a89b749c9d9
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-21T00:14:37+01:00

Commit Message:
HUGO: Fix Missing Default Switch Cases

These are flagged by GCC if -Wswitch-default is enabled.

Changed paths:
    engines/hugo/display.cpp
    engines/hugo/hugo.cpp
    engines/hugo/intro.cpp
    engines/hugo/inventory.cpp
    engines/hugo/object_v1w.cpp
    engines/hugo/object_v2d.cpp
    engines/hugo/object_v3d.cpp
    engines/hugo/route.cpp


diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index 77df20e..2a466e6 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 ed82c04..9c609c3 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 e15291e..6c40740 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 b638322..d0afabc 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 736128b..524edf9 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 7acd05f..d8cc705 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 4805fde..e1a92ee 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 17c23ea..ed1a7fd 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;





More information about the Scummvm-git-logs mailing list