diff options
author | D G Turner | 2019-12-23 11:56:16 +0000 |
---|---|---|
committer | D G Turner | 2019-12-23 11:56:16 +0000 |
commit | 59b639ed4d9b8c45644053641522dedabd12fa56 (patch) | |
tree | cc98618132f1de362fca07369718af68df44e70a /engines/scumm/players | |
parent | d5808d2903e2cc2a04e8545b84f1528230a9b010 (diff) | |
download | scummvm-rg350-59b639ed4d9b8c45644053641522dedabd12fa56.tar.gz scummvm-rg350-59b639ed4d9b8c45644053641522dedabd12fa56.tar.bz2 scummvm-rg350-59b639ed4d9b8c45644053641522dedabd12fa56.zip |
SCUMM: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/scumm/players')
-rw-r--r-- | engines/scumm/players/player_apple2.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/players/player_nes.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/players/player_pce.cpp | 1 | ||||
-rw-r--r-- | engines/scumm/players/player_v1.cpp | 16 | ||||
-rw-r--r-- | engines/scumm/players/player_v2a.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/players/player_v2base.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/players/player_v2cms.cpp | 3 |
7 files changed, 45 insertions, 0 deletions
diff --git a/engines/scumm/players/player_apple2.cpp b/engines/scumm/players/player_apple2.cpp index cba32bef2c..4eb3a074b0 100644 --- a/engines/scumm/players/player_apple2.cpp +++ b/engines/scumm/players/player_apple2.cpp @@ -409,6 +409,8 @@ void Player_AppleII::startSound(int nr) { case 5: _soundFunc = new AppleII_SoundFunction5_Noise(); break; + default: + break; } _soundFunc->init(this, _params); diff --git a/engines/scumm/players/player_nes.cpp b/engines/scumm/players/player_nes.cpp index b2f6eb0d40..02b999dc7c 100644 --- a/engines/scumm/players/player_nes.cpp +++ b/engines/scumm/players/player_nes.cpp @@ -179,6 +179,9 @@ void Square::Write(int Reg, byte Val) { if (!Enabled) Timer = 0; break; + + default: + break; } CheckActive(); } @@ -297,6 +300,9 @@ void Triangle::Write(int Reg, byte Val) { if (!Enabled) Timer = 0; break; + + default: + break; } CheckActive(); } @@ -394,6 +400,9 @@ void Noise::Write(int Reg, byte Val) { if (!Enabled) Timer = 0; break; + + default: + break; } } @@ -483,6 +492,8 @@ void APU::WriteReg(int Addr, byte Val) { _triangle.Write(4,Val & 0x4); _noise.Write(4,Val & 0x8); break; + default: + break; } } @@ -1025,6 +1036,9 @@ top: _mchan[x].envflags = 0x00; _mchan[x].voldelta = -10; break; + + default: + break; } } diff --git a/engines/scumm/players/player_pce.cpp b/engines/scumm/players/player_pce.cpp index 778c40f46d..31210025ca 100644 --- a/engines/scumm/players/player_pce.cpp +++ b/engines/scumm/players/player_pce.cpp @@ -340,6 +340,7 @@ void PSG_HuC6280::write(int offset, byte data) { break; case 0x40: + default: break; case 0x80: diff --git a/engines/scumm/players/player_v1.cpp b/engines/scumm/players/player_v1.cpp index b65c8a4d56..7c9ce0b614 100644 --- a/engines/scumm/players/player_v1.cpp +++ b/engines/scumm/players/player_v1.cpp @@ -192,6 +192,8 @@ void Player_V1::parseSpeakerChunk() { debug(6, "chunk 3: %d -> %d step %d", _start, _end, _delta); break; + default: + break; } } @@ -239,6 +241,7 @@ void Player_V1::nextSpeakerCmd() { set_mplex(_start); _forced_level = -_forced_level; break; + case 3: _start = (_start + _delta) & 0xffff; if (_start == _end) { @@ -251,6 +254,9 @@ void Player_V1::nextSpeakerCmd() { set_mplex((_start & lsr) | 0x180); _forced_level = -_forced_level; break; + + default: + break; } } @@ -365,6 +371,7 @@ parse_again: debug(6, "chunk 2: %d -> %d step %d", _start, _end, _delta); break; + case 3: set_mplex(READ_LE_UINT16(_next_chunk)); tmp = READ_LE_UINT16(_next_chunk + 2); @@ -379,6 +386,9 @@ parse_again: _delta = (int16) READ_LE_UINT16(_next_chunk + 8); _next_chunk += 10; break; + + default: + break; } } @@ -438,6 +448,8 @@ void Player_V1::nextPCjrCmd() { } } break; + default: + break; } } break; @@ -485,6 +497,7 @@ void Player_V1::nextPCjrCmd() { debug(7, "chunk 2: mplex %d curve %d", _start, _forced_level); _forced_level = -_forced_level; break; + case 3: dummy = _channels[3].volume + _delta; if (dummy >= 15) { @@ -503,6 +516,9 @@ void Player_V1::nextPCjrCmd() { _delta = READ_LE_UINT16(_next_chunk); _next_chunk += 2; break; + + default: + break; } } diff --git a/engines/scumm/players/player_v2a.cpp b/engines/scumm/players/player_v2a.cpp index 80a80a5584..3431c1668a 100644 --- a/engines/scumm/players/player_v2a.cpp +++ b/engines/scumm/players/player_v2a.cpp @@ -1401,6 +1401,8 @@ public: _mod->setChannelFreq(_id | 0x100, BASE_FREQUENCY / freq); _mod->setChannelVol(_id | 0x100, vol); break; + default: + break; } _loop = (_loop + 1) & 3; if (!_loop) { @@ -1457,6 +1459,8 @@ public: _mod->setChannelFreq(_id | 0x100, BASE_FREQUENCY / freq); _mod->setChannelVol(_id | 0x100, vol); break; + default: + break; } _loop = (_loop + 1) & 3; if (!_loop) { @@ -1638,6 +1642,8 @@ public: _volmod = 16; } break; + default: + break; } return true; } diff --git a/engines/scumm/players/player_v2base.cpp b/engines/scumm/players/player_v2base.cpp index 7d3dab7935..7aaeafe090 100644 --- a/engines/scumm/players/player_v2base.cpp +++ b/engines/scumm/players/player_v2base.cpp @@ -504,6 +504,9 @@ void Player_V2Base::execute_cmd(ChannelInfo *channel) { if (opcode == 0) goto end; break; + + default: + break; } } else { // opcode < 0xf8 for (;;) { diff --git a/engines/scumm/players/player_v2cms.cpp b/engines/scumm/players/player_v2cms.cpp index 94ba2cd388..d42fe5ed00 100644 --- a/engines/scumm/players/player_v2cms.cpp +++ b/engines/scumm/players/player_v2cms.cpp @@ -391,6 +391,9 @@ void Player_V2CMS::processChannel(Voice2 *channel) { case Voice2::kEnvelopeRelease: processRelease(channel); break; + + default: + break; } } |