[Scummvm-git-logs] scummvm master -> c6ea4f88fac533302e5939bbd795a256d4bbf2ad

antoniou79 antoniou at cti.gr
Wed Jun 12 16:01:26 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:
c6ea4f88fa BLADERUNNER: Suppress fall through warnings


Commit: c6ea4f88fac533302e5939bbd795a256d4bbf2ad
    https://github.com/scummvm/scummvm/commit/c6ea4f88fac533302e5939bbd795a256d4bbf2ad
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-06-12T17:00:36+03:00

Commit Message:
BLADERUNNER: Suppress fall through warnings

When BLADERUNNER_ORIGINAL_BUGS is 1

Changed paths:
    engines/bladerunner/script/ai/officer_grayford.cpp
    engines/bladerunner/script/ai/officer_leary.cpp


diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index d7bf65c..9e4f0b8 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -791,12 +791,12 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
 				return false;
 
 			}
-#if BLADERUNNER_ORIGINAL_BUGS
-			// fall through
-			// bug in the game - there should be nothing track related after AI_Movement_Track_Repeat
-#else
-			return false; // does it matter if false or true? case 9 and 10 return false
+#if !BLADERUNNER_ORIGINAL_BUGS
+			// does it matter if false or true? case 9 and 10 return false
+			return false;
 #endif // BLADERUNNER_ORIGINAL_BUGS
+			// bug in the game - there should be nothing track related after AI_Movement_Track_Repeat
+			// fall through
 		case 9:
 			if (Random_Query(0, 1)) {
 				// kSetUG09 -> kSetFreeSlotC
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index 1f66014..6bbfb18 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -539,11 +539,11 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
 			default:
 				return false;
 			}
-#if BLADERUNNER_ORIGINAL_BUGS
-			// fall through - a bug in original game
-#else
+#if !BLADERUNNER_ORIGINAL_BUGS
 			break;
 #endif // BLADERUNNER_ORIGINAL_BUGS
+			// a bug in original game - no break here
+			// fall through
 		case 9:
 			if (Random_Query(1, 2) == 2) {
 				// kSetUG09 -> kSetFreeSlotC
@@ -564,11 +564,11 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
 			AI_Movement_Track_Append(kActorOfficerLeary, 420, 10);
 			AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
 			AI_Movement_Track_Repeat(kActorOfficerLeary);
-#if BLADERUNNER_ORIGINAL_BUGS
-			// fall through - a bug in original game
-#else
+#if !BLADERUNNER_ORIGINAL_BUGS
 			return false;
 #endif // BLADERUNNER_ORIGINAL_BUGS
+			// a bug in original game - no break or return here
+			// fall through
 		case 10:
 			// kSetUG12 -> kSetFreeSlotC
 //			debug("leary 10 kSetUG12 -> kSetFreeSlotC");
@@ -582,11 +582,11 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
 		default:
 			return false;
 		}
-#if BLADERUNNER_ORIGINAL_BUGS
-		// fall through - a bug in original game
-#else
-		return false;
+#if !BLADERUNNER_ORIGINAL_BUGS
+			return false;
 #endif // BLADERUNNER_ORIGINAL_BUGS
+		// a bug in original game - no break or return here
+		// fall through
 	case kGoalOfficerLearyPrepareToHuntAroundAct4:
 		// aux goal in order to immediately switch back to kGoalOfficerLearyHuntingAroundAct4 goal
 		// and run GoalChanged() for kGoalOfficerLearyHuntingAroundAct4 again





More information about the Scummvm-git-logs mailing list