From 129988d0e946c622fd8319a19666c623850dac6d Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 16 Nov 2019 11:30:12 +0000 Subject: ILLUSIONS: Fix Missing Default Switch Cases These are flagged by GCC if -Wswitch-default is enabled. --- engines/illusions/duckman/duckman_specialcode.cpp | 2 ++ engines/illusions/duckman/illusions_duckman.cpp | 8 +++++++- engines/illusions/duckman/scriptopcodes_duckman.cpp | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'engines/illusions/duckman') diff --git a/engines/illusions/duckman/duckman_specialcode.cpp b/engines/illusions/duckman/duckman_specialcode.cpp index a7f301ff1b..b00579befe 100644 --- a/engines/illusions/duckman/duckman_specialcode.cpp +++ b/engines/illusions/duckman/duckman_specialcode.cpp @@ -338,6 +338,8 @@ void DuckmanSpecialCode::spcHoldGlowingElvisPoster(OpCall &opCall) { _vm->_cursor._field14[_vm->_cursor._actorIndex - 1] = true; } break; + default: + break; } _vm->notifyThreadId(opCall._threadId); } diff --git a/engines/illusions/duckman/illusions_duckman.cpp b/engines/illusions/duckman/illusions_duckman.cpp index 326d8abb36..6e6d31d27a 100644 --- a/engines/illusions/duckman/illusions_duckman.cpp +++ b/engines/illusions/duckman/illusions_duckman.cpp @@ -790,6 +790,8 @@ void IllusionsEngine_Duckman::cursorControlRoutine(Control *control, uint32 delt case 4: _menuSystem->update(_cursor._control); break; + default: + break; } } } @@ -1188,9 +1190,13 @@ void IllusionsEngine_Duckman::playSoundEffect(int index) { case 18: soundEffectId = soundIds[26]; break; + default: + break; } - if (soundEffectId) + + if (soundEffectId) { _soundMan->playSound(soundEffectId, 255, 0); + } } bool IllusionsEngine_Duckman::getTriggerCause(uint32 verbId, uint32 objectId2, uint32 objectId, uint32 &outThreadId) { diff --git a/engines/illusions/duckman/scriptopcodes_duckman.cpp b/engines/illusions/duckman/scriptopcodes_duckman.cpp index 24e69db404..dc3415b57f 100644 --- a/engines/illusions/duckman/scriptopcodes_duckman.cpp +++ b/engines/illusions/duckman/scriptopcodes_duckman.cpp @@ -804,6 +804,8 @@ void ScriptOpcodes_Duckman::opCompareBlockCounter(ScriptThread *scriptThread, Op case 6: compareResult = lvalue <= rvalue; break; + default: + break; } _vm->_stack->push(compareResult ? 1 : 0); } -- cgit v1.2.3