aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-07-23 16:27:31 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit5418c2288b9a8e34f528f0d6f59dec5e7b959e5f (patch)
treed634ee4634723612ee24fb56bb427c7f6e575688 /engines
parentebd672770ada3685c2e84299368c9586d944ba2a (diff)
downloadscummvm-rg350-5418c2288b9a8e34f528f0d6f59dec5e7b959e5f.tar.gz
scummvm-rg350-5418c2288b9a8e34f528f0d6f59dec5e7b959e5f.tar.bz2
scummvm-rg350-5418c2288b9a8e34f528f0d6f59dec5e7b959e5f.zip
DM: Fix some more CppCheck warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/menus.cpp19
-rw-r--r--engines/dm/movesens.cpp17
2 files changed, 16 insertions, 20 deletions
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index 146a75e919..f2c372cf26 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -659,24 +659,17 @@ Spell* MenuMan::f409_getSpellFromSymbols(byte* symbols) {
Spell(0x00687073, 4, 13, 0x3C61),
Spell(0x006B7076, 3, 2, 0xFCD1),
Spell(0x006B6C00, 2, 19, 0x7831),
- Spell(0x006B6E76, 0, 3, 0x3C73)};
-
-
- int32 L1261_l_Symbols;
- int16 L1262_i_Multiple;
-#define AL1262_i_BitShiftCount L1262_i_Multiple
-#define AL1262_i_SpellIndex L1262_i_Multiple
- Spell* L1263_ps_Spell;
-
+ Spell(0x006B6E76, 0, 3, 0x3C73)
+ };
if (*(symbols + 1)) {
- AL1262_i_BitShiftCount = 24;
- L1261_l_Symbols = 0;
+ int16 AL1262_i_BitShiftCount = 24;
+ int32 L1261_l_Symbols = 0;
do {
L1261_l_Symbols |= (long)*symbols++ << AL1262_i_BitShiftCount;
} while (*symbols && ((AL1262_i_BitShiftCount -= 8) >= 0));
- L1263_ps_Spell = G0487_as_Graphic560_Spells;
- AL1262_i_SpellIndex = 25;
+ Spell *L1263_ps_Spell = G0487_as_Graphic560_Spells;
+ int16 AL1262_i_SpellIndex = 25;
while (AL1262_i_SpellIndex--) {
if (L1263_ps_Spell->_symbols & 0xFF000000) { /* If byte 1 of spell is not 0 then the spell includes the power symbol */
if (L1261_l_Symbols == L1263_ps_Spell->_symbols) { /* Compare champion symbols, including power symbol, with spell (never used with actual spells) */
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 75413800c6..d8337bc807 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -232,17 +232,12 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
uint16 L1638_ui_MovementSoundIndex;
L0710_i_ThingType = kM1_PartyThingType;
- bool L0713_B_ThingLevitates = false;
L0719_i_TraversedPitCount = 0;
L0720_ui_MoveGroupResult = 0;
- bool L0721_B_GroupOnPartyMap = false;
- bool L0722_B_FallKilledGroup = false;
- bool L0723_B_DrawDungeonViewWhileFalling = false;
- bool L0724_B_DestinationIsTeleporterTarget = false;
- bool L0725_B_PartySquare = false;
- bool L0726_B_Audible = false;
uint16 L0717_ui_ThingCell = 0;
+
+ bool L0713_B_ThingLevitates = false;
if (thing != Thing::_party) {
L0710_i_ThingType = thing.getType();
L0717_ui_ThingCell = thing.getCell();
@@ -254,12 +249,20 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
return true; /* The specified group thing cannot be moved because it was killed by a projectile impact */
}
}
+
uint16 L0714_ui_MapIndexSource = 0;
uint16 L0715_ui_MapIndexDestination = 0;
+ bool L0721_B_GroupOnPartyMap = false;
+ bool L0725_B_PartySquare = false;
+ bool L0726_B_Audible = false;
+
if (destMapX >= 0) {
L0714_ui_MapIndexSource = L0715_ui_MapIndexDestination = _vm->_dungeonMan->_g272_currMapIndex;
L0721_B_GroupOnPartyMap = (L0714_ui_MapIndexSource == _vm->_dungeonMan->_g309_partyMapIndex) && (mapX >= 0);
uint16 L0716_ui_Direction = 0;
+ bool L0722_B_FallKilledGroup = false;
+ bool L0723_B_DrawDungeonViewWhileFalling = false;
+ bool L0724_B_DestinationIsTeleporterTarget = false;
if (thing == Thing::_party) {
_vm->_dungeonMan->_g306_partyMapX = destMapX;
_vm->_dungeonMan->_g307_partyMapY = destMapY;