From 462f1c98597589a3baf241ab2c1bb4dba991374e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 6 Aug 2017 12:26:05 +0200 Subject: JANITORIAL: Silence more GCC 7 warnings There were all flagged as intentional fall throughs. I simply changed the comments to something GCC would recognize. --- engines/dm/champion.cpp | 2 +- engines/dm/dungeonman.cpp | 2 +- engines/dm/gfx.cpp | 26 +++++++++++++------------- engines/dm/group.cpp | 1 + engines/dm/menus.cpp | 2 +- engines/dm/movesens.cpp | 2 +- engines/dm/sounds.cpp | 2 +- 7 files changed, 19 insertions(+), 18 deletions(-) (limited to 'engines/dm') diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index 374f211ace..646e7cec8d 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -729,7 +729,7 @@ Thing ChampionMan::getObjectRemovedFromSlot(uint16 champIndex, uint16 slotIndex) switch (curIconIndex) { case kDMIconIndiceContainerChestClosed: inventory.closeChest(); - // No break on purpose + // fall through case kDMIconIndiceScrollOpen: case kDMIconIndiceScrollClosed: setFlag(curChampion->_attributes, kDMAttributePanel); diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index 2d0d65f2a4..ab35477183 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -935,7 +935,7 @@ T0172010_ClosedFakeWall: } aspectArray[kDMSquareAspectElement] = kDMElementTypeCorridor; AL0307_uc_FootprintsAllowed = getFlag(AL0307_uc_Square, kDMSquareMaskFakeWallRandOrnamentOrFootprintsAllowed) ? 8 : 0; - // No break on purpose + // fall through case kDMElementTypeCorridor: case kDMElementTypePit: case kDMElementTypeTeleporter: diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 654cd04c14..7f31b29575 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -1463,7 +1463,7 @@ void DisplayMan::drawSquareD3L(Direction dir, int16 posX, int16 posY) { case kDMElementTypePit: if (!squareAspect[kDMSquareAspectPitInvisible]) drawFloorPitOrStairsBitmap(kDMGraphicIdxFloorPitD3L, frameFloorPitD3L); - // no break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackLeftBackRightFrontLeftFrontRight; @@ -1546,7 +1546,7 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) { case kDMElementTypePit: if (!squareAspect[kDMSquareAspectPitInvisible]) drawFloorPitOrStairsBitmapFlippedHorizontally(kDMGraphicIdxFloorPitD3L, frameFloorPitD3R); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackRightBackLeftFrontRightFrontLeft; @@ -1626,7 +1626,7 @@ void DisplayMan::drawSquareD3C(Direction dir, int16 posX, int16 posY) { case kDMElementTypePit: if (!squareAspect[kDMSquareAspectPitInvisible]) drawFloorPitOrStairsBitmap(kDMGraphicIdxFloorPitD3C, frameFloorPitD3C); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackLeftBackRightFrontLeftFrontRight; @@ -1690,7 +1690,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) { break; case kDMElementTypeStairsSide: drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexSideD2L, frameStairsSideD2L); - // No break on purpose + // fall through case kDMElementTypeDoorSide: order = kDMCellOrderBackRightFrontLeftFrontRight; drawFloorOrnament(squareAspect[kDMSquareAspectFloorOrn], kDMViewFloorD2L); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */ @@ -1706,7 +1706,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) { case kDMElementTypePit: drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD2L : kDMGraphicIdxFloorPitD2L, frameFloorPitD2L); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackLeftBackRightFrontLeftFrontRight; @@ -1775,7 +1775,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) { break; case kDMElementTypeStairsSide: drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexSideD2L, frameStairsSideD2R); - // No break on purpose + // fall through case kDMElementTypeDoorSide: order = kDMCellOrderBackLeftFrontRightFrontLeft; /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */ @@ -1793,7 +1793,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) { case kDMElementTypePit: drawFloorPitOrStairsBitmapFlippedHorizontally( squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD2L : kDMGraphicIdxFloorPitD2L, frameFloorPitD2R); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackRightBackLeftFrontRightFrontLeft; @@ -1876,7 +1876,7 @@ void DisplayMan::drawSquareD2C(Direction dir, int16 posX, int16 posY) { break; case kDMElementTypePit: drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD2C : kDMGraphicIdxFloorPitD2C, frameFloorPitD2C); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackLeftBackRightFrontLeftFrontRight; @@ -1944,7 +1944,7 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) { drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpSideD1L, frameStairsUpSideD1L); else drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexDownSideD1L, frameStairsDownSideD1L); - // No break on purpose + // fall through case kDMElementTypeDoorSide: order = kDMCellOrderBackRightFrontRight; /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */ @@ -1961,7 +1961,7 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) { break; case kDMElementTypePit: drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD1L : kDMGraphicIdxFloorPitD1L, frameFloorPitD1L); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackRightFrontRight; @@ -2029,7 +2029,7 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) { else drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexDownSideD1L, frameStairsDownSideD1R); - // No break on purpose + // fall through case kDMElementTypeDoorSide: order = kDMCellOrderBackLeftFrontLeft; drawFloorOrnament(squareAspect[kDMSquareAspectFloorOrn], kDMViewFloorD1R); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */ @@ -2046,7 +2046,7 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) { case kDMElementTypePit: drawFloorPitOrStairsBitmapFlippedHorizontally(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD1L : kDMGraphicIdxFloorPitD1L, frameFloorPitD1R); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackLeftFrontLeft; @@ -2134,7 +2134,7 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) { break; case kDMElementTypePit: drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD1C : kDMGraphicIdxFloorPitD1C, frameFloorPitD1C); - // No break on purpose + // fall through case kDMElementTypeTeleporter: case kDMElementTypeCorridor: order = kDMCellOrderBackLeftBackRightFrontLeftFrontRight; diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index 43d5dc8a9d..9bfeb1da1d 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -727,6 +727,7 @@ T0209005_AddEventAndReturn: if (AL0446_i_Behavior2Or3 || (_vm->getRandomNumber(4))) /* BUG0_00 Useless code. Behavior cannot be 2 nor 3 because these values are never used. The actual condition is thus: if 3/4 chances then no reaction */ return; } /* No 'break': proceed to instruction after the next 'case' below. Reaction is to move in a random direction to try and avoid other projectiles */ + // fall through case kDMEventTypeCreateReactionDangerOnSquare: /* This event is used when some creatures in the group were killed by a Poison Cloud or by a closing door or if Lord Chaos is surrounded by 3 Fluxcages. It causes the creature to move in a random direction to avoid the danger */ approachAfterReaction = (AL0447_i_Behavior == kDMBehaviorAttack); /* If the creature behavior is 'Attack' and it has to move to avoid danger then it will change its behavior to 'Approach' after the movement */ newGroupDirectionFound = false; diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index 348bdfdb2d..9c8e219851 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -1154,7 +1154,7 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) { break; case kDMActionConfuse: decrementCharges(curChampion); - // No break on purpose + // fall through case kDMActionWarCry: case kDMActionCalm: case kDMActionBrandish: diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp index cb9f93ab2b..410ede740a 100644 --- a/engines/dm/movesens.cpp +++ b/engines/dm/movesens.cpp @@ -105,7 +105,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16 case kDMSensorWallOrnClickWithSpecObjRemovedRotateSensors: if (sensorCountToProcessPerCell[cellIdx]) /* If the sensor is not the last one of its type on the cell */ continue; - // No break on purpose + // fall through case kDMSensorWallOrnClickWithSpecObj: case kDMSensorWallOrnClickWithSpecObjRemoved: doNotTriggerSensor = ((sensorData == _vm->_objectMan->getObjectType(leaderHandObject)) == currentSensor->getAttrRevertEffectA()); diff --git a/engines/dm/sounds.cpp b/engines/dm/sounds.cpp index bd7d4042f8..a4de3c3984 100644 --- a/engines/dm/sounds.cpp +++ b/engines/dm/sounds.cpp @@ -43,7 +43,7 @@ SoundMan *SoundMan::getSoundMan(DMEngine *vm, const DMADGameDescription *gameVer switch (gameVersion->_desc.platform) { default: warning("Unknown platform, using default Amiga SoundMan"); - // No break on purpose + // fall through case Common::kPlatformAmiga: return new SoundMan(vm); case Common::kPlatformAtariST: -- cgit v1.2.3