diff options
author | D G Turner | 2019-10-23 23:42:38 +0100 |
---|---|---|
committer | D G Turner | 2019-10-23 23:42:38 +0100 |
commit | 0386fd0eea6df3688cd4da988d7c1b3a377b1240 (patch) | |
tree | bbff3ae0965bf9f7cd8ad30dbae2032db262bb51 /engines/hopkins/script.cpp | |
parent | e15428c43fc62f3e139d6b97e61624941f7e08ba (diff) | |
download | scummvm-rg350-0386fd0eea6df3688cd4da988d7c1b3a377b1240.tar.gz scummvm-rg350-0386fd0eea6df3688cd4da988d7c1b3a377b1240.tar.bz2 scummvm-rg350-0386fd0eea6df3688cd4da988d7c1b3a377b1240.zip |
HOPKINS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/hopkins/script.cpp')
-rw-r--r-- | engines/hopkins/script.cpp | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index b0d8749c7f..96d5204c8e 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -159,6 +159,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case LANG_SP: _vm->_fontMan->initTextBuffers(9, mesgId, "OBJETES.TXT", 2 * textPosX, 60, 6, dataP[7], 253); break; + default: + break; } } @@ -458,6 +460,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { if (_vm->_globals->_actionDirection == DIR_LEFT) _vm->_objectsMan->doActionLeft(8); break; + default: + break; } } opcodeType = 1; @@ -797,6 +801,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 29: playFl = false; break; + default: + break; } switch (_vm->_objectsMan->getBobAnimDataIdx(10)) { @@ -822,6 +828,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 3); playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(9) == 36) @@ -870,6 +878,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 9: playFl = false; break; + default: + break; } switch (_vm->_objectsMan->getBobAnimDataIdx(10)) { @@ -882,6 +892,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 12: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(9) == endIdx) @@ -1024,6 +1036,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { _vm->_objectsMan->setBobAnimation(3); playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(3) == 48) @@ -1069,6 +1083,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 5: playFl = false; break; + default: + break; } switch (_vm->_objectsMan->getBobAnimDataIdx(4)) { @@ -1081,6 +1097,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 6: playFl = false; break; + default: + break; } if (_vm->_objectsMan->getBobAnimDataIdx(13) == 8) { @@ -1140,6 +1158,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 5: playFl = false; break; + default: + break; } switch (_vm->_objectsMan->getBobAnimDataIdx(8)) { @@ -1152,6 +1172,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 12: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); @@ -1251,6 +1273,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 8: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(1) == 9) @@ -1288,6 +1312,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 8: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(1) == 9) @@ -1469,6 +1495,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 56: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(4) == 72) @@ -1497,6 +1525,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 56: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(6) == 72) @@ -1525,6 +1555,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 56: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(5) == 72) @@ -1836,6 +1868,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 11: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(3) == 50) @@ -1865,6 +1899,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 11: playFl = false; break; + default: + break; } _vm->_events->refreshScreenAndEvents(); if (_vm->_objectsMan->getBobAnimDataIdx(4) == 24) @@ -2110,6 +2146,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 3: vbobFrameIndex = 4; break; + default: + break; } _vm->_soundMan->playSoundFile("SOUND83.WAV"); _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false); @@ -2127,6 +2165,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; + default: + break; } } _vm->_soundMan->playSoundFile("SOUND83.WAV"); @@ -2146,6 +2186,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 3: vbobFrameIndex = 4; break; + default: + break; } if (_vm->_globals->_saveData->_data[svField341]) { @@ -2165,6 +2207,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; + default: + break; } } @@ -2185,6 +2229,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { case 3: vbobFrameIndex = 4; break; + default: + break; } if (_vm->_globals->_saveData->_data[svField341]) { @@ -2203,6 +2249,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; + default: + break; } } _vm->_soundMan->playSoundFile("SOUND83.WAV"); @@ -2244,6 +2292,8 @@ int ScriptManager::handleOpcode(const byte *dataP) { soundFlag = true; } break; + default: + break; } } while (_vm->_objectsMan->getBobAnimDataIdx(1) != 32); _vm->_objectsMan->stopBobAnimation(1); @@ -2447,6 +2497,9 @@ int ScriptManager::handleOpcode(const byte *dataP) { _vm->_objectsMan->setBobAnimation(12); _vm->_objectsMan->setBobAnimation(13); break; + + default: + break; } opcodeType = 1; break; @@ -2625,8 +2678,9 @@ int ScriptManager::checkOpcode(const byte *dataP) { case MKTAG24('J', 'U', 'M'): result = 6; break; -// default: -// warning("Unhandled opcode %c%c%c", dataP[2], dataP[3], dataP[4]); + default: + warning("Unhandled opcode %c%c%c", dataP[2], dataP[3], dataP[4]); + break; } return result; } |