diff --git a/engines/dm/detection.cpp b/engines/dm/detection.cpp index 2d459c7d4a2..97019a987a0 100644 --- a/engines/dm/detection.cpp +++ b/engines/dm/detection.cpp @@ -35,7 +35,7 @@ namespace DM { static const PlainGameDescriptor DMGames[] = { {"dm", "Dungeon Master"}, - {0, 0} + {nullptr, nullptr} }; static const DMADGameDescription gameDescriptions[] = { diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index 7f66253fc87..b62774c1c4c 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -1478,7 +1478,7 @@ Thing DungeonMan::getDiscardThing(uint16 thingType) { } else { projExpl.projectileDeleteEvent(squareThing); unlinkThingFromList(squareThing, Thing(0), currMapX, currMapY); - projExpl.projectileDelete(squareThing, 0, currMapX, currMapY); + projExpl.projectileDelete(squareThing, nullptr, currMapX, currMapY); } break; case kDMThingTypeArmour: diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index f87c1719dcc..f7011276d97 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -844,7 +844,7 @@ void EventManager::processCommandQueue() { displMan.drawViewport(k2_viewportAsBeforeSleepOrFreezeGame); _vm->_waitForInputMaxVerticalBlankCount = 0; _primaryMouseInput = _primaryMouseInputPartySleeping; - _secondaryMouseInput = 0; + _secondaryMouseInput = nullptr; _primaryKeyboardInput = _primaryKeyboardInputPartySleeping; _secondaryKeyboardInput = nullptr; discardAllInput(); @@ -890,7 +890,7 @@ void EventManager::processCommandQueue() { primaryKeyboardInputBackup = _primaryKeyboardInput; secondaryKeyboardInputBackup = _secondaryKeyboardInput; _primaryMouseInput = _primaryMouseInputFrozenGame; - _secondaryMouseInput = 0; + _secondaryMouseInput = nullptr; _primaryKeyboardInput = _primaryKeyboardInputFrozenGame; _secondaryKeyboardInput = nullptr; discardAllInput(); diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 813633c80c8..a82fa47b4ac 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -3806,7 +3806,7 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:; blitToBitmapShrinkWithPalChange(bitmapRedBanana, _tmpBitmap, 48, 32, 48, 32, _palChangeSmoke); bitmapRedBanana = _tmpBitmap; } - blitBoxFilledWithMaskedBitmap(bitmapRedBanana, _bitmapViewport, 0, getDerivedBitmap(kDMDerivedBitmapViewport), boxExplosionPatternD0C, _vm->getRandomNumber(4) + 87, _vm->getRandomNumber(64), k112_byteWidthViewport, Color(k0x0080_BlitDoNotUseMask | kDMColorFlesh), 0, 0, 136, 93); + blitBoxFilledWithMaskedBitmap(bitmapRedBanana, _bitmapViewport, nullptr, getDerivedBitmap(kDMDerivedBitmapViewport), boxExplosionPatternD0C, _vm->getRandomNumber(4) + 87, _vm->getRandomNumber(64), k112_byteWidthViewport, Color(k0x0080_BlitDoNotUseMask | kDMColorFlesh), 0, 0, 136, 93); addDerivedBitmap(kDMDerivedBitmapViewport); warning("DISABLED CODE: f480_releaseBlock in drawObjectsCreaturesProjectilesExplosions"); //f480_releaseBlock(k0_DerivedBitmapViewport | 0x8000); @@ -3876,7 +3876,7 @@ T0115200_DrawExplosion: } } while ((thingParam = dungeon.getNextThing(thingParam))!= _vm->_thingEndOfList); - if ((fluxcageExplosion != 0) && (doorFrontViewDrawingPass != 1) && !_doNotDrawFluxcagesDuringEndgame) { /* Fluxcage is an explosion displayed as a field (like teleporters), above all other graphics */ + if ((fluxcageExplosion != nullptr) && (doorFrontViewDrawingPass != 1) && !_doNotDrawFluxcagesDuringEndgame) { /* Fluxcage is an explosion displayed as a field (like teleporters), above all other graphics */ AL_1_viewSquareExplosionIndex -= 3; /* Convert square index for explosions back to square index */ FieldAspect fieldAspect = _fieldAspects188[viewSquareIndex]; (fieldAspect._nativeBitmapRelativeIndex)++; /* NativeBitmapRelativeIndex is now the index of the Fluxcage field graphic */ diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp index 3bcceb30e92..6a321b4414b 100644 --- a/engines/dm/projexpl.cpp +++ b/engines/dm/projexpl.cpp @@ -377,7 +377,7 @@ void ProjExpl::projectileDelete(Thing projectileThing, Thing *groupSlot, int16 m Projectile *projectile = (Projectile *)_vm->_dungeonMan->getThingData(projectileThing); Thing projectileSlotThing = projectile->_slot; if (projectileSlotThing.getType() != kDMThingTypeExplosion) { - if (groupSlot != NULL) { + if (groupSlot != nullptr) { Thing previousThing = *groupSlot; if (previousThing == _vm->_thingEndOfList) { Thing *genericThing = (Thing *)_vm->_dungeonMan->getThingData(projectileSlotThing); @@ -415,7 +415,7 @@ void ProjExpl::processEvents48To49(TimelineEvent *event) { uint16 stepEnergy = curEvent->_Cu._projectile.getStepEnergy(); if (projectile->_kineticEnergy <= stepEnergy) { _vm->_dungeonMan->unlinkThingFromList(projectileThingNewCell = projectileThing, Thing(0), destinationMapX, destinationMapY); - projectileDelete(projectileThingNewCell, NULL, destinationMapX, destinationMapY); + projectileDelete(projectileThingNewCell, nullptr, destinationMapX, destinationMapY); return; } projectile->_kineticEnergy -= stepEnergy;