JANITORIAL: Silence more GCC 7 warnings

All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
This commit is contained in:
Torbjörn Andersson 2017-08-06 13:30:51 +02:00
parent 38a8015b83
commit 70a2ca8b7d
56 changed files with 187 additions and 160 deletions

View File

@ -584,7 +584,7 @@ void TrollEngine::gameLoop() {
printUserMessage(13);
break;
}
// fall down
// fall through
case OT_GO:
_currentRoom = roomParam;
_roomPicture = _roomPicStartIdx[_currentRoom];

View File

@ -78,7 +78,7 @@ void Oko::advance() {
case kStateBreathe:
if ((getFrame() == 6) || (getFrame() == 23))
_sound->blasterPlay(_breathe, 1, 0);
_sound->blasterPlay(_breathe, 1, 0);
case kStateSink:
case kStateRaise:
case kStateHurt:

View File

@ -1162,7 +1162,7 @@ void Scheduler::insertAction(Act *action) {
// Workaround: When dying, switch to storyMode in order to block the keyboard.
case GAMEOVER:
_vm->getGameStatus()._storyModeFl = true;
// No break on purpose
// fall through
default:
curEvent->_localActionFl = true; // Rest are for current screen only
break;

View File

@ -1286,7 +1286,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex
case 10:
if (_flags.gameID == GI_EOB1)
vl += _clericSpellOffset;
// drop through
// fall through
case 9:
// Mage/Cleric Scroll
if (!_currentControlMode)

View File

@ -1483,8 +1483,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
_malcolmFrame = 0;
_malcolmFlag = 2;
_malcolmTimer2 = 0;
// Fall through to the next case
// fall through
case 2:
if (_system->getMillis() >= _malcolmTimer2) {

View File

@ -385,7 +385,7 @@ IMPLEMENT_FUNCTION(12, Anna, practiceMusic)
setup_playSound("MAX1120");
break;
}
// Fallback to next case
// fall through
case 4:
--params->param1;
@ -452,7 +452,7 @@ IMPLEMENT_FUNCTION_IS(15, Anna, compartmentLogic, TimeValue)
setup_playSound("LIB013");
break;
}
// Fallback to next action
// fall through
case kActionKnock:
if (params->param5) {
@ -510,7 +510,7 @@ IMPLEMENT_FUNCTION_IS(15, Anna, compartmentLogic, TimeValue)
setup_playSound("MAX1120");
break;
}
// Fallback to next case
// fall through
case 2:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand);
@ -1467,7 +1467,7 @@ label_callback_1:
setup_playSound("MAX1120");
break;
}
// Fallback to next case
// fall through
case 4:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand);
@ -1857,7 +1857,7 @@ IMPLEMENT_FUNCTION(41, Anna, goBackToSleep)
setup_playSound("MAX1120");
break;
}
// Fallback to next case
// fall through
case 3:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand);
@ -2431,7 +2431,7 @@ IMPLEMENT_FUNCTION(53, Anna, dressing)
setup_playSound("LIB013");
break;
}
// Fallback to next case
// fall through
case kActionKnock:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorNormal, kCursorNormal);
@ -2495,7 +2495,7 @@ IMPLEMENT_FUNCTION(53, Anna, dressing)
setup_playSound("MAX1120");
break;
}
// Fallback to next case
// fall through
case 2:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand);
@ -2579,7 +2579,7 @@ IMPLEMENT_FUNCTION(54, Anna, giveMaxToConductor2)
setup_playSound("LIB013");
break;
}
// Fallback to next case
// fall through
case kActionKnock:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorNormal, kCursorNormal);
@ -2636,7 +2636,7 @@ IMPLEMENT_FUNCTION(54, Anna, giveMaxToConductor2)
setup_playSound("MAX1120");
break;
}
// Fallback to next case
// fall through
case 2:
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand);

View File

@ -358,7 +358,7 @@ IMPLEMENT_FUNCTION_II(19, August, function19, bool, bool)
strcpy((char *)&parameters->seq1, "666");
break;
}
// Fallback to next action
// fall through
case kChapter4:
case kChapter5:
@ -443,7 +443,7 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
strcpy((char *)&parameters->seq1, "666");
break;
}
// Fallback to next case
// fall through
case kChapter4:
case kChapter5:
@ -581,7 +581,7 @@ label_continue:
setup_savegame(kSavegameTypeEvent, kEventMeetAugustHisCompartment);
break;
}
// Fallback to next case
// fall through
case kActionKnock:
getObjects()->update(kObjectCompartment3, kEntityAugust, kObjectLocation1, kCursorNormal, kCursorNormal);

View File

@ -185,7 +185,7 @@ IMPLEMENT_FUNCTION_I(11, Boutarel, function11, bool)
getObjects()->update(kObjectCompartmentC, kEntityPlayer, kObjectLocation2, kCursorKeepValue, kCursorKeepValue);
else
getObjects()->update(kObjectCompartmentC, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
// Fallback to next case
// fall through
case 1:
getObjects()->update(kObject50, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);

View File

@ -1739,7 +1739,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function14(kEntityVerges);
break;
}
// Fallback to next case
// fall through
case 2:
if (ENTITY_PARAM(0, 5)) {
@ -1747,7 +1747,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function14(kEntityMertens);
break;
}
// Fallback to next case
// fall through
case 3:
if (ENTITY_PARAM(0, 4)) {
@ -1755,7 +1755,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function14(kEntityMmeBoutarel);
break;
}
// Fallback to next case
// fall through
case 4:
ENTITY_PARAM(2, 6) = 0;
@ -1776,7 +1776,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function37();
break;
}
// Fallback to next case
// fall through
case 7:
if (ENTITY_PARAM(2, 2)) {
@ -1784,7 +1784,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function39();
break;
}
// Fallback to next case
// fall through
case 8:
if (ENTITY_PARAM(1, 2)) {
@ -1792,7 +1792,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function55();
break;
}
// Fallback to next case
// fall through
case 9:
if (ENTITY_PARAM(1, 7)) {
@ -1800,7 +1800,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33)
setup_function34(false);
break;
}
// Fallback to next case
// fall through
case 10:
ENTITY_PARAM(2, 6) = 0;
@ -3022,7 +3022,7 @@ IMPLEMENT_FUNCTION(46, Coudert, function46)
case 6:
getEntities()->drawSequenceLeft(kEntityCoudert, "629Cf");
getEntities()->enterCompartment(kEntityCoudert, kObjectCompartmentF, true);
// Fallback to next case
// fall through
case 7:
if (getSoundQueue()->isBuffered(kEntityCoudert)) {
@ -3091,7 +3091,7 @@ IMPLEMENT_FUNCTION_I(47, Coudert, function47, bool)
case 3:
getEntities()->drawSequenceLeft(kEntityCoudert, "627Wf");
getEntities()->enterCompartment(kEntityCoudert, kObjectCompartmentF);
// Fallback to next case
// fall through
case 4:
if (getSoundQueue()->isBuffered(kEntityCoudert)) {

View File

@ -220,7 +220,7 @@ IMPLEMENT_FUNCTION(9, Francois, exitCompartment)
case 1:
getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocation2, kCursorKeepValue, kCursorKeepValue);
// Fallback to next case
// fall through
case 2:
getData()->location = kLocationOutsideCompartment;
@ -256,7 +256,7 @@ IMPLEMENT_FUNCTION(10, Francois, enterCompartment)
case 1:
getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocation2, kCursorKeepValue, kCursorKeepValue);
getSavePoints()->push(kEntityFrancois, kEntityMmeBoutarel, kAction102484312);
// Fallback to next case
// fall through
case 2:
getData()->location = kLocationInsideCompartment;
@ -423,7 +423,7 @@ label_callback:
case 2:
getSavePoints()->push(kEntityFrancois, kEntityCoudert, kAction168253822);
// Fallback to next case
// fall through
case 3:
params->param2 = kCarRedSleeping;
@ -684,7 +684,7 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, chaseBeetle, ObjectIndex, EntityPosition)
case 8:
getEntities()->exitCompartment(kEntityFrancois, (ObjectIndex)parameters->param1);
// Fallback to next case
// fall through
case 9:
setCallback(10);

View File

@ -566,7 +566,7 @@ void Gendarmes::handleAction(const SavePoint &savepoint, bool shouldPlaySound, S
break;
}
}
// Fallback to next action
// fall through
case kActionDrawScene:
if (!ENTITY_PARAM(0, 1) && getEntities()->hasValidFrame(kEntityGendarmes)) {

View File

@ -285,7 +285,7 @@ IMPLEMENT_FUNCTION(12, Kahina, awaitingCath)
case kActionKnock:
getSound()->playSound(kEntityPlayer, "LIB012");
// Fallback to next action
// fall through
case kActionOpenDoor:
if (!getEvent(kEventKronosGoingToInvitation)) {
@ -419,7 +419,7 @@ IMPLEMENT_FUNCTION(15, Kahina, searchTrain)
setup_updateEntity(kCarRedSleeping, kPosition_9460);
break;
}
// Fallback to next case
// fall through
case 4:
if (getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_8200)
@ -905,7 +905,7 @@ label_callback_2:
case 10:
params->param1 = 0;
// Fallback to next case
// fall through
case 11:
case 12:

View File

@ -1659,7 +1659,7 @@ label_callback11:
case 3:
getAction()->playAnimation(isNight() ? kEventMertensPushCallNight : kEventMertensPushCall);
// fallback to default case
// fall through
default:
getSound()->playSound(kEntityPlayer, "LIB015");
@ -1717,7 +1717,7 @@ label_callback11:
case 3:
getAction()->playAnimation(isNight() ? kEventMertensPushCallNight : kEventMertensPushCall);
// fallback to default case
// fall through
default:
getSound()->playSound(kEntityPlayer, "LIB015");
@ -1800,7 +1800,7 @@ label_callback11:
case 3:
getAction()->playAnimation(isNight() ? kEventMertensPushCallNight : kEventMertensPushCall);
// fallback to default case
// fall through
default:
getSound()->playSound(kEntityPlayer, "LIB015");
@ -2332,7 +2332,7 @@ IMPLEMENT_FUNCTION(32, Mertens, function32)
setup_function11(900);
break;
}
// Fallback to next case
// fall through
case 3:
setCallback(4);
@ -2402,7 +2402,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function16(true);
break;
}
// Fallback to next case
// fall through
case 5:
if (ENTITY_PARAM(1, 7)) {
@ -2410,7 +2410,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function16(false);
break;
}
// Fallback to next case
// fall through
case 6:
if (ENTITY_PARAM(1, 5)) {
@ -2418,7 +2418,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function15(true);
break;
}
// Fallback to next case
// fall through
case 7:
if (ENTITY_PARAM(1, 4)) {
@ -2426,7 +2426,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function15(false);
break;
}
// Fallback to next case
// fall through
case 8:
if (ENTITY_PARAM(1, 2)) {
@ -2434,7 +2434,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function35();
break;
}
// Fallback to next case
// fall through
case 9:
if (ENTITY_PARAM(0, 6)) {
@ -2442,7 +2442,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function36();
break;
}
// Fallback to next case
// fall through
case 10:
if (ENTITY_PARAM(1, 3)) {
@ -2450,7 +2450,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33)
setup_function40();
break;
}
// Fallback to next case
// fall through
case 11:
if (ENTITY_PARAM(1, 1)) {
@ -4059,7 +4059,7 @@ IMPLEMENT_FUNCTION(53, Mertens, function53)
getEntities()->clearSequences(kEntityMertens);
getData()->location = kLocationInsideCompartment;
getData()->entityPosition = kPosition_5790;
// Fallback to next case
// fall through
case 3:
getObjects()->update(kObjectCompartment4, kEntityMertens, kObjectLocation1, kCursorHandKnock, kCursorHand);

View File

@ -897,7 +897,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
setup_playSound("REB1199A");
break;
}
// Fallback to next case
// fall through
case 3:
if (getCallback() == 3)
@ -908,7 +908,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
setup_playSound("REB1199B");
break;
}
// Fallback to next case
// fall through
case 4:
setCallback(5);

View File

@ -568,7 +568,7 @@ IMPLEMENT_FUNCTION(21, Tatiana, returnToCompartment)
getSavePoints()->push(kEntityTatiana, kEntityAlexei, kAction135854208);
getObjects()->update(kObjectCompartmentA, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal);
getObjects()->update(kObjectCompartmentB, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal);
// Fallback to next case
// fall through
case 3:
if (getSoundQueue()->isBuffered(kEntityTatiana)) {
@ -2264,7 +2264,7 @@ IMPLEMENT_FUNCTION(55, Tatiana, function55)
case kActionDefault:
getEntities()->clearSequences(kEntityTatiana);
// fall back to next action
// fall through
case kActionDrawScene:
if (getEntities()->isPlayerPosition(kCarRestaurant, 72))

View File

@ -781,7 +781,7 @@ IMPLEMENT_FUNCTION(25, Verges, policeSearch)
}
break;
}
// Fallback to next case
// fall through
case 2:
if (getEvent(kEventKronosConversation)) {
@ -1832,7 +1832,7 @@ IMPLEMENT_FUNCTION(41, Verges, askPassengersToStayInCompartments)
case 1:
getEntities()->drawSequenceLeft(kEntityVerges, "620E");
// Fallback to next case
// fall through
case 2:
if (getSoundQueue()->isBuffered(kEntityVerges)) {

View File

@ -234,22 +234,22 @@ IMPLEMENT_FUNCTION(9, Yasmin, part1)
case 2:
if (Entity::timeCheckCallback(kTime1161000, params->param2, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_goGtoE)))
break;
// Fallback to case 3
// fall through
case 3:
if (Entity::timeCheckPlaySoundUpdatePosition(kTime1162800, params->param3, 4, "Har1102", kPosition_4070))
break;
// Fallback to case 4
// fall through
case 4:
if (Entity::timeCheckCallback(kTime1165500, params->param4, 5, "Har1104", WRAP_SETUP_FUNCTION_S(Yasmin, setup_playSound)))
break;
// Fallback to case 5
// fall through
case 5:
if (Entity::timeCheckCallback(kTime1174500, params->param5, 6, "Har1106", WRAP_SETUP_FUNCTION_S(Yasmin, setup_playSound)))
break;
// Fallback to case 6
// fall through
case 6:
Entity::timeCheckCallback(kTime1183500, params->param6, 7, WRAP_SETUP_FUNCTION(Yasmin, setup_goEtoG));
@ -364,7 +364,7 @@ IMPLEMENT_FUNCTION(14, Yasmin, part3)
case 1:
if (Entity::timeCheckCallback(kTime2106000, params->param2, 2, WRAP_SETUP_FUNCTION(Yasmin, setup_goGtoE)))
break;
// Fallback to case 2
// fall through
case 2:
Entity::timeCheckCallback(kTime2160000, params->param3, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_goEtoG));

View File

@ -344,43 +344,43 @@ LastExpress::SceneIndex SceneManager::processIndex(SceneIndex index) {
case 51:
if (!getEntities()->getPosition(car, 39))
return getSceneIndexFromPosition(car, 39);
// Fallback to next case
// fall through
case 42:
case 52:
if (!getEntities()->getPosition(car, 14))
return getSceneIndexFromPosition(car, 14);
// Fallback to next case
// fall through
case 43:
case 53:
if (!getEntities()->getPosition(car, 35))
return getSceneIndexFromPosition(car, 35);
// Fallback to next case
// fall through
case 44:
case 54:
if (!getEntities()->getPosition(car, 10))
return getSceneIndexFromPosition(car, 10);
// Fallback to next case
// fall through
case 45:
case 55:
if (!getEntities()->getPosition(car, 32))
return getSceneIndexFromPosition(car, 32);
// Fallback to next case
// fall through
case 46:
case 56:
if (!getEntities()->getPosition(car, 7))
return getSceneIndexFromPosition(car, 7);
// Fallback to next case
// fall through
case 47:
case 57:
if (!getEntities()->getPosition(car, 27))
return getSceneIndexFromPosition(car, 27);
// Fallback to next case
// fall through
case 48:
case 58:
@ -401,7 +401,7 @@ LastExpress::SceneIndex SceneManager::processIndex(SceneIndex index) {
case 54:
if (!getEntities()->getPosition(car, 51))
return getSceneIndexFromPosition(car, 51);
// Fallback to next case
// fall through
case 50:
case 56:
@ -409,31 +409,31 @@ LastExpress::SceneIndex SceneManager::processIndex(SceneIndex index) {
case 58:
if (!getEntities()->getPosition(car, 55))
return getSceneIndexFromPosition(car, 55);
// Fallback to next case
// fall through
case 59:
if (!getEntities()->getPosition(car, 60))
return getSceneIndexFromPosition(car, 60);
// Fallback to next case
// fall through
case 60:
if (!getEntities()->getPosition(car, 59))
return getSceneIndexFromPosition(car, 59);
// Fallback to next case
// fall through
case 62:
case 63:
case 64:
if (!getEntities()->getPosition(car, 61))
return getSceneIndexFromPosition(car, 61);
// Fallback to next case
// fall through
case 66:
case 67:
case 68:
if (!getEntities()->getPosition(car, 65))
return getSceneIndexFromPosition(car, 65);
// Fallback to next case
// fall through
case 69:
case 71:

View File

@ -3469,7 +3469,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
if (room.isDialogShowing())
return;
// Fall through to TALK_START
// fall through
case TALK_START:
// Handle initial setup of talking options
@ -4045,7 +4045,7 @@ void HotspotTickHandlers::rackSerfAnimHandler(Hotspot &h) {
h.setActionCtr(4);
h.setLayer(2);
// Deliberate fall-through
// fall through
case 4:
if (HotspotScript::execute(&h)) {
h.setLayer(255);

View File

@ -165,7 +165,7 @@ void SoundManager::bellsBodge() {
break;
case 2:
setVolume(0, 15);
// Deliberate fall through
// fall through
default:
killSound(1);
break;

View File

@ -3819,7 +3819,7 @@ void Scene411::actions() {
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 1, 6);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 3);
_scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 112);
// No break on purpose
// fall through
case 112:
_game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount;
_game._player._visible = true;

View File

@ -753,7 +753,7 @@ uint32 Scene2803::handleMessage(int messageNum, const MessageParam &param, Entit
switch (messageNum) {
case NM_KLAYMEN_LOWER_LEVER:
toggleBackground();
// NOTE Intentional fall-through
// fall through
case NM_ANIMATION_START:
if (param.asInteger() == 0x84251F82)
setMessageList(0x004B7A50);

View File

@ -1151,7 +1151,7 @@ void Caldoria::receiveNotification(Notification *notification, const Notificatio
case k4DEnvironOpenToINN:
GameState.setCaldoriaSeenINN(true);
GameState.setScoringSawINN(true);
// Fall through to k4DEnvironOpen...
// fall through
case k4DEnvironOpen:
_privateFlags.setFlag(kCaldoriaPrivate4DSystemOpenFlag, true);
setCurrentActivation(kActivate4DOpen);

View File

@ -1207,6 +1207,7 @@ uint16 Command::nextObjectDescription(ObjectDescription* objDesc, uint16 firstDe
break;
}
// already displayed first, do a random
// fall through
case 1:
i = objDesc->lastSeenNumber;
while (i == objDesc->lastSeenNumber) {

View File

@ -587,10 +587,10 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
switch (operation) {
case kPlatformUnknown:
// For Mac versions, kPlatform(0) with other args has more functionality
// For Mac versions, kPlatform(0) with other args has more functionality. Otherwise, fall through.
if (g_sci->getPlatform() == Common::kPlatformMacintosh && argc > 1)
return kMacPlatform(s, argc - 1, argv + 1);
// Otherwise, fall through
// fall through
case kPlatformGetPlatform:
if (isWindows)
return make_reg(0, kSciPlatformWindows);

View File

@ -766,7 +766,8 @@ void Plane::setType() {
_type = kPlaneTypeTransparentPicture;
break;
}
// fall through for games without transparent picture planes
// The game doesn't have transparent picture planes
// fall through
default:
if (!g_sci->_features->hasTransparentPicturePlanes() || _type != kPlaneTypeTransparentPicture) {
_type = kPlaneTypePicture;

View File

@ -225,7 +225,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
if ((*(const byte *)(textPtr + 1)) == 0xA) {
curCharCount++; textPtr++;
}
// it's meant to pass through here
// fall through
case 0xA:
case 0x9781: // this one is used by SQ4/japanese as line break as well (was added for SCI1/PC98)
curCharCount++; textPtr++;
@ -233,7 +233,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
// skip another byte in case char is double-byte (PC-98)
curCharCount++; textPtr++;
}
// and it's also meant to pass through here
// fall through
case 0:
SetFont(previousFontId);
_ports->penColor(previousPenColor);

View File

@ -1251,10 +1251,13 @@ bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
switch (argc) {
case 5:
arg3 = atoi(argv[4]);
// fall through
case 4:
arg2 = atoi(argv[3]);
// fall through
case 3:
arg1 = atoi(argv[2]);
// fall through
}
for (int i = 0; i < numMCodes; ++i) {

View File

@ -1313,10 +1313,13 @@ uint16 Logic::script(uint16 scriptNo, uint16 offset) {
switch (a) {
case 3:
c = pop();
// fall through
case 2:
b = pop();
// fall through
case 1:
a = pop();
// fall through
}
uint16 mcode = *scriptData++ / 4; // get mcode number

View File

@ -145,7 +145,7 @@ static BuiltReturn sayCore(int numParams, LoadedFunction *fun, bool sayIt) {
if (!getValueType(fileNum, SVT_FILE, fun->stack->thisVar))
return BR_ERROR;
trimStack(fun->stack);
// No break; here
// fall through
case 2:
newText = getTextFromAnyVar(fun->stack->thisVar);
@ -1263,7 +1263,7 @@ builtIn(setLightMap) {
return BR_ERROR;
trimStack(fun->stack);
g_sludge->_gfxMan->_lightMapMode %= LIGHTMAPMODE_NUM;
// No break;
// fall through
case 1:
if (fun->stack->thisVar.varType == SVT_FILE) {

View File

@ -476,7 +476,7 @@ bool continueFunction(LoadedFunction *fun) {
case BR_PAUSE:
pauseFunction(fun);
// No break!
// fall through
case BR_KEEP_AND_PAUSE:
keepLooping = false;

View File

@ -771,7 +771,7 @@ static void SetNextDest(PMOVER pMover) {
pMover->over = true;
return;
}
// Fall through for LEAVING
// fall through
case LEAVING:
assert(pMover->bIgPath || InPolygon(pMover->UtargetX, pMover->UtargetY, PATH) != NOPOLY); // Error 5002

View File

@ -311,7 +311,7 @@ void Scene50::Tooltip::highlight(bool btnDown) {
BF_GLOBALS._driveToScene = 300;
_newSceneNumber = 300;
}
// Deliberate fall through to default
// fall through
default:
BF_GLOBALS._mapLocationId = _locationId;
BF_GLOBALS._player.disableControl();

View File

@ -410,7 +410,7 @@ void Scene110::Action1::signal() {
NpcMover *mover = new NpcMover();
scene->_object4.addMover(mover, &pt, this);
}
// No break on purpose
// fall through
case 7:
setDelay(30);
break;
@ -1745,11 +1745,11 @@ void Scene115::signal() {
++_lineNumModifier;
if (_lineNumModifier >= 4)
_lineNumModifier = 0;
// No break on purpose
// fall through
case 0:
// No break on purpose
// fall through
case 5115:
// No break on purpose
// fall through
default:
BF_GLOBALS._player.enableControl();
break;
@ -2295,7 +2295,7 @@ void Scene140::Action1::signal() {
case 10:
owner->setPosition(Common::Point(212, 117));
setDelay(10);
// No break on purpose
// fall through
case 11:
owner->setPosition(owner->_position, 1000);
setDelay(60);
@ -2303,7 +2303,7 @@ void Scene140::Action1::signal() {
case 12:
BF_GLOBALS._sound1.play(8);
setDelay(60);
// No break on purpose
// fall through
case 13:
BF_GLOBALS._sceneManager.changeScene(150);
default:
@ -2384,7 +2384,7 @@ void Scene150::Action1::signal() {
break;
case 8:
BF_GLOBALS._sound1.stop();
// No break on purpose
// fall through
case 9:
_sound1.play(8);
setDelay(30);

View File

@ -1240,7 +1240,7 @@ void Scene315::signal() {
BF_GLOBALS._walkRegions.disableRegion(4);
_object7.remove();
_object6.remove();
// No break on purpose
// fall through
case 3155:
BF_GLOBALS._player.enableControl();
_field1B68 = false;
@ -2722,7 +2722,7 @@ void Scene350::postInit(SceneObjectList *OwnerList) {
BF_GLOBALS._player.enableControl();
T2_GLOBALS._uiElements._active = true;
T2_GLOBALS._uiElements.show();
// Deliberate fall-through
// fall through
case 355:
if (BF_GLOBALS.getFlag(onDuty) && BF_GLOBALS.getFlag(gunDrawn))
BF_GLOBALS._player.setVisage(351);
@ -3730,7 +3730,7 @@ void Scene355::signal() {
break;
case 2357:
_harrison.animate(ANIM_MODE_1, NULL);
// Deliberate fall-through
// fall through
case 1357:
BF_GLOBALS._player.enableControl();
if (BF_GLOBALS.getFlag(gunDrawn))
@ -4787,7 +4787,7 @@ bool Scene370::Laura::startAction(CursorType action, Event &event) {
scene->setAction(&scene->_sequenceManager, scene, 3705, &BF_GLOBALS._player, this, NULL);
return true;
}
// Deliberate fall-through
// fall through
default:
return NamedObject::startAction(action, event);
}
@ -4953,7 +4953,7 @@ void Scene370::signal() {
case 3707:
_object5.setDetails(370, 6, -1, 7, 1, (SceneItem *)NULL);
BF_GLOBALS._sceneItems.push_back(&_object5);
// Deliberate fall-through
// fall through
case 3700:
case 3706:
_green.setAction(&_sequenceManager, this, 3701, NULL);

View File

@ -2122,7 +2122,7 @@ void Scene570::signal() {
_object3.setVisage(572);
_object3.setStrip(4);
_object3.setFrame(1);
// Deliberate fall-through
// fall through
case 5702:
case 5703:
_object3.fixPriority(1);

View File

@ -135,7 +135,7 @@ bool Scene710::Object5::startAction(CursorType action, Event &event) {
}
return true;
}
// No break on purpose
// fall through
default:
return NamedObject::startAction(action, event);
}
@ -242,7 +242,7 @@ void Scene710::signal() {
break;
case 7105:
_throwStick = true;
// No break on purpose
// fall through
case 7104:
_sceneMode = 7102;
setAction(&_sequenceManager1, this, 7102, &_dog, NULL);

View File

@ -2624,7 +2624,7 @@ void Scene860::Action1::signal() {
BF_GLOBALS._player.setStrip(2);
}
signal();
// Deliberate fall-through
// fall through
case 2:
BF_GLOBALS._player.animate(ANIM_MODE_1, NULL);
ADD_MOVER_NULL(BF_GLOBALS._player, scene->_destPos.x, scene->_destPos.y);

View File

@ -266,7 +266,7 @@ void Scene900::Action1::signal() {
}
case 6:
_actionIndex = 0;
// No break on purpose
// fall through
case 4:
setDelay(30);
break;
@ -1629,7 +1629,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) {
SET_EXT_FGCOLOR, 13, LIST_END);
return true;
}
// no break on purpose
// fall through
case INV_YELLOW_CORD:
if (BF_GLOBALS._v4CECC == 0) {
BF_GLOBALS._v4CECC = 1;
@ -1664,7 +1664,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) {
SET_EXT_FGCOLOR, 13, LIST_END);
return true;
}
//No break on purpose
// fall through
case INV_BLACK_CORD:
if (BF_GLOBALS._v4CECA == 0) {
if (_state == 1) {
@ -2305,7 +2305,7 @@ void Scene910::signal() {
BF_GLOBALS._player.disableControl();
BF_GLOBALS._player.setAction(&_sequenceManager2, NULL, 9117, &_nico, NULL);
BF_GLOBALS._nico910State = 2;
// No break on purpose
// fall through
case 15:
_stuart.postInit();
_stuart.setDetails(910, 66, 67, 68, 5, &_nico);

View File

@ -1975,7 +1975,7 @@ void Scene60::Action1::signal() {
break;
case 4:
g_globals->setFlag(90);
// Deliberate fall-through
// fall through
case 5:
case 6:
case 7:

View File

@ -103,7 +103,7 @@ void Scene9100::signal() {
break;
case 9105:
_hotspotCleanedClothes.remove();
// No break on purpose
// fall through
case 9103:
case 9104:
case 9107:
@ -336,7 +336,7 @@ void Scene9200::signal() {
break;
case 9210:
_hotspot1.remove();
// No break on purpose
// fall through
case 9201:
case 9202:
case 9203:
@ -480,7 +480,7 @@ void Scene9300::signal() {
switch (_sceneMode++) {
case 9301:
g_globals->setFlag(84);
// No break on purpose
// fall through
case 9303:
g_globals->_soundHandler.play(295);
g_globals->_sceneManager.changeScene(9350);
@ -938,7 +938,7 @@ void Scene9450::signal() {
break;
case 1006:
g_globals->setFlag(87);
// No break on purpose
// fall through
default:
g_globals->_player.enableControl();
break;
@ -1240,7 +1240,7 @@ void Scene9700::signal() {
switch (_sceneMode ++) {
case 9703:
g_globals->setFlag(88);
// No break on purpose
// fall through
case 9701:
case 9702:
_gfxButton1.setText(EXIT_MSG);
@ -1700,7 +1700,7 @@ void Scene9900::strAction2::signal() {
_txtArray2[0]._position.y = 400;
_txtArray2[1]._position.y = 500;
_var3 = 0;
// No break on purpose
// fall through
case 1: {
Common::String msg = g_resourceManager->getMessage(8030, _lineNum++);
if (msg.compareTo("LASTCREDIT")) {

View File

@ -5907,7 +5907,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot11.setPosition(Common::Point(178, 118));
_hotspot11.animate(ANIM_MODE_1, NULL);
}
// Deliberate fall-through
// fall through
case 4250:
case 5000:
case 7000:

View File

@ -1160,7 +1160,7 @@ void Scene4000::signal() {
case 4010:
g_globals->setFlag(38);
_olo.remove();
// Deliberate fall-through
// fall through
case 4001:
g_globals->_player.enableControl();
break;
@ -1173,7 +1173,7 @@ void Scene4000::signal() {
break;
case 4004:
RING_INVENTORY._ladder._sceneNumber = 4000;
// Deliberate fall-through
// fall through
case 4007:
g_globals->_player._uiEnabled = true;
g_globals->_events.setCursor(CURSOR_USE);

View File

@ -1363,7 +1363,7 @@ void Scene5100::signal() {
g_globals->_player.setStrip(6);
g_globals->_player.fixPriority(-1);
g_globals->_player.animate(ANIM_MODE_1, NULL);
// No break on purpose
// fall through
case 5117:
g_globals->_player.enableControl();
break;
@ -2149,7 +2149,7 @@ void Scene5300::signal() {
break;
case 5307:
_soundHandler.fadeOut(NULL);
// No break on purpose
// fall through
case 5302:
case 5308:
case 5316:

View File

@ -1669,7 +1669,7 @@ void Scene7700::Action3::signal() {
scene->_sceneHotspot9.remove();
scene->_object19.remove();
setDelay(60);
// No break on purpose!
// fall through
case 2:
scene->_soundHandler.play(260);
scene->_object8.setVisage(7703);
@ -1690,7 +1690,7 @@ void Scene7700::Action4::signal() {
switch (_actionIndex++) {
case 2:
scene->_object13.remove();
// No break on purpose!
// fall through
case 0:
setDelay(3);
break;

View File

@ -937,7 +937,7 @@ void Scene1337::Action1::signal() {
scene->_stockPile.remove();
}
// No break on purpose
// fall through
case 0:
R2_GLOBALS._sceneObjects->draw();
signal();
@ -2547,11 +2547,11 @@ void Scene1337::handlePlayerTurn() {
if (_displayHelpFl)
actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154);
_displayHelpFl = false;
// No break on purpose
// fall through
case 0:
// No break on purpose
// fall through
case 1:
// No break on purpose
// fall through
case 3:
_actionItem.setAction(&_action4);
default:

View File

@ -1326,7 +1326,7 @@ void Scene160::Action1::signal() {
scene->_yChange = 1;
scene->_lineNum = 0;
++_actionIndex;
// Deliberate fall-through
// fall through
case 1:
setDelay(5);
@ -3638,7 +3638,7 @@ void Scene300::signal() {
break;
case 181:
R2_GLOBALS._player.setStrip(6);
// Deliberate fall-through
// fall through
default:
R2_GLOBALS._player.enableControl(CURSOR_TALK);
@ -3744,7 +3744,7 @@ void Scene300::signal() {
case 310:
R2_GLOBALS._player.setStrip(5);
// Deliberate fall-through
// fall through
case 309:
signal309();
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
@ -7870,7 +7870,7 @@ void Scene900::signal() {
break;
case 5:
_sceneMode = 0;
// No break on purpose
// fall through
default:
R2_GLOBALS._player.enableControl();
R2_GLOBALS._player._canWalk = false;

View File

@ -1401,7 +1401,7 @@ void Scene1500::signal() {
case 0:
R2_GLOBALS.setFlag(25);
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
// No break on purpose
// fall through
case 1:
if (_starship._yDiff < 50) {
_starship.setPosition(Common::Point(289, 239), _starship._yDiff + 1);
@ -1424,12 +1424,12 @@ void Scene1500::signal() {
break;
case 13:
R2_GLOBALS._player._characterIndex = R2_MIRANDA;
// No break on purpose
// fall through
case 4:
R2_GLOBALS._sceneManager.changeScene(300);
break;
case 10:
// No break on purpose
// fall through
case 20:
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
break;
@ -2225,11 +2225,11 @@ void Scene1550::postInit(SceneObjectList *OwnerList) {
switch (R2_GLOBALS._sceneManager._previousScene) {
case 1530:
R2_GLOBALS._stripModifier = 0;
// No break on purpose
// fall through
case 300:
// No break on purpose
// fall through
case 1500:
// No break on purpose
// fall through
case 3150:
R2_GLOBALS._sound1.play(105);
break;
@ -7309,7 +7309,7 @@ void Scene1900::signal() {
break;
case 1904:
R2_GLOBALS._scene1925CurrLevel = -3;
// No break on purpose
// fall through
case 1905:
R2_GLOBALS._player.disableControl(CURSOR_WALK);
R2_GLOBALS._sceneManager.changeScene(1925);
@ -7323,7 +7323,7 @@ void Scene1900::signal() {
break;
case 1906:
R2_GLOBALS._scene1925CurrLevel = -3;
// No break on purpose
// fall through
default:
R2_GLOBALS._player.enableControl();
break;
@ -7517,7 +7517,7 @@ void Scene1925::changeLevel(bool upFlag) {
break;
case 512:
R2_GLOBALS._scene1925CurrLevel = 508;
// No break on purpose
// fall through
default:
loadScene(_levelResNum[(R2_GLOBALS._scene1925CurrLevel % 4)]);
R2_GLOBALS._sceneItems.remove(&_button);
@ -7561,10 +7561,10 @@ void Scene1925::postInit(SceneObjectList *OwnerList) {
case 3:
_door.setDetails(1925, 0, 1, 2, 1, (SceneItem *) NULL);
_button.setDetails(Rect(133, 68, 140, 77), 1925, 3, -1, 5, 1, NULL);
// No break on purpose
// fall through
case -3:
_westExit.setDetails(Rect(83, 38, 128, 101), EXITCURSOR_W, 1925);
// No break on purpose
// fall through
default:
_exitUp.setDetails(Rect(128, 0, 186, 10), EXITCURSOR_N, 1925);
_exitDown.setDetails(Rect(128, 160, 190, 167), EXITCURSOR_S, 1925);
@ -7647,7 +7647,7 @@ void Scene1925::signal() {
_newSceneMode = 0;
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
}
// No break on purpose
// fall through
default:
R2_GLOBALS._player.enableControl(CURSOR_USE);
break;
@ -7708,7 +7708,7 @@ bool Scene1945::Ice::startAction(CursorType action, Event &event) {
else
scene->_ice.setDetails(1945, 3, -1, 5, 3, (SceneItem *) NULL);
}
// No break on purpose
// fall through
default:
return SceneHotspot::startAction(action, event);
break;
@ -7951,7 +7951,7 @@ void Scene1945::signal() {
R2_GLOBALS.clearFlag(42);
R2_GLOBALS.setFlag(43);
_nextSceneMode1 = 1940;
// No break on purpose
// fall through
case 1949:
_sceneMode = _nextSceneMode1;
if (_nextSceneMode2 == 1943) {

View File

@ -1883,7 +1883,7 @@ void Scene2440::signal() {
case 2440:
_oilLamp.remove();
R2_INVENTORY.setObjectScene(R2_ALCOHOL_LAMP_2, 2);
// No break on purpose
// fall through
default:
R2_GLOBALS._player.enableControl();
break;
@ -4388,7 +4388,7 @@ void Scene2800::Action2::signal() {
_object4.setStrip(2);
_object4.setFrame(11);
R2_GLOBALS._player.hide();
// No break on purpose
// fall through
case 18:
R2_GLOBALS._sound1.play(241);
_object4.animate(ANIM_MODE_6, this);

View File

@ -359,7 +359,7 @@ void Scene3125::signal() {
break;
case 3126:
R2_GLOBALS.setFlag(79);
// No break on purpose
// fall through
case 3176:
R2_GLOBALS._sceneManager.changeScene(3250);
break;
@ -3027,7 +3027,7 @@ void Scene3500::Action1::turnShuttle(bool arg1) {
case 4:
scene->_shuttle._frameChange = _direction;
scene->_shuttle.setFrame(scene->_shuttle.changeFrame());
// No break on purpose
// fall through
case 3:
_actionIndex = 10;
setDelay(0);
@ -3050,7 +3050,7 @@ void Scene3500::Action1::turnShuttle(bool arg1) {
scene->_shuttle._frameChange = _direction;
scene->_shuttle.setFrame(scene->_shuttle.changeFrame());
setDelay(1);
// No break on purpose
// fall through
case 8:
scene->_tunnelHorzCircle.setStrip(2);
_actionIndex = 1;
@ -3079,7 +3079,7 @@ void Scene3500::Action1::signal() {
setDelay(1);
return;
}
// No break on purpose
// fall through
case 3:
scene->_shuttle._frameChange = _direction;
scene->_shuttle.setFrame(scene->_shuttle.changeFrame());
@ -3158,7 +3158,7 @@ void Scene3500::Action1::signal() {
break;
}
}
// No break on purpose
// fall through
case 2: {
scene->_tunnelVertCircle.setPosition(Common::Point(160, 73));
scene->_tunnelVertCircle._moveDiff.x = 160 - scene->_mazeChangeAmount;
@ -4345,7 +4345,7 @@ void Scene3600::Action2::signal() {
R2_GLOBALS._player.enableControl();
_actionIndex = 3619;
scene->_protector._state = 0;
// No break on purpose
// fall through
case 3619: {
++_actionIndex;
scene->_protector.setup(3127, 2, 1);

View File

@ -1166,7 +1166,7 @@ void Scene1950::initArea() {
// No break on purpose
case 65:
_upExit._enabled = true;
// No break on purpose
// fall through
case 35:
// No break on purpose
case 38:
@ -1665,7 +1665,7 @@ void Scene1950::signal() {
case 1975:
SceneItem::display(1950, 21, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, 1,
SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
// No break on purpose
// fall through
case 13:
// Moving east within the Flub maze
++R2_GLOBALS._flubMazeArea;

View File

@ -820,7 +820,7 @@ const byte *ThreadResource::cardPerform(const byte *card) {
case 27:
case 28:
subId -= 3;
// Deliberate fall-through
// fall through
case 21:
case 22:

View File

@ -280,14 +280,18 @@ ConversionResult ConvertUTF16toUTF8(
case 4:
*--target = (UTF8)((ch | byteMark) & byteMask);
ch >>= 6;
// fall through
case 3:
*--target = (UTF8)((ch | byteMark) & byteMask);
ch >>= 6;
// fall through
case 2:
*--target = (UTF8)((ch | byteMark) & byteMask);
ch >>= 6;
// fall through
case 1:
*--target = (UTF8)(ch | firstByteMark[bytesToWrite]);
// fall through
}
target += bytesToWrite;
}
@ -318,8 +322,10 @@ static bool isLegalUTF8(const UTF8 *source, int length) {
/* Everything else falls through when "true"... */
case 4:
if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false;
// fall through
case 3:
if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false;
// fall through
case 2:
if ((a = (*--srcptr)) > 0xBF) return false;
@ -340,6 +346,7 @@ static bool isLegalUTF8(const UTF8 *source, int length) {
default:
if (a < 0x80) return false;
}
// fall through
case 1:
if (*source >= 0x80 && *source < 0xC2) return false;
@ -389,18 +396,23 @@ ConversionResult ConvertUTF8toUTF16(
case 5:
ch += *source++;
ch <<= 6; /* remember, illegal UTF-8 */
// fall through
case 4:
ch += *source++;
ch <<= 6; /* remember, illegal UTF-8 */
// fall through
case 3:
ch += *source++;
ch <<= 6;
// fall through
case 2:
ch += *source++;
ch <<= 6;
// fall through
case 1:
ch += *source++;
ch <<= 6;
// fall through
case 0:
ch += *source++;
}
@ -500,12 +512,15 @@ ConversionResult ConvertUTF32toUTF8(
case 4:
*--target = (UTF8)((ch | byteMark) & byteMask);
ch >>= 6;
// fall through
case 3:
*--target = (UTF8)((ch | byteMark) & byteMask);
ch >>= 6;
// fall through
case 2:
*--target = (UTF8)((ch | byteMark) & byteMask);
ch >>= 6;
// fall through
case 1:
*--target = (UTF8)(ch | firstByteMark[bytesToWrite]);
}
@ -543,18 +558,23 @@ ConversionResult ConvertUTF8toUTF32(
case 5:
ch += *source++;
ch <<= 6;
// fall through
case 4:
ch += *source++;
ch <<= 6;
// fall through
case 3:
ch += *source++;
ch <<= 6;
// fall through
case 2:
ch += *source++;
ch <<= 6;
// fall through
case 1:
ch += *source++;
ch <<= 6;
// fall through
case 0:
ch += *source++;
}

View File

@ -54,7 +54,7 @@ void ErrorDialog::execute(const Common::String &msg, ErrorWaitType waitType) {
warning("TODO: sub_26D8F");
break;
}
// Deliberate fall-through
// fall through
case WT_NONFREEZED_WAIT:
do {
events.updateGameCounter();

View File

@ -957,7 +957,7 @@ bool Interface::checkMoveDirection(int key) {
if (_vm->_files->_isDarkCc)
goto check;
// Deliberate FAll-through
// fall through
case 0:
case 2:
case 4:

View File

@ -666,14 +666,14 @@ void Scripts::cmdTakeOrGive(Common::Array<byte> &params) {
switch (mode1) {
case 8:
mode1 = 0;
// Deliberate fall-through
// fall through
case 21:
case 66:
if (param2) {
switch (mode2) {
case 82:
mode1 = 0;
// Deliberate fall-through
// fall through
case 21:
case 34:
case 35:
@ -711,7 +711,7 @@ void Scripts::cmdTakeOrGive(Common::Array<byte> &params) {
switch (mode2) {
case 82:
mode1 = 0;
// Deliberate fall-through
// fall through
case 21:
case 34:
case 35: