aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dm/champion.cpp2
-rw-r--r--engines/dm/dungeonman.cpp6
-rw-r--r--engines/dm/dungeonman.h56
-rw-r--r--engines/dm/eventman.cpp2
-rw-r--r--engines/dm/group.cpp38
-rw-r--r--engines/dm/inventory.cpp22
-rw-r--r--engines/dm/menus.cpp6
-rw-r--r--engines/dm/projexpl.cpp4
8 files changed, 69 insertions, 67 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index da477a1278..fb77c09ee1 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -1472,7 +1472,7 @@ void ChampionMan::championKill(uint16 champIndex) {
uint16 curCell = 0;
if (unusedThing != Thing::_none) {
Junk *L0966_ps_Junk = (Junk *)_vm->_dungeonMan->getThingData(unusedThing);
- L0966_ps_Junk->setType(k5_JunkTypeBones);
+ L0966_ps_Junk->setType(kDMJunkTypeBones);
L0966_ps_Junk->setDoNotDiscard(true);
L0966_ps_Junk->setChargeCount(champIndex);
curCell = curChampion->_cell;
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 74979850ef..a9658b8222 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -1257,7 +1257,7 @@ uint16 DungeonMan::getObjectWeight(Thing thing) {
break;
case kDMThingTypeJunk:
weight = junkInfo[junk->getType()];
- if (junk->getType() == k1_JunkTypeWaterskin)
+ if (junk->getType() == kDMJunkTypeWaterskin)
weight += junk->getChargeCount() << 1;
break;
@@ -1270,7 +1270,7 @@ uint16 DungeonMan::getObjectWeight(Thing thing) {
}
break;
case kDMThingTypePotion:
- if (((Potion *)junk)->getType() == k20_PotionTypeEmptyFlask)
+ if (((Potion *)junk)->getType() == kDMPotionTypeEmptyFlask)
weight = 1;
else
weight = 3;
@@ -1627,7 +1627,7 @@ Thing DungeonMan::getObjForProjectileLaucherOrObjGen(uint16 iconIndex) {
junkType = kDMWeaponRock;
break;
case kDMIconIndiceJunkBoulder:
- junkType = k25_JunkTypeBoulder;
+ junkType = kDMJunkTypeBoulder;
thingType = kDMThingTypeJunk;
break;
case kDMIconIndiceWeaponArrow:
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index cfa16b0efc..6eb34f2176 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -186,38 +186,40 @@ enum ArmourType {
};
enum PotionType {
- k3_PotionTypeVen = 3, // @ C03_POTION_VEN_POTION,
- k6_PotionTypeRos = 6, // @ C06_POTION_ROS_POTION,
- k7_PotionTypeKu = 7, // @ C07_POTION_KU_POTION,
- k8_PotionTypeDane = 8, // @ C08_POTION_DANE_POTION,
- k9_PotionTypeNeta = 9, // @ C09_POTION_NETA_POTION,
- k10_PotionTypeAntivenin = 10, // @ C10_POTION_ANTIVENIN,
- k11_PotionTypeMon = 11, // @ C11_POTION_MON_POTION,
- k12_PotionTypeYa = 12, // @ C12_POTION_YA_POTION,
- k13_PotionTypeEe = 13, // @ C13_POTION_EE_POTION,
- k14_PotionTypeVi = 14, // @ C14_POTION_VI_POTION,
- k15_PotionTypeWaterFlask = 15, // @ C15_POTION_WATER_FLASK,
- k19_PotionTypeFulBomb = 19, // @ C19_POTION_FUL_BOMB,
- k20_PotionTypeEmptyFlask = 20 // @ C20_POTION_EMPTY_FLASK,
+ kDMPotionTypeVen = 3, // @ C03_POTION_VEN_POTION,
+ kDMPotionTypeRos = 6, // @ C06_POTION_ROS_POTION,
+ kDMPotionTypeKu = 7, // @ C07_POTION_KU_POTION,
+ kDMPotionTypeDane = 8, // @ C08_POTION_DANE_POTION,
+ kDMPotionTypeNeta = 9, // @ C09_POTION_NETA_POTION,
+ kDMPotionTypeAntivenin = 10, // @ C10_POTION_ANTIVENIN,
+ kDMPotionTypeMon = 11, // @ C11_POTION_MON_POTION,
+ kDMPotionTypeYa = 12, // @ C12_POTION_YA_POTION,
+ kDMPotionTypeEe = 13, // @ C13_POTION_EE_POTION,
+ kDMPotionTypeVi = 14, // @ C14_POTION_VI_POTION,
+ kDMPotionTypeWaterFlask = 15, // @ C15_POTION_WATER_FLASK,
+ kDMPotionTypeFulBomb = 19, // @ C19_POTION_FUL_BOMB,
+ kDMPotionTypeEmptyFlask = 20 // @ C20_POTION_EMPTY_FLASK,
};
enum JunkType {
- k1_JunkTypeWaterskin = 1, // @ C01_JUNK_WATERSKIN,
- k5_JunkTypeBones = 5, // @ C05_JUNK_BONES,
- k25_JunkTypeBoulder = 25, // @ C25_JUNK_BOULDER,
- k33_JunkTypeScreamerSlice = 33, // @ C33_JUNK_SCREAMER_SLICE,
- k34_JunkTypeWormRound = 34, // @ C34_JUNK_WORM_ROUND,
- k35_JunkTypeDrumstickShank = 35, // @ C35_JUNK_DRUMSTICK_SHANK,
- k36_JunkTypeDragonSteak = 36, // @ C36_JUNK_DRAGON_STEAK,
- k42_JunkTypeMagicalBoxBlue = 42, // @ C42_JUNK_MAGICAL_BOX_BLUE,
- k43_JunkTypeMagicalBoxGreen = 43, // @ C43_JUNK_MAGICAL_BOX_GREEN,
- k51_JunkTypeZokathra = 51 // @ C51_JUNK_ZOKATHRA,
+ kDMJunkTypeWaterskin = 1, // @ C01_JUNK_WATERSKIN,
+ kDMJunkTypeBones = 5, // @ C05_JUNK_BONES,
+ kDMJunkTypeBoulder = 25, // @ C25_JUNK_BOULDER,
+ kDMJunkTypeScreamerSlice = 33, // @ C33_JUNK_SCREAMER_SLICE,
+ kDMJunkTypeWormRound = 34, // @ C34_JUNK_WORM_ROUND,
+ kDMJunkTypeDrumstickShank = 35, // @ C35_JUNK_DRUMSTICK_SHANK,
+ kDMJunkTypeDragonSteak = 36, // @ C36_JUNK_DRAGON_STEAK,
+ kDMJunkTypeMagicalBoxBlue = 42, // @ C42_JUNK_MAGICAL_BOX_BLUE,
+ kDMJunkTypeMagicalBoxGreen = 43, // @ C43_JUNK_MAGICAL_BOX_GREEN,
+ kDMJunkTypeZokathra = 51 // @ C51_JUNK_ZOKATHRA,
};
-#define kM1_soundModeDoNotPlaySound -1 // @ CM1_MODE_DO_NOT_PLAY_SOUND
-#define k0_soundModePlayImmediately 0 // @ C00_MODE_PLAY_IMMEDIATELY
-#define k1_soundModePlayIfPrioritized 1 // @ C01_MODE_PLAY_IF_PRIORITIZED
-#define k2_soundModePlayOneTickLater 2 // @ C02_MODE_PLAY_ONE_TICK_LATER
+enum SoundMode {
+ kM1_soundModeDoNotPlaySound = -1, // @ CM1_MODE_DO_NOT_PLAY_SOUND
+ k0_soundModePlayImmediately = 0, // @ C00_MODE_PLAY_IMMEDIATELY
+ k1_soundModePlayIfPrioritized = 1, // @ C01_MODE_PLAY_IF_PRIORITIZED
+ k2_soundModePlayOneTickLater = 2 // @ C02_MODE_PLAY_ONE_TICK_LATER
+};
#define k0_ExplosionType_Fireball 0 // @ C000_EXPLOSION_FIREBALL
#define k1_ExplosionType_Slime 1 // @ C001_EXPLOSION_SLIME
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 5d36424cac..08882adb47 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -1214,7 +1214,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
if ((iconIdx >= kDMIconIndiceJunkWater) && (iconIdx <= kDMIconIndiceJunkWaterSkin))
junkPtr->setChargeCount(3); /* Full */
else if (iconIdx == kDMIconIndicePotionEmptyFlask)
- ((Potion*)junkPtr)->setType(k15_PotionTypeWaterFlask);
+ ((Potion*)junkPtr)->setType(kDMPotionTypeWaterFlask);
else {
commandProcessType80ClickInDungeonViewTouchFrontWall();
return;
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 9e7335ca28..93fb718d72 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -191,39 +191,39 @@ void GroupMan::dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int
0
};
static uint16 fixedPossessionCreature7rockRockPile[5] = { // @ G0249_aui_Graphic559_FixedPossessionsCreature07Rock_RockPile
- kDMObjectInfoIndexFirstJunk + k25_JunkTypeBoulder,
- kDMObjectInfoIndexFirstJunk + k25_JunkTypeBoulder | kDMMaskRandomDrop,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeBoulder,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeBoulder | kDMMaskRandomDrop,
kDMObjectInfoIndexFirstWeapon + kDMWeaponRock | kDMMaskRandomDrop,
kDMObjectInfoIndexFirstWeapon + kDMWeaponRock | kDMMaskRandomDrop,
0
};
static uint16 fixedPossessionCreature4PainRatHellHound[3] = { // @ G0250_aui_Graphic559_FixedPossessionsCreature04PainRat_Hellhound
- kDMObjectInfoIndexFirstJunk + k35_JunkTypeDrumstickShank,
- kDMObjectInfoIndexFirstJunk + k35_JunkTypeDrumstickShank | kDMMaskRandomDrop,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDrumstickShank,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDrumstickShank | kDMMaskRandomDrop,
0
};
static uint16 fixedPossessionCreature6screamer[3] = { // @ G0251_aui_Graphic559_FixedPossessionsCreature06Screamer
- kDMObjectInfoIndexFirstJunk + k33_JunkTypeScreamerSlice,
- kDMObjectInfoIndexFirstJunk + k33_JunkTypeScreamerSlice | kDMMaskRandomDrop,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeScreamerSlice,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeScreamerSlice | kDMMaskRandomDrop,
0
};
static uint16 fixedPossessionCreature15MagnetaWormWorm[4] = { // @ G0252_aui_Graphic559_FixedPossessionsCreature15MagentaWorm_Worm
- kDMObjectInfoIndexFirstJunk + k34_JunkTypeWormRound,
- kDMObjectInfoIndexFirstJunk + k34_JunkTypeWormRound | kDMMaskRandomDrop,
- kDMObjectInfoIndexFirstJunk + k34_JunkTypeWormRound | kDMMaskRandomDrop,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeWormRound,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeWormRound | kDMMaskRandomDrop,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeWormRound | kDMMaskRandomDrop,
0
};
static uint16 fixedPossessionCreature24RedDragon[11] = { // @ G0253_aui_Graphic559_FixedPossessionsCreature24RedDragon
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak | kDMMaskRandomDrop,
- kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak | kDMMaskRandomDrop, 0};
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak | kDMMaskRandomDrop,
+ kDMObjectInfoIndexFirstJunk + kDMJunkTypeDragonSteak | kDMMaskRandomDrop, 0};
uint16 *fixedPossessions;
bool cursedPossessions = false;
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 1efc905d42..ca4734b56e 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -931,25 +931,25 @@ void InventoryMan::clickOnMouth() {
uint16 adjustedPotionPower = (potionPower / 25) + 8; /* Value between 8 and 18 */
switch (((Potion *)junkData)->getType()) {
- case k6_PotionTypeRos:
+ case kDMPotionTypeRos:
adjustStatisticCurrentValue(curChampion, kDMStatDexterity, adjustedPotionPower);
break;
- case k7_PotionTypeKu:
+ case kDMPotionTypeKu:
adjustStatisticCurrentValue(curChampion, kDMStatStrength, (((Potion *)junkData)->getPower() / 35) + 5); /* Value between 5 and 12 */
break;
- case k8_PotionTypeDane:
+ case kDMPotionTypeDane:
adjustStatisticCurrentValue(curChampion, kDMStatWisdom, adjustedPotionPower);
break;
- case k9_PotionTypeNeta:
+ case kDMPotionTypeNeta:
adjustStatisticCurrentValue(curChampion, kDMStatVitality, adjustedPotionPower);
break;
- case k10_PotionTypeAntivenin:
+ case kDMPotionTypeAntivenin:
_vm->_championMan->unpoison(championIndex);
break;
- case k11_PotionTypeMon:
+ case kDMPotionTypeMon:
curChampion->_currStamina += MIN(curChampion->_maxStamina - curChampion->_currStamina, curChampion->_maxStamina / counter);
break;
- case k12_PotionTypeYa: {
+ case kDMPotionTypeYa: {
adjustedPotionPower += adjustedPotionPower >> 1;
if (curChampion->_shieldDefense > 50)
adjustedPotionPower >>= 2;
@@ -964,7 +964,7 @@ void InventoryMan::clickOnMouth() {
setFlag(curChampion->_attributes, kDMAttributeStatusBox);
}
break;
- case k13_PotionTypeEe: {
+ case kDMPotionTypeEe: {
uint16 mana = MIN(900, (curChampion->_currMana + adjustedPotionPower) + (adjustedPotionPower - 8));
if (mana > curChampion->_maxMana)
mana -= (mana - MAX(curChampion->_currMana, curChampion->_maxMana)) >> 1;
@@ -972,7 +972,7 @@ void InventoryMan::clickOnMouth() {
curChampion->_currMana = mana;
}
break;
- case k14_PotionTypeVi: {
+ case kDMPotionTypeVi: {
uint16 healWoundIterationCount = MAX(1, (((Potion *)junkData)->getPower() / 42));
curChampion->_currHealth += curChampion->_maxHealth / counter;
int16 wounds = curChampion->_wounds;
@@ -988,13 +988,13 @@ void InventoryMan::clickOnMouth() {
setFlag(curChampion->_attributes, kDMAttributeLoad | kDMAttributeWounds);
}
break;
- case k15_PotionTypeWaterFlask:
+ case kDMPotionTypeWaterFlask:
curChampion->_water = MIN(curChampion->_water + 1600, 2048);
break;
default:
break;
}
- ((Potion *)junkData)->setType(k20_PotionTypeEmptyFlask);
+ ((Potion *)junkData)->setType(kDMPotionTypeEmptyFlask);
} else if ((iconIndex >= kDMIconIndiceJunkApple) && (iconIndex < kDMIconIndiceJunkIronKey))
curChampion->_food = MIN(curChampion->_food + foodAmounts[iconIndex - kDMIconIndiceJunkApple], 2048);
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index 8eeca983b0..00094583ad 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -655,7 +655,7 @@ int16 MenuMan::getChampionSpellCastResult(uint16 champIndex) {
break;
Junk *junkData = (Junk *)_vm->_dungeonMan->getThingData(unusedObject);
- junkData->setType(k51_JunkTypeZokathra);
+ junkData->setType(kDMJunkTypeZokathra);
ChampionSlot slotIndex;
if (curChampion->_slots[kDMSlotReadyHand] == Thing::_none)
slotIndex = kDMSlotReadyHand;
@@ -1300,11 +1300,11 @@ bool MenuMan::isActionPerformed(uint16 champIndex, int16 actionIndex) {
break;
case kDMActionFreezeLife: {
int16 freezeTicks;
- if (weaponInHand->getType() == (int)k42_JunkTypeMagicalBoxBlue) {
+ if (weaponInHand->getType() == (int)kDMJunkTypeMagicalBoxBlue) {
freezeTicks = 30;
_vm->_championMan->getObjectRemovedFromSlot(champIndex, kDMSlotActionHand);
weaponInHand->setNextThing(Thing::_none);
- } else if (weaponInHand->getType() == (int)k43_JunkTypeMagicalBoxGreen) {
+ } else if (weaponInHand->getType() == (int)kDMJunkTypeMagicalBoxGreen) {
freezeTicks = 125;
_vm->_championMan->getObjectRemovedFromSlot(champIndex, kDMSlotActionHand);
weaponInHand->setNextThing(Thing::_none);
diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp
index 7f8696f3d1..97463b606e 100644
--- a/engines/dm/projexpl.cpp
+++ b/engines/dm/projexpl.cpp
@@ -84,8 +84,8 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in
if (projectileAssociatedThingType == kDMThingTypePotion) {
Group *projectileAssociatedGroup = (Group *)_vm->_dungeonMan->getThingData(projectileAssociatedThing);
PotionType potionType = ((Potion *)projectileAssociatedGroup)->getType();
- if ((potionType == k3_PotionTypeVen) || (potionType == k19_PotionTypeFulBomb)) {
- explosionThing = (potionType == k3_PotionTypeVen) ? Thing::_explPoisonCloud: Thing::_explFireBall;
+ if ((potionType == kDMPotionTypeVen) || (potionType == kDMPotionTypeFulBomb)) {
+ explosionThing = (potionType == kDMPotionTypeVen) ? Thing::_explPoisonCloud: Thing::_explFireBall;
removePotion = true;
potionPower = ((Potion *)projectileAssociatedGroup)->getPower();
potion = (Potion *)projectileAssociatedGroup;