diff options
author | Strangerke | 2016-08-21 01:16:00 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 20165b18656ee6ddb2586983735fa280abfefc54 (patch) | |
tree | 9804e759bd293afbc3ff692d40acf18e2ddd0317 /engines/dm/eventman.cpp | |
parent | e26a655e6774bf3e58ef4bdb4306b318d47a5609 (diff) | |
download | scummvm-rg350-20165b18656ee6ddb2586983735fa280abfefc54.tar.gz scummvm-rg350-20165b18656ee6ddb2586983735fa280abfefc54.tar.bz2 scummvm-rg350-20165b18656ee6ddb2586983735fa280abfefc54.zip |
DM: Fix some GCC warnings
Diffstat (limited to 'engines/dm/eventman.cpp')
-rw-r--r-- | engines/dm/eventman.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index 234cac4360..a3677b082c 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -926,7 +926,7 @@ void EventManager::f365_commandTurnParty(CommandType cmdType) { f362_commandHighlightBoxEnable(291, 318, 125, 145); uint16 partySquare = _vm->_dungeonMan->f151_getSquare(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY).toByte(); - if (Square(partySquare).getType() == k3_ElementTypeStairs) { + if (Square(partySquare).getType() == k3_StairsElemType) { f364_commandTakeStairs(getFlag(partySquare, k0x0004_StairsUp)); return; } @@ -971,7 +971,7 @@ void EventManager::f366_commandMoveParty(CommandType cmdType) { int16 partyMapX = _vm->_dungeonMan->_g306_partyMapX; int16 partyMapY = _vm->_dungeonMan->_g307_partyMapY; uint16 AL1115_ui_Square = _vm->_dungeonMan->f151_getSquare(partyMapX, partyMapY).toByte(); - bool isStairsSquare = (Square(AL1115_ui_Square).getType() == k3_ElementTypeStairs); + bool isStairsSquare = (Square(AL1115_ui_Square).getType() == k3_StairsElemType); if (isStairsSquare && (movementArrowIdx == 2)) { /* If moving backward while in stairs */ f364_commandTakeStairs(getFlag(AL1115_ui_Square, k0x0004_StairsUp)); return; @@ -1006,8 +1006,11 @@ void EventManager::f366_commandMoveParty(CommandType cmdType) { if (damage) _vm->_sound->f064_SOUND_RequestPlay_CPSD(k18_soundPARTY_DAMAGED, partyMapX, partyMapY, k0_soundModePlayImmediately); - } else if (isMovementBlocked = (_vm->_groupMan->f175_groupGetThing(partyMapX, partyMapY) != Thing::_endOfList)) - _vm->_groupMan->f209_processEvents29to41(partyMapX, partyMapY, kM1_TMEventTypeCreateReactionEvent31ParyIsAdjacent, 0); + } else { + isMovementBlocked = (_vm->_groupMan->f175_groupGetThing(partyMapX, partyMapY) != Thing::_endOfList); + if (isMovementBlocked) + _vm->_groupMan->f209_processEvents29to41(partyMapX, partyMapY, kM1_TMEventTypeCreateReactionEvent31ParyIsAdjacent, 0); + } } // DEBUG CODE: check for Console flag @@ -1043,7 +1046,7 @@ bool EventManager::f375_processType80_clickDungeonView_isLeaderHandObjThrown(int bool objectThrownFl; if (posX <= 111) { - if (_vm->_dungeonMan->_g285_squareAheadElement == k17_DoorFrontElemType) { + if (_vm->_dungeonMan->_g285_squareAheadElement == k17_ElementTypeDoorFront) { if (posX < 64) return false; } else if (posX < 32) @@ -1052,7 +1055,7 @@ bool EventManager::f375_processType80_clickDungeonView_isLeaderHandObjThrown(int // Strangerke: Only present in CSB2.1... But it fixes a bug so we keep it objectThrownFl = _vm->_championMan->f329_isLeaderHandObjectThrown(k0_sideLeft); } else { - if (_vm->_dungeonMan->_g285_squareAheadElement == k17_DoorFrontElemType) { + if (_vm->_dungeonMan->_g285_squareAheadElement == k17_ElementTypeDoorFront) { if (posX > 163) return false; } else if (posX > 191) @@ -1137,7 +1140,7 @@ void EventManager::f377_commandProcessType80ClickInDungeonView(int16 posX, int16 Box(40, 111, 122, 147) /* Back left */ }; - if (_vm->_dungeonMan->_g285_squareAheadElement == k17_DoorFrontElemType) { + if (_vm->_dungeonMan->_g285_squareAheadElement == k17_ElementTypeDoorFront) { if (_vm->_championMan->_g411_leaderIndex == kM1_ChampionNone) return; @@ -1522,7 +1525,8 @@ void EventManager::f370_commandProcessType100_clickInSpellArea(uint16 posX, uint championIndex = 2; else if (posX <= 244) championIndex = 0; - + break; + default: break; } @@ -1620,6 +1624,8 @@ void EventManager::f541_waitForMouseOrKeyActivity() { case Common::EVENT_LBUTTONDOWN: case Common::EVENT_RBUTTONDOWN: return; + default: + break; } } _vm->f22_delay(1); |