From 95ed614f5f0e19d7a2c1cada56d8ba211a401c63 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 11 Nov 2019 21:47:17 +0000 Subject: AGOS: Fix Missing Default Switch Cases when AGOS2 is enabled These are flagged by GCC if -Wswitch-default is enabled. --- engines/agos/event.cpp | 4 ++++ engines/agos/script_ff.cpp | 2 ++ 2 files changed, 6 insertions(+) (limited to 'engines/agos') diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index b70ec674dd..62d59ca56b 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -695,11 +695,13 @@ void AGOSEngine_DIMP::dimpIdle() { while (z == 0) { n = _rnd.getRandomNumber(2); switch (n) { + default: case(0): if (_variableArray[110] > 2) break; n = _rnd.getRandomNumber(6); switch (n) { + default: case(0): loadSoundFile("And01.wav");break; case(1): loadSoundFile("And02.wav");break; case(2): loadSoundFile("And03.wav");break; @@ -715,6 +717,7 @@ void AGOSEngine_DIMP::dimpIdle() { break; n = _rnd.getRandomNumber(6); switch (n) { + default: case(0): loadSoundFile("And08.wav");break; case(1): loadSoundFile("And09.wav");break; case(2): loadSoundFile("And0a.wav");break; @@ -730,6 +733,7 @@ void AGOSEngine_DIMP::dimpIdle() { break; n = _rnd.getRandomNumber(4); switch (n) { + default: case(0): loadSoundFile("And0f.wav");break; case(1): loadSoundFile("And0g.wav");break; case(2): loadSoundFile("And0h.wav");break; diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp index 10c9e995d4..bd97bd649c 100644 --- a/engines/agos/script_ff.cpp +++ b/engines/agos/script_ff.cpp @@ -328,6 +328,8 @@ void AGOSEngine_Feeble::setLoyaltyRating(byte rating) { // Arriving at rebel base: Freedom Fighters Operative writeVariable(120, 6); break; + default: + break; } } -- cgit v1.2.3