diff options
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/dungeonman.cpp | 3 | ||||
-rw-r--r-- | engines/dm/gfx.cpp | 2 | ||||
-rw-r--r-- | engines/dm/group.cpp | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index 9ee86eda90..2886c6c66b 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -638,6 +638,9 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) { _dungeonMaps[i]._doorSet0 = (tmp >> 8) & 0xF; _dungeonMaps[i]._wallSet = (WallSet)((tmp >> 4) & 0xF); _dungeonMaps[i]._floorSet = (FloorSet)(tmp & 0xF); + + if (!file) + delete dunDataStream; } // load column stuff thingy diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index d8d680c6a9..d0748e6610 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -1080,13 +1080,13 @@ void DisplayMan::drawFloorOrnament(uint16 floorOrnOrdinal, ViewFloor viewFloorIn return; bool drawFootprints = (getFlag(floorOrnOrdinal, kDMMaskFootprints) ? true : false); - byte *bitmap; if (!drawFootprints || clearFlag(floorOrnOrdinal, kDMMaskFootprints)) { floorOrnOrdinal--; uint16 floorOrnIndex = floorOrnOrdinal; int16 nativeBitmapIndex = _currMapFloorOrnInfo[floorOrnIndex].nativeIndice + g191_floorOrnNativeBitmapndexInc[viewFloorIndex]; uint16 *coordSets = g206_floorOrnCoordSets[_currMapFloorOrnInfo[floorOrnIndex].coordinateSet][viewFloorIndex]; + byte *bitmap; if ((viewFloorIndex == kDMViewFloorD1R) || (viewFloorIndex == kDMViewFloorD2R) || (viewFloorIndex == kDMViewFloorD3R) || ((floorOrnIndex == k15_FloorOrnFootprints) && _useFlippedWallAndFootprintsBitmap && diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index 5eb00208c7..4f96befda1 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -525,14 +525,15 @@ uint16 GroupMan::getGroupValueUpdatedWithCreatureValue(uint16 groupVal, uint16 c } int16 GroupMan::getDamageAllCreaturesOutcome(Group *group, int16 mapX, int16 mapY, int16 attack, bool notMoving) { - bool killedSomeCreatures = false; - bool killedAllCreatures = true; _dropMovingCreatureFixedPossCellCount = 0; if (attack > 0) { int16 creatureIndex = group->getCount(); uint16 randomAttackSeed = (attack >> 3) + 1; attack -= randomAttackSeed; randomAttackSeed <<= 1; + + bool killedSomeCreatures = false; + bool killedAllCreatures = true; do { int16 outcomeVal = groupGetDamageCreatureOutcome(group, creatureIndex, mapX, mapY, attack + _vm->getRandomNumber(randomAttackSeed), notMoving); killedAllCreatures = outcomeVal && killedAllCreatures; |