Skip to content
Permalink
Browse files

TOON: Fix Missing Default Switch Cases

These are flagged by GCC if -Wswitch-default is enabled.
  • Loading branch information...
digitall committed Nov 9, 2019
1 parent 5447a13 commit 29aef74f6619e943b820497cb2a22175a8870804
Showing with 16 additions and 2 deletions.
  1. +2 −0 engines/toon/picture.cpp
  2. +14 −2 engines/toon/toon.cpp
@@ -127,6 +127,8 @@ bool Picture::loadPicture(const Common::String &file) {
_height = TOON_SCREEN_HEIGHT;
return true;
}
default:
break;
}
return false;
}
@@ -1064,6 +1064,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
case MAINMENUHOTSPOT_HOTKEYSCLOSE:
menuMask = MAINMENUMASK_BASE;
continue;
default:
break;
}

if (musicPlaying) {
@@ -1098,6 +1100,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
exitGame = true;
doExit = true;
break;
default:
break;
}
}

@@ -2886,7 +2890,7 @@ int32 ToonEngine::runConversationCommand(int16 **command) {
}
break;
case 103:
return result;
default:
break;
}
return result;
@@ -3972,7 +3976,6 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
break;
case 21:
switch (itemSrc) {

case 107:
characterTalk(1296);
replaceItemFromInventory(107, 109);
@@ -4001,6 +4004,8 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
setCursor(0, false, 0, 0);
rearrangeInventory();
return 1;
default:
break;
}
break;
case 22:
@@ -4316,6 +4321,8 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
setCursor(0, false, 0, 0);
rearrangeInventory();
return 1;
default:
break;
}
break;
case 71:
@@ -4628,6 +4635,9 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
} else if (itemSrc == 0x59 || itemSrc == 0x52) {
characterTalk(1496);
}
break;
default:
break;
}
return 0;
}
@@ -4822,6 +4832,8 @@ int32 ToonEngine::handleInventoryOnDrew(int32 itemId) {
runEventScript(_mouseX, _mouseY, 2, 108, 0);
}
return 1;
default:
break;
}
return 0;
}

0 comments on commit 29aef74

Please sign in to comment.
You can’t perform that action at this time.