Skip to content

Commit

Permalink
DM: Rename members of SoundIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Sep 18, 2016
1 parent 383cc85 commit 4a8c8a5
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 80 deletions.
2 changes: 1 addition & 1 deletion engines/dm/champion.cpp
Expand Up @@ -217,7 +217,7 @@ bool ChampionMan::isObjectThrown(uint16 champIndex, int16 slotIndex, int16 side)
return false;
}

_vm->_sound->requestPlay(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexAttackSkelettonAnimatedArmorDethKnight, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
decrementStamina(champIndex, getThrowingStaminaCost(curThing));
disableAction(champIndex, 4);
int16 experience = 8;
Expand Down
10 changes: 5 additions & 5 deletions engines/dm/dm.cpp
Expand Up @@ -542,7 +542,7 @@ void DMEngine::processEntrance() {
} while (_newGameFl == kDMCommandEntranceDrawCredits);

//Strangerke: CHECKME: Earlier versions were using G0566_puc_Graphic534_Sound01Switch
_sound->play(k01_soundSWITCH, 112, 0x40, 0x40);
_sound->play(kDMSoundIndexSwitch, 112, 0x40, 0x40);
delay(20);
_eventMan->showMouse();
if (_newGameFl)
Expand Down Expand Up @@ -595,7 +595,7 @@ void DMEngine::endGame(bool doNotDrawCreditsOnly) {
_eventMan->_primaryKeyboardInput = nullptr;
_eventMan->_secondaryKeyboardInput = nullptr;
if (doNotDrawCreditsOnly && !_gameWon) {
_sound->requestPlay(k06_soundSCREAM, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
_sound->requestPlay(kDMSoundIndexScream, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
delay(240);
}

Expand Down Expand Up @@ -786,7 +786,7 @@ void DMEngine::openEntranceDoors() {
for (uint16 animStep = 1; animStep < 32; ++animStep) {
if ((animStep % 3) == 1) {
// Strangerke: CHECKME: Earlier versions of the game were using G0565_puc_Graphic535_Sound02DoorRattle instead of k02_soundDOOR_RATTLE 2
_sound->play(k02_soundDOOR_RATTLE, 145, 0x40, 0x40);
_sound->play(kDMSoundIndexDoorRattle, 145, 0x40, 0x40);
}

_displayMan->blitToScreen(_savedScreenForOpenEntranceDoors, &screenBox, 160, kDMColorNoTransparency, 200);
Expand Down Expand Up @@ -939,7 +939,7 @@ void DMEngine::fuseSequence() {
_projexpl->createExplosion(Thing::_explFireBall, attackId, lordChaosMapX, lordChaosMapY, kDMCreatureTypeSingleCenteredCreature);
fuseSequenceUpdate();
}
_sound->requestPlay(k17_soundBUZZ, lordChaosMapX, lordChaosMapY, kDMSoundModePlayIfPrioritized);
_sound->requestPlay(kDMSoundIndexBuzz, lordChaosMapX, lordChaosMapY, kDMSoundModePlayIfPrioritized);
lordGroup->_type = kDMCreatureTypeLordOrder;
fuseSequenceUpdate();
for (int16 attackId = 55; attackId <= 255; attackId += 40) {
Expand All @@ -948,7 +948,7 @@ void DMEngine::fuseSequence() {
}
for (int16 cycleCount = 3; cycleCount > 0; cycleCount--) {
for (int16 switchCount = 4; switchCount > 0; switchCount--) {
_sound->requestPlay(k17_soundBUZZ, lordChaosMapX, lordChaosMapY, kDMSoundModePlayIfPrioritized);
_sound->requestPlay(kDMSoundIndexBuzz, lordChaosMapX, lordChaosMapY, kDMSoundModePlayIfPrioritized);
lordGroup->_type = (switchCount & 0x0001) ? kDMCreatureTypeLordOrder : kDMCreatureTypeLordChaos;
for (int16 fuseSequenceUpdateCount = cycleCount - 1; fuseSequenceUpdateCount >= 0; fuseSequenceUpdateCount--)
fuseSequenceUpdate();
Expand Down
4 changes: 2 additions & 2 deletions engines/dm/eventman.cpp
Expand Up @@ -1028,7 +1028,7 @@ void EventManager::commandMoveParty(CommandType cmdType) {
damage |= _vm->_championMan->addPendingDamageAndWounds_getDamage(secondDamagedChampionIndex, 1, kDMWoundTorso | kDMWoundLegs, kDMAttackTypeSelf);

if (damage)
_vm->_sound->requestPlay(k18_soundPARTY_DAMAGED, partyMapX, partyMapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexPartyDamaged, partyMapX, partyMapY, kDMSoundModePlayImmediately);
} else {
isMovementBlocked = (_vm->_groupMan->groupGetThing(partyMapX, partyMapY) != Thing::_endOfList);
if (isMovementBlocked)
Expand Down Expand Up @@ -1174,7 +1174,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
Junk *junkPtr = (Junk*)_vm->_dungeonMan->getSquareFirstThingData(mapX, mapY);
if ((((Door*)junkPtr)->hasButton()) && _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
_vm->_stopWaitingForPlayerInput = true;
_vm->_sound->requestPlay(k01_soundSWITCH, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexSwitch, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_moveSens->addEvent(k10_TMEventTypeDoor, mapX, mapY, kDMCellNorthWest, kDMSensorEffectToggle, _vm->_gameTime + 1);
return;
}
Expand Down
14 changes: 7 additions & 7 deletions engines/dm/group.cpp
Expand Up @@ -164,7 +164,7 @@ void GroupMan::dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThing, So
} while ((currentThing = nextThing) != Thing::_endOfList);

if (soundMode != kDMSoundModeDoNotPlaySound)
_vm->_sound->requestPlay(weaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, soundMode);
_vm->_sound->requestPlay(weaponDropped ? kDMSoundIndexMetallicThud : kDMSoundIndexWoodenThudAttackTrolinAntmanStoneGolem, mapX, mapY, soundMode);
}
}

Expand Down Expand Up @@ -294,7 +294,7 @@ void GroupMan::dropCreatureFixedPossessions(CreatureType creatureType, int16 map
_vm->_moveSens->getMoveResult(nextUnusedThing, kDMMapXNotOnASquare, 0, mapX, mapY);
currFixedPossession = *fixedPossessions++;
}
_vm->_sound->requestPlay(weaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, soundMode);
_vm->_sound->requestPlay(weaponDropped ? kDMSoundIndexMetallicThud : kDMSoundIndexWoodenThudAttackTrolinAntmanStoneGolem, mapX, mapY, soundMode);
}

int16 GroupMan::getDirsWhereDestIsVisibleFromSource(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY) {
Expand Down Expand Up @@ -893,7 +893,7 @@ void GroupMan::processEvents29to41(int16 eventMapX, int16 eventMapY, int16 event
AL0450_i_DestinationMapX = eventMapX;
AL0451_i_DestinationMapY = eventMapY;
AL0450_i_DestinationMapX += _vm->_dirIntoStepCountEast[AL0446_i_Direction] * 2, AL0451_i_DestinationMapY += _vm->_dirIntoStepCountNorth[AL0446_i_Direction] * 2;
_vm->_sound->requestPlay(k17_soundBUZZ, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexBuzz, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY, kDMSoundModePlayIfPrioritized);
goto T0209061_MoveGroup;
}
}
Expand Down Expand Up @@ -1278,7 +1278,7 @@ int32 GroupMan::getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 crea
if (getFlag(aspect, kDMAspectMaskActiveGroupIsAttacking) && (creatureType == kDMCreatureTypeAnimatedArmour)) {
if (_vm->getRandomNumber(2)) {
toggleFlag(aspect, kDMAspectMaskActiveGroupFlipBitmap);
_vm->_sound->requestPlay(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _currentGroupMapX, _currentGroupMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexAttackSkelettonAnimatedArmorDethKnight, _currentGroupMapX, _currentGroupMapY, kDMSoundModePlayIfPrioritized);
}
} else if (!getFlag(aspect, kDMAspectMaskActiveGroupIsAttacking) || !getFlag(creatureGraphicInfo, kDMCreatureMaskFlipDuringAttack)) {
if (_vm->getRandomNumber(2))
Expand Down Expand Up @@ -1475,7 +1475,7 @@ bool GroupMan::isCreatureAttacking(Group *group, int16 mapX, int16 mapY, uint16
int16 kineticEnergy = (creatureInfo->_attack >> 2) + 1;
kineticEnergy += _vm->getRandomNumber(kineticEnergy);
kineticEnergy += _vm->getRandomNumber(kineticEnergy);
_vm->_sound->requestPlay(k13_soundSPELL, mapX, mapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexSpell, mapX, mapY, kDMSoundModePlayImmediately);
_vm->_projexpl->createProjectile(projectileThing, mapX, mapY, targetCell, (Direction)_currGroupPrimaryDirToParty, CLIP<byte>(20, kineticEnergy, 255), creatureInfo->_dexterity, 8);
} else {
int16 championIndex;
Expand Down Expand Up @@ -1615,7 +1615,7 @@ int16 GroupMan::getChampionDamage(Group *group, uint16 champIndex) {

int16 damage = _vm->_championMan->addPendingDamageAndWounds_getDamage(champIndex, attack, allowedWound, creatureInfo._attackType);
if (damage) {
_vm->_sound->requestPlay(k09_soundCHAMPION_0_DAMAGED + champIndex, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayOneTickLater);
_vm->_sound->requestPlay(kDMSoundIndexChampion0Damaged + champIndex, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayOneTickLater);

uint16 poisonAttack = creatureInfo._poisonAttack;
if (poisonAttack && _vm->getRandomNumber(2)) {
Expand Down Expand Up @@ -1767,7 +1767,7 @@ Thing GroupMan::groupGetGenerated(CreatureType creatureType, int16 healthMultipl
(in which case the thing is referenced in the event) */
return Thing::_none;
}
_vm->_sound->requestPlay(k17_soundBUZZ, mapX, mapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexBuzz, mapX, mapY, kDMSoundModePlayIfPrioritized);
return groupThing;
}

Expand Down
2 changes: 1 addition & 1 deletion engines/dm/inventory.cpp
Expand Up @@ -1018,7 +1018,7 @@ void InventoryMan::clickOnMouth() {
_vm->_championMan->_champions[_vm->_championMan->_leaderIndex]._load += _vm->_dungeonMan->getObjectWeight(handThing) - handThingWeight;
setFlag(_vm->_championMan->_champions[_vm->_championMan->_leaderIndex]._attributes, kDMAttributeLoad);
}
_vm->_sound->requestPlay(k08_soundSWALLOW, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexSwallow, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
setFlag(curChampion->_attributes, kDMAttributeStatistics);

if (_panelContent == kDMPanelContentFoodWaterPoisoned)
Expand Down
12 changes: 6 additions & 6 deletions engines/dm/menus.cpp
Expand Up @@ -1106,10 +1106,10 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) {
case kDMActionSwing:
case kDMActionChop:
if ((Square(targetSquare).getType() == kDMElementTypeDoor) && (Square(targetSquare).getDoorState() == kDMDoorStateClosed)) {
_vm->_sound->requestPlay(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexAttackSkelettonAnimatedArmorDethKnight, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
actionDisabledTicks = 6;
_vm->_groupMan->groupIsDoorDestoryedByAttack(nextMapX, nextMapY, _vm->_championMan->getStrength(champIndex, kDMSlotActionHand), false, 2);
_vm->_sound->requestPlay(k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayOneTickLater);
_vm->_sound->requestPlay(kDMSoundIndexWoodenThudAttackTrolinAntmanStoneGolem, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayOneTickLater);
break;
}
case kDMActionDisrupt:
Expand All @@ -1136,9 +1136,9 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) {
case kDMActionBrandish:
case kDMActionBlowHorn:
if (actionIndex == kDMActionWarCry)
_vm->_sound->requestPlay(k28_soundWAR_CRY, nextMapX, nextMapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexWarCry, nextMapX, nextMapY, kDMSoundModePlayImmediately);
else if (actionIndex == kDMActionBlowHorn)
_vm->_sound->requestPlay(k25_soundBLOW_HORN, nextMapX, nextMapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexBlowHorn, nextMapX, nextMapY, kDMSoundModePlayImmediately);

actionPerformed = isGroupFrightenedByAction(champIndex, actionIndex, nextMapX, nextMapY);
break;
Expand Down Expand Up @@ -1175,7 +1175,7 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) {

setChampionDirectionToPartyDirection(curChampion);
Thing removedObject = _vm->_championMan->getObjectRemovedFromSlot(champIndex, kDMSlotReadyHand);
_vm->_sound->requestPlay(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexAttackSkelettonAnimatedArmorDethKnight, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_championMan->championShootProjectile(curChampion, removedObject, weaponInfoActionHand->_kineticEnergy + weaponInfoReadyHand->_kineticEnergy, (weaponInfoActionHand->getShootAttack() + _vm->_championMan->getSkillLevel(champIndex, kDMSkillShoot)) << 1, stepEnergy);
}
break;
Expand Down Expand Up @@ -1482,7 +1482,7 @@ bool MenuMan::isMeleeActionPerformed(int16 champIndex, Champion *champ, int16 ac
0 /* FUSE */
};

_vm->_sound->requestPlay(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexAttackSkelettonAnimatedArmorDethKnight, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
if (_actionTargetGroupThing == Thing::_endOfList)
return false;

Expand Down
24 changes: 12 additions & 12 deletions engines/dm/movesens.cpp
Expand Up @@ -182,7 +182,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
if (!doNotTriggerSensor) {
atLeastOneSensorWasTriggered = true;
if (currentSensor->getAttrAudibleA())
_vm->_sound->requestPlay(k01_soundSWITCH, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexSwitch, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);

if (!_vm->_championMan->_leaderEmptyHanded && ((processedSensorType == kDMSensorWallOrnClickWithSpecObjRemoved) || (processedSensorType == kDMSensorWallOrnClickWithSpecObjRemovedRotateSensors) || (processedSensorType == kDMSensorWallOrnClickWithSpecObjRemovedSensor))) {
Thing *leaderThing = (Thing *)_vm->_dungeonMan->getThingData(leaderHandObject);
Expand Down Expand Up @@ -279,7 +279,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM
_vm->_dungeonMan->_partyMapX = destMapX;
_vm->_dungeonMan->_partyMapY = destMapY;
if (teleporter->isAudible())
_vm->_sound->requestPlay(k17_soundBUZZ, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexBuzz, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayImmediately);

drawDungeonViewWhileFalling = true;
if (teleporter->getAbsoluteRotation())
Expand All @@ -289,7 +289,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM
} else {
if (thingType == kDMThingTypeGroup) {
if (teleporter->isAudible())
_vm->_sound->requestPlay(k17_soundBUZZ, destMapX, destMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexBuzz, destMapX, destMapY, kDMSoundModePlayIfPrioritized);

moveGroupResult = getTeleporterRotatedGroupResult(teleporter, thing, mapIndexSource);
} else {
Expand Down Expand Up @@ -327,7 +327,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM
_vm->_championMan->decrementStamina(championIdx, ((curChampion->_load * 25) / _vm->_championMan->getMaximumLoad(curChampion)) + 1);
}
} else if (_vm->_championMan->getDamagedChampionCount(20, kDMWoundLegs | kDMWoundFeet, kDMAttackTypeSelf))
_vm->_sound->requestPlay(k06_soundSCREAM, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
_vm->_sound->requestPlay(kDMSoundIndexScream, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayImmediately);
}
_useRopeToClimbDownPit = false;
} else if (thingType == kDMThingTypeGroup) {
Expand Down Expand Up @@ -614,27 +614,27 @@ int16 MovesensMan::getSound(CreatureType creatureType) {
case kDMCreatureTypeVexirk:
case kDMCreatureTypeAntman:
case kDMCreatureTypeDemon:
return k24_soundMOVE_MUMMY_TROLIN_ANTMAN_STONE_GOLEM_GIGGLER_VEXIRK_DEMON;
return kDMSoundIndexMoveMummyTrolinAntmanStoneGolemGiggleVexirkDemon;
case kDMCreatureTypeGiantScorpion:
case kDMCreatureTypePainRat:
case kDMCreatureTypeRuster:
case kDMCreatureTypeScreamer:
case kDMCreatureTypeRockpile:
case kDMCreatureTypeMagentaWorm:
case kDMCreatureTypeOitu:
return k26_soundMOVE_SCREAMER_ROCK_ROCKPILE_MAGENTA_WORM_WORM_PAIN_RAT_HELLHOUND_RUSTER_GIANT_SCORPION_SCORPION_OITU;
return kDMSoundIndexMoveScreamerRocksWormPainRatHellHoundRusterScorpionsOitu;
case kDMCreatureTypeRedDragon:
return k32_soundMOVE_RED_DRAGON;
return kDMSoundIndexMoveRedDragon;
case kDMCreatureTypeSkeleton:
return k33_soundMOVE_SKELETON;
return kDMSoundIndexMoveSkeletton;
case kDMCreatureTypeAnimatedArmour:
return k22_soundMOVE_ANIMATED_ARMOUR_DETH_KNIGHT;
return kDMSoundIndexMoveAnimatedArmorDethKnight;
case kDMCreatureTypeSwampSlime:
case kDMCreatureTypeWaterElemental:
return k27_soundMOVE_SWAMP_SLIME_SLIME_DEVIL_WATER_ELEMENTAL;
return kDMSoundIndexMoveSlimesDevilWaterElemental;
case kDMCreatureTypeCouatl:
case kDMCreatureTypeGiantWasp:
return k23_soundMOVE_COUATL_GIANT_WASP_MUNCHER;
return kDMSoundIndexMoveCouatlGiantWaspMuncher;
}

return 35;
Expand Down Expand Up @@ -840,7 +840,7 @@ void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing
continue;

if (curSensor->getAttrAudibleA())
_vm->_sound->requestPlay(k01_soundSWITCH, mapX, mapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexSwitch, mapX, mapY, kDMSoundModePlayIfPrioritized);

triggerEffect(curSensor, curSensorEffect, mapX, mapY, (uint16)kDMCellAny); // this will wrap around
continue;
Expand Down
12 changes: 6 additions & 6 deletions engines/dm/projexpl.cpp
Expand Up @@ -212,11 +212,11 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in
} else {
uint16 soundIndex;
if ((projectileAssociatedThing).getType() == kDMThingTypeWeapon)
soundIndex = k00_soundMETALLIC_THUD;
soundIndex = kDMSoundIndexMetallicThud;
else if (projectileAssociatedThing == Thing::_explPoisonBolt)
soundIndex = k13_soundSPELL;
soundIndex = kDMSoundIndexSpell;
else
soundIndex = k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM;
soundIndex = kDMSoundIndexWoodenThudAttackTrolinAntmanStoneGolem;

_vm->_sound->requestPlay(soundIndex, projectileMapX, projectileMapY, kDMSoundModePlayIfPrioritized);
}
Expand Down Expand Up @@ -304,10 +304,10 @@ void ProjExpl::createExplosion(Thing explThing, uint16 attack, uint16 mapXCombo,
explosion->setType(explThing.toUint16() - Thing::_firstExplosion.toUint16());
explosion->setAttack(attack);
if (explThing.toUint16() < Thing::_explHarmNonMaterial.toUint16()) {
uint16 soundIndex = (attack > 80) ? k05_soundSTRONG_EXPLOSION : k20_soundWEAK_EXPLOSION;
uint16 soundIndex = (attack > 80) ? kDMSoundIndexStrongExplosion : kDMSoundIndexWeakExplosion;
_vm->_sound->requestPlay(soundIndex, projectileMapX, projectileMapY, kDMSoundModePlayIfPrioritized);
} else if (explThing != Thing::_explSmoke)
_vm->_sound->requestPlay(k13_soundSPELL, projectileMapX, projectileMapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexSpell, projectileMapX, projectileMapY, kDMSoundModePlayIfPrioritized);

_vm->_dungeonMan->linkThingToList(unusedThing, Thing(0), projectileMapX, projectileMapY);
TimelineEvent newEvent;
Expand Down Expand Up @@ -525,7 +525,7 @@ void ProjExpl::processEvent25(TimelineEvent *event) {
break;
case 0xFFE4:
explosion->setType(explosion->getType() + 1);
_vm->_sound->requestPlay(k05_soundSTRONG_EXPLOSION, mapX, mapY, kDMSoundModePlayIfPrioritized);
_vm->_sound->requestPlay(kDMSoundIndexStrongExplosion, mapX, mapY, kDMSoundModePlayIfPrioritized);
AddEventFl = true;
break;
case 0xFFA8:
Expand Down

0 comments on commit 4a8c8a5

Please sign in to comment.