aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/ai
diff options
context:
space:
mode:
authorThanasis Antoniou2019-06-12 17:00:36 +0300
committerThanasis Antoniou2019-06-12 17:00:36 +0300
commitc6ea4f88fac533302e5939bbd795a256d4bbf2ad (patch)
treec44f3d2b0789ac3025186b8ab30250f291d7dfc6 /engines/bladerunner/script/ai
parente3e33124539c6ba7bbe426a5af66873762191d37 (diff)
downloadscummvm-rg350-c6ea4f88fac533302e5939bbd795a256d4bbf2ad.tar.gz
scummvm-rg350-c6ea4f88fac533302e5939bbd795a256d4bbf2ad.tar.bz2
scummvm-rg350-c6ea4f88fac533302e5939bbd795a256d4bbf2ad.zip
BLADERUNNER: Suppress fall through warnings
When BLADERUNNER_ORIGINAL_BUGS is 1
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r--engines/bladerunner/script/ai/officer_grayford.cpp10
-rw-r--r--engines/bladerunner/script/ai/officer_leary.cpp20
2 files changed, 15 insertions, 15 deletions
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index d7bf65c650..9e4f0b8602 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 1f660146f7..6bbfb1809f 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