From c673c5654bb7ea17dc15691f6dd1a1298be25cbc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Sep 2016 23:29:11 +0200 Subject: DM: Fix comparison warnings --- engines/dm/menus.cpp | 6 +++--- engines/dm/movesens.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index ccc4b301a8..31f6224236 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -1286,11 +1286,11 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) { break; case kDMActionFreezeLife: { int16 freezeTicks; - if (weaponInHand->getType() == k42_JunkTypeMagicalBoxBlue) { + if (weaponInHand->getType() == (int)k42_JunkTypeMagicalBoxBlue) { freezeTicks = 30; _vm->_championMan->getObjectRemovedFromSlot(champIndex, kDMSlotActionHand); weaponInHand->setNextThing(Thing::_none); - } else if (weaponInHand->getType() == k43_JunkTypeMagicalBoxGreen) { + } else if (weaponInHand->getType() == (int)k43_JunkTypeMagicalBoxGreen) { freezeTicks = 125; _vm->_championMan->getObjectRemovedFromSlot(champIndex, kDMSlotActionHand); weaponInHand->setNextThing(Thing::_none); @@ -1308,7 +1308,7 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) { break; case kDMActionThrow: setChampionDirectionToPartyDirection(curChampion); - actionPerformed = _vm->_championMan->isObjectThrown(champIndex, kDMSlotActionHand, (curChampion->_cell == _vm->turnDirRight(_vm->_dungeonMan->_partyDir)) || (curChampion->_cell == (ViewCell)_vm->returnOppositeDir(_vm->_dungeonMan->_partyDir))); + actionPerformed = _vm->_championMan->isObjectThrown(champIndex, kDMSlotActionHand, (curChampion->_cell == (ViewCell)_vm->turnDirRight(_vm->_dungeonMan->_partyDir)) || (curChampion->_cell == (ViewCell)_vm->returnOppositeDir(_vm->_dungeonMan->_partyDir))); if (actionPerformed) _vm->_timeline->_events[curChampion->_enableActionEventIndex]._Bu._slotOrdinal = _vm->indexToOrdinal(kDMSlotActionHand); break; diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp index e464c9f89c..2c25371a60 100644 --- a/engines/dm/movesens.cpp +++ b/engines/dm/movesens.cpp @@ -264,7 +264,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM for (int16 chainedMoveCount = 1000; --chainedMoveCount; ) { destinationSquareData = _vm->_dungeonMan->_currMapData[destMapX][destMapY]; SquareType destinationSquareType = Square(destinationSquareData).getType(); - if (destinationSquareType == kDMElementTypeTeleporter) { + if (destinationSquareType == (int)kDMElementTypeTeleporter) { if (!getFlag(destinationSquareData, k0x0008_TeleporterOpen)) break; @@ -307,7 +307,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM if (destinationIsTeleporterTarget) break; } else { - if ((destinationSquareType == kDMElementTypePit) && !thingLevitates && getFlag(destinationSquareData, k0x0008_PitOpen) && !getFlag(destinationSquareData, k0x0001_PitImaginary)) { + if ((destinationSquareType == (int)kDMElementTypePit) && !thingLevitates && getFlag(destinationSquareData, k0x0008_PitOpen) && !getFlag(destinationSquareData, k0x0001_PitImaginary)) { if (drawDungeonViewWhileFalling && !_useRopeToClimbDownPit) { drawDungeonViewWhileFalling = true; if (traversedPitCount) { @@ -346,7 +346,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM if (outcome == k1_outcomeKilledSomeCreaturesInGroup) _vm->_groupMan->dropMovingCreatureFixedPossession(thing, destMapX, destMapY); } - } else if ((destinationSquareType == kDMElementTypeStairs) && (thing != Thing::_party) && (thingType != kDMThingTypeProjectile)) { + } else if ((destinationSquareType == (int)kDMElementTypeStairs) && (thing != Thing::_party) && (thingType != kDMThingTypeProjectile)) { if (!getFlag(destinationSquareData, k0x0004_StairsUp)) { mapIndexDestination = _vm->_dungeonMan->getLocationAfterLevelChange(mapIndexDestination, 1, &destMapX, &destMapY); _vm->_dungeonMan->setCurrentMap(mapIndexDestination); @@ -916,7 +916,7 @@ void MovesensMan::triggerEffect(Sensor *sensor, int16 effect, int16 mapX, int16 int16 targetMapY = sensor->getActionTargetMapY(); SquareType curSquareType = Square(_vm->_dungeonMan->_currMapData[targetMapX][targetMapY]).getType(); uint16 targetCell; - if (curSquareType == kDMElementTypeWall) + if (curSquareType == (int)kDMElementTypeWall) targetCell = sensor->getActionTargetCell(); else targetCell = kDMCellNorthWest; -- cgit v1.2.3