From c6ea4f88fac533302e5939bbd795a256d4bbf2ad Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Wed, 12 Jun 2019 17:00:36 +0300 Subject: BLADERUNNER: Suppress fall through warnings When BLADERUNNER_ORIGINAL_BUGS is 1 --- engines/bladerunner/script/ai/officer_grayford.cpp | 10 +++++----- engines/bladerunner/script/ai/officer_leary.cpp | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'engines/bladerunner/script/ai') 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 -- cgit v1.2.3