DM: Rename IconIndice enum

This commit is contained in:
Strangerke 2016-09-09 01:09:25 +02:00
parent 7654c89d4f
commit b365338293
12 changed files with 141 additions and 141 deletions

View file

@ -35,8 +35,8 @@
namespace DM { namespace DM {
#define k0x4000_IgnoreObjectModifiers 0x4000 // @ MASK0x4000_IGNORE_OBJECT_MODIFIERS #define kDMIgnoreObjectModifiers 0x4000 // @ MASK0x4000_IGNORE_OBJECT_MODIFIERS
#define k0x8000_IgnoreTemporaryExperience 0x8000 // @ MASK0x8000_IGNORE_TEMPORARY_EXPERIENCE #define kDMIgnoreTemporaryExperience 0x8000 // @ MASK0x8000_IGNORE_TEMPORARY_EXPERIENCE
class Scent { class Scent {
uint16 _scent; uint16 _scent;
@ -97,79 +97,79 @@ public:
}; // @ PARTY }; // @ PARTY
enum IconIndice { enum IconIndice {
kM1_IconIndiceNone = -1, // @ CM1_ICON_NONE kDMIconIndiceNone = -1, // @ CM1_ICON_NONE
k0_IconIndiceJunkCompassNorth = 0, // @ C000_ICON_JUNK_COMPASS_NORTH kDMIconIndiceJunkCompassNorth = 0, // @ C000_ICON_JUNK_COMPASS_NORTH
k3_IconIndiceJunkCompassWest = 3, // @ C003_ICON_JUNK_COMPASS_WEST kDMIconIndiceJunkCompassWest = 3, // @ C003_ICON_JUNK_COMPASS_WEST
k4_IconIndiceWeaponTorchUnlit = 4, // @ C004_ICON_WEAPON_TORCH_UNLIT kDMIconIndiceWeaponTorchUnlit = 4, // @ C004_ICON_WEAPON_TORCH_UNLIT
k7_IconIndiceWeaponTorchLit = 7, // @ C007_ICON_WEAPON_TORCH_LIT kDMIconIndiceWeaponTorchLit = 7, // @ C007_ICON_WEAPON_TORCH_LIT
k8_IconIndiceJunkWater = 8, // @ C008_ICON_JUNK_WATER kDMIconIndiceJunkWater = 8, // @ C008_ICON_JUNK_WATER
k9_IconIndiceJunkWaterSkin = 9, // @ C009_ICON_JUNK_WATERSKIN kDMIconIndiceJunkWaterSkin = 9, // @ C009_ICON_JUNK_WATERSKIN
k10_IconIndiceJunkJewelSymalUnequipped = 10, // @ C010_ICON_JUNK_JEWEL_SYMAL_UNEQUIPPED kDMIconIndiceJunkJewelSymalUnequipped = 10, // @ C010_ICON_JUNK_JEWEL_SYMAL_UNEQUIPPED
k11_IconIndiceJunkJewelSymalEquipped = 11, // @ C011_ICON_JUNK_JEWEL_SYMAL_EQUIPPED kDMIconIndiceJunkJewelSymalEquipped = 11, // @ C011_ICON_JUNK_JEWEL_SYMAL_EQUIPPED
k12_IconIndiceJunkIllumuletUnequipped = 12, // @ C012_ICON_JUNK_ILLUMULET_UNEQUIPPED kDMIconIndiceJunkIllumuletUnequipped = 12, // @ C012_ICON_JUNK_ILLUMULET_UNEQUIPPED
k13_IconIndiceJunkIllumuletEquipped = 13, // @ C013_ICON_JUNK_ILLUMULET_EQUIPPED kDMIconIndiceJunkIllumuletEquipped = 13, // @ C013_ICON_JUNK_ILLUMULET_EQUIPPED
k14_IconIndiceWeaponFlamittEmpty = 14, // @ C014_ICON_WEAPON_FLAMITT_EMPTY kDMIconIndiceWeaponFlamittEmpty = 14, // @ C014_ICON_WEAPON_FLAMITT_EMPTY
k16_IconIndiceWeaponEyeOfTimeEmpty = 16, // @ C016_ICON_WEAPON_EYE_OF_TIME_EMPTY kDMIconIndiceWeaponEyeOfTimeEmpty = 16, // @ C016_ICON_WEAPON_EYE_OF_TIME_EMPTY
k18_IconIndiceWeaponStormringEmpty = 18, // @ C018_ICON_WEAPON_STORMRING_EMPTY kDMIconIndiceWeaponStormringEmpty = 18, // @ C018_ICON_WEAPON_STORMRING_EMPTY
k20_IconIndiceWeaponStaffOfClawsEmpty = 20, // @ C020_ICON_WEAPON_STAFF_OF_CLAWS_EMPTY kDMIconIndiceWeaponStaffOfClawsEmpty = 20, // @ C020_ICON_WEAPON_STAFF_OF_CLAWS_EMPTY
k22_IconIndiceWeaponStaffOfClawsFull = 22, // @ C022_ICON_WEAPON_STAFF_OF_CLAWS_FULL kDMIconIndiceWeaponStaffOfClawsFull = 22, // @ C022_ICON_WEAPON_STAFF_OF_CLAWS_FULL
k23_IconIndiceWeaponBoltBladeStormEmpty = 23, // @ C023_ICON_WEAPON_BOLT_BLADE_STORM_EMPTY kDMIconIndiceWeaponBoltBladeStormEmpty = 23, // @ C023_ICON_WEAPON_BOLT_BLADE_STORM_EMPTY
k25_IconIndiceWeaponFuryRaBladeEmpty = 25, // @ C025_ICON_WEAPON_FURY_RA_BLADE_EMPTY kDMIconIndiceWeaponFuryRaBladeEmpty = 25, // @ C025_ICON_WEAPON_FURY_RA_BLADE_EMPTY
k27_IconIndiceWeaponTheFirestaff = 27, // @ C027_ICON_WEAPON_THE_FIRESTAFF kDMIconIndiceWeaponTheFirestaff = 27, // @ C027_ICON_WEAPON_THE_FIRESTAFF
k28_IconIndiceWeaponTheFirestaffComplete = 28, // @ C028_ICON_WEAPON_THE_FIRESTAFF_COMPLETE kDMIconIndiceWeaponTheFirestaffComplete = 28, // @ C028_ICON_WEAPON_THE_FIRESTAFF_COMPLETE
k30_IconIndiceScrollOpen = 30, // @ C030_ICON_SCROLL_SCROLL_OPEN kDMIconIndiceScrollOpen = 30, // @ C030_ICON_SCROLL_SCROLL_OPEN
k31_IconIndiceScrollClosed = 31, // @ C031_ICON_SCROLL_SCROLL_CLOSED kDMIconIndiceScrollClosed = 31, // @ C031_ICON_SCROLL_SCROLL_CLOSED
k32_IconIndiceWeaponDagger = 32, // @ C032_ICON_WEAPON_DAGGER kDMIconIndiceWeaponDagger = 32, // @ C032_ICON_WEAPON_DAGGER
k38_IconIndiceWeaponDeltaSideSplitter = 38, // @ C038_ICON_WEAPON_DELTA_SIDE_SPLITTER kDMIconIndiceWeaponDeltaSideSplitter = 38, // @ C038_ICON_WEAPON_DELTA_SIDE_SPLITTER
k39_IconIndiceWeaponDiamondEdge = 39, // @ C039_ICON_WEAPON_DIAMOND_EDGE kDMIconIndiceWeaponDiamondEdge = 39, // @ C039_ICON_WEAPON_DIAMOND_EDGE
k40_IconIndiceWeaponVorpalBlade = 40, // @ C040_ICON_WEAPON_VORPAL_BLADE kDMIconIndiceWeaponVorpalBlade = 40, // @ C040_ICON_WEAPON_VORPAL_BLADE
k41_IconIndiceWeaponTheInquisitorDragonFang = 41, // @ C041_ICON_WEAPON_THE_INQUISITOR_DRAGON_FANG kDMIconIndiceWeaponTheInquisitorDragonFang = 41, // @ C041_ICON_WEAPON_THE_INQUISITOR_DRAGON_FANG
k43_IconIndiceWeaponHardcleaveExecutioner = 43, // @ C043_ICON_WEAPON_HARDCLEAVE_EXECUTIONER kDMIconIndiceWeaponHardcleaveExecutioner = 43, // @ C043_ICON_WEAPON_HARDCLEAVE_EXECUTIONER
k45_IconIndiceWeaponMaceOfOrder = 45, // @ C045_ICON_WEAPON_MACE_OF_ORDER kDMIconIndiceWeaponMaceOfOrder = 45, // @ C045_ICON_WEAPON_MACE_OF_ORDER
k51_IconIndiceWeaponArrow = 51, // @ C051_ICON_WEAPON_ARROW kDMIconIndiceWeaponArrow = 51, // @ C051_ICON_WEAPON_ARROW
k52_IconIndiceWeaponSlayer = 52, // @ C052_ICON_WEAPON_SLAYER kDMIconIndiceWeaponSlayer = 52, // @ C052_ICON_WEAPON_SLAYER
k54_IconIndiceWeaponRock = 54, // @ C054_ICON_WEAPON_ROCK kDMIconIndiceWeaponRock = 54, // @ C054_ICON_WEAPON_ROCK
k55_IconIndiceWeaponPoisonDart = 55, // @ C055_ICON_WEAPON_POISON_DART kDMIconIndiceWeaponPoisonDart = 55, // @ C055_ICON_WEAPON_POISON_DART
k56_IconIndiceWeaponThrowingStar = 56, // @ C056_ICON_WEAPON_THROWING_STAR kDMIconIndiceWeaponThrowingStar = 56, // @ C056_ICON_WEAPON_THROWING_STAR
k58_IconIndiceWeaponStaff = 58, // @ C058_ICON_WEAPON_STAFF kDMIconIndiceWeaponStaff = 58, // @ C058_ICON_WEAPON_STAFF
k59_IconIndiceWeaponWand = 59, // @ C059_ICON_WEAPON_WAND kDMIconIndiceWeaponWand = 59, // @ C059_ICON_WEAPON_WAND
k60_IconIndiceWeaponTeowand = 60, // @ C060_ICON_WEAPON_TEOWAND kDMIconIndiceWeaponTeowand = 60, // @ C060_ICON_WEAPON_TEOWAND
k61_IconIndiceWeaponYewStaff = 61, // @ C061_ICON_WEAPON_YEW_STAFF kDMIconIndiceWeaponYewStaff = 61, // @ C061_ICON_WEAPON_YEW_STAFF
k62_IconIndiceWeaponStaffOfManarStaffOfIrra = 62, // @ C062_ICON_WEAPON_STAFF_OF_MANAR_STAFF_OF_IRRA kDMIconIndiceWeaponStaffOfManarStaffOfIrra = 62, // @ C062_ICON_WEAPON_STAFF_OF_MANAR_STAFF_OF_IRRA
k63_IconIndiceWeaponSnakeStaffCrossOfNeta = 63, // @ C063_ICON_WEAPON_SNAKE_STAFF_CROSS_OF_NETA kDMIconIndiceWeaponSnakeStaffCrossOfNeta = 63, // @ C063_ICON_WEAPON_SNAKE_STAFF_CROSS_OF_NETA
k64_IconIndiceWeaponTheConduitSerpentStaff = 64, // @ C064_ICON_WEAPON_THE_CONDUIT_SERPENT_STAFF kDMIconIndiceWeaponTheConduitSerpentStaff = 64, // @ C064_ICON_WEAPON_THE_CONDUIT_SERPENT_STAFF
k65_IconIndiceWeaponDragonSpit = 65, // @ C065_ICON_WEAPON_DRAGON_SPIT kDMIconIndiceWeaponDragonSpit = 65, // @ C065_ICON_WEAPON_DRAGON_SPIT
k66_IconIndiceWeaponSceptreOfLyf = 66, // @ C066_ICON_WEAPON_SCEPTRE_OF_LYF kDMIconIndiceWeaponSceptreOfLyf = 66, // @ C066_ICON_WEAPON_SCEPTRE_OF_LYF
k81_IconIndiceArmourCloakOfNight = 81, // @ C081_ICON_ARMOUR_CLOAK_OF_NIGHT kDMIconIndiceArmourCloakOfNight = 81, // @ C081_ICON_ARMOUR_CLOAK_OF_NIGHT
k104_IconIndiceArmourCrownOfNerra = 104, // @ C104_ICON_ARMOUR_CROWN_OF_NERRA kDMIconIndiceArmourCrownOfNerra = 104, // @ C104_ICON_ARMOUR_CROWN_OF_NERRA
k119_IconIndiceArmourElvenBoots = 119, // @ C119_ICON_ARMOUR_ELVEN_BOOTS kDMIconIndiceArmourElvenBoots = 119, // @ C119_ICON_ARMOUR_ELVEN_BOOTS
k120_IconIndiceJunkGemOfAges = 120, // @ C120_ICON_JUNK_GEM_OF_AGES kDMIconIndiceJunkGemOfAges = 120, // @ C120_ICON_JUNK_GEM_OF_AGES
k121_IconIndiceJunkEkkhardCross = 121, // @ C121_ICON_JUNK_EKKHARD_CROSS kDMIconIndiceJunkEkkhardCross = 121, // @ C121_ICON_JUNK_EKKHARD_CROSS
k122_IconIndiceJunkMoonstone = 122, // @ C122_ICON_JUNK_MOONSTONE kDMIconIndiceJunkMoonstone = 122, // @ C122_ICON_JUNK_MOONSTONE
k124_IconIndiceJunkPendantFeral = 124, // @ C124_ICON_JUNK_PENDANT_FERAL kDMIconIndiceJunkPendantFeral = 124, // @ C124_ICON_JUNK_PENDANT_FERAL
k128_IconIndiceJunkBoulder = 128, // @ C128_ICON_JUNK_BOULDER kDMIconIndiceJunkBoulder = 128, // @ C128_ICON_JUNK_BOULDER
k137_IconIndiceJunkRabbitsFoot = 137, // @ C137_ICON_JUNK_RABBITS_FOOT kDMIconIndiceJunkRabbitsFoot = 137, // @ C137_ICON_JUNK_RABBITS_FOOT
k140_IconIndiceArmourDexhelm = 140, // @ C140_ICON_ARMOUR_DEXHELM kDMIconIndiceArmourDexhelm = 140, // @ C140_ICON_ARMOUR_DEXHELM
k141_IconIndiceArmourFlamebain = 141, // @ C141_ICON_ARMOUR_FLAMEBAIN kDMIconIndiceArmourFlamebain = 141, // @ C141_ICON_ARMOUR_FLAMEBAIN
k142_IconIndiceArmourPowertowers = 142, // @ C142_ICON_ARMOUR_POWERTOWERS kDMIconIndiceArmourPowertowers = 142, // @ C142_ICON_ARMOUR_POWERTOWERS
k144_IconIndiceContainerChestClosed = 144, // @ C144_ICON_CONTAINER_CHEST_CLOSED kDMIconIndiceContainerChestClosed = 144, // @ C144_ICON_CONTAINER_CHEST_CLOSED
k145_IconIndiceContainerChestOpen = 145, // @ C145_ICON_CONTAINER_CHEST_OPEN kDMIconIndiceContainerChestOpen = 145, // @ C145_ICON_CONTAINER_CHEST_OPEN
k147_IconIndiceJunkChampionBones = 147, // @ C147_ICON_JUNK_CHAMPION_BONES kDMIconIndiceJunkChampionBones = 147, // @ C147_ICON_JUNK_CHAMPION_BONES
k148_IconIndicePotionMaPotionMonPotion = 148, // @ C148_ICON_POTION_MA_POTION_MON_POTION kDMIconIndicePotionMaPotionMonPotion = 148, // @ C148_ICON_POTION_MA_POTION_MON_POTION
k163_IconIndicePotionWaterFlask = 163, // @ C163_ICON_POTION_WATER_FLASK kDMIconIndicePotionWaterFlask = 163, // @ C163_ICON_POTION_WATER_FLASK
k168_IconIndiceJunkApple = 168, // @ C168_ICON_JUNK_APPLE kDMIconIndiceJunkApple = 168, // @ C168_ICON_JUNK_APPLE
k176_IconIndiceJunkIronKey = 176, // @ C176_ICON_JUNK_IRON_KEY kDMIconIndiceJunkIronKey = 176, // @ C176_ICON_JUNK_IRON_KEY
k191_IconIndiceJunkMasterKey = 191, // @ C191_ICON_JUNK_MASTER_KEY kDMIconIndiceJunkMasterKey = 191, // @ C191_ICON_JUNK_MASTER_KEY
k194_IconIndiceArmourBootOfSpeed = 194, // @ C194_ICON_ARMOUR_BOOT_OF_SPEED kDMIconIndiceArmourBootOfSpeed = 194, // @ C194_ICON_ARMOUR_BOOT_OF_SPEED
k195_IconIndicePotionEmptyFlask = 195, // @ C195_ICON_POTION_EMPTY_FLASK kDMIconIndicePotionEmptyFlask = 195, // @ C195_ICON_POTION_EMPTY_FLASK
k197_IconIndiceJunkZokathra = 197, // @ C197_ICON_JUNK_ZOKATHRA kDMIconIndiceJunkZokathra = 197, // @ C197_ICON_JUNK_ZOKATHRA
k201_IconIndiceActionEmptyHand = 201, // @ C201_ICON_ACTION_ICON_EMPTY_HAND kDMIconIndiceActionEmptyHand = 201, // @ C201_ICON_ACTION_ICON_EMPTY_HAND
k202_IconIndiceEyeNotLooking = 202, // @ C202_ICON_EYE_NOT_LOOKING /* One pixel is different in this bitmap from the eye in C017_GRAPHIC_INVENTORY. This is visible by selecting another champion after clicking the eye */ kDMIconIndiceEyeNotLooking = 202, // @ C202_ICON_EYE_NOT_LOOKING /* One pixel is different in this bitmap from the eye in C017_GRAPHIC_INVENTORY. This is visible by selecting another champion after clicking the eye */
k203_IconIndiceEyeLooking = 203, // @ C203_ICON_EYE_LOOKING kDMIconIndiceEyeLooking = 203, // @ C203_ICON_EYE_LOOKING
k204_IconIndiceEmptyBox = 204, // @ C204_ICON_EMPTY_BOX kDMIconIndiceEmptyBox = 204, // @ C204_ICON_EMPTY_BOX
k205_IconIndiceMouthOpen = 205, // @ C205_ICON_MOUTH_OPEN kDMIconIndiceMouthOpen = 205, // @ C205_ICON_MOUTH_OPEN
k208_IconIndiceNeck = 208, // @ C208_ICON_NECK kDMIconIndiceNeck = 208, // @ C208_ICON_NECK
k212_IconIndiceReadyHand = 212 // @ C212_ICON_READY_HAND kDMIconIndiceReadyHand = 212 // @ C212_ICON_READY_HAND
}; };
enum ChampionIndex { enum ChampionIndex {

View file

@ -656,7 +656,7 @@ void DMEngine::endGame(bool doNotDrawCreditsOnly) {
_textMan->printEndGameString(textPosX, textPosY++, k9_ColorGold, curChampion->_title); _textMan->printEndGameString(textPosX, textPosY++, k9_ColorGold, curChampion->_title);
for (int16 idx = k0_ChampionSkillFighter; idx <= k3_ChampionSkillWizard; idx++) { for (int16 idx = k0_ChampionSkillFighter; idx <= k3_ChampionSkillWizard; idx++) {
uint16 skillLevel = MIN<uint16>(16, _championMan->getSkillLevel(championIndex, idx | (k0x4000_IgnoreObjectModifiers | k0x8000_IgnoreTemporaryExperience))); uint16 skillLevel = MIN<uint16>(16, _championMan->getSkillLevel(championIndex, idx | (kDMIgnoreObjectModifiers | kDMIgnoreTemporaryExperience)));
if (skillLevel == 1) if (skillLevel == 1)
continue; continue;

View file

@ -1616,35 +1616,35 @@ int16 DungeonMan::getStairsExitDirection(int16 mapX, int16 mapY) {
Thing DungeonMan::getObjForProjectileLaucherOrObjGen(uint16 iconIndex) { Thing DungeonMan::getObjForProjectileLaucherOrObjGen(uint16 iconIndex) {
int16 thingType = k5_WeaponThingType; int16 thingType = k5_WeaponThingType;
if ((iconIndex >= k4_IconIndiceWeaponTorchUnlit) && (iconIndex <= k7_IconIndiceWeaponTorchLit)) if ((iconIndex >= kDMIconIndiceWeaponTorchUnlit) && (iconIndex <= kDMIconIndiceWeaponTorchLit))
iconIndex = k4_IconIndiceWeaponTorchUnlit; iconIndex = kDMIconIndiceWeaponTorchUnlit;
int16 junkType; int16 junkType;
switch (iconIndex) { switch (iconIndex) {
case k54_IconIndiceWeaponRock: case kDMIconIndiceWeaponRock:
junkType = k30_WeaponTypeRock; junkType = k30_WeaponTypeRock;
break; break;
case k128_IconIndiceJunkBoulder: case kDMIconIndiceJunkBoulder:
junkType = k25_JunkTypeBoulder; junkType = k25_JunkTypeBoulder;
thingType = k10_JunkThingType; thingType = k10_JunkThingType;
break; break;
case k51_IconIndiceWeaponArrow: case kDMIconIndiceWeaponArrow:
junkType = k27_WeaponTypeArrow; junkType = k27_WeaponTypeArrow;
break; break;
case k52_IconIndiceWeaponSlayer: case kDMIconIndiceWeaponSlayer:
junkType = k28_WeaponTypeSlayer; junkType = k28_WeaponTypeSlayer;
break; break;
case k55_IconIndiceWeaponPoisonDart: case kDMIconIndiceWeaponPoisonDart:
junkType = k31_WeaponTypePoisonDart; junkType = k31_WeaponTypePoisonDart;
break; break;
case k56_IconIndiceWeaponThrowingStar: case kDMIconIndiceWeaponThrowingStar:
junkType = k32_WeaponTypeThrowingStar; junkType = k32_WeaponTypeThrowingStar;
break; break;
case k32_IconIndiceWeaponDagger: case kDMIconIndiceWeaponDagger:
junkType = k8_WeaponTypeDagger; junkType = k8_WeaponTypeDagger;
break; break;
case k4_IconIndiceWeaponTorchUnlit: case kDMIconIndiceWeaponTorchUnlit:
junkType = k2_WeaponTypeTorch; junkType = k2_WeaponTypeTorch;
break; break;
default: default:
@ -1657,7 +1657,7 @@ Thing DungeonMan::getObjForProjectileLaucherOrObjGen(uint16 iconIndex) {
Junk *junkPtr = (Junk *)getThingData(unusedThing); Junk *junkPtr = (Junk *)getThingData(unusedThing);
junkPtr->setType(junkType); /* Also works for WEAPON in cases other than Boulder */ junkPtr->setType(junkType); /* Also works for WEAPON in cases other than Boulder */
if ((iconIndex == k4_IconIndiceWeaponTorchUnlit) && ((Weapon *)junkPtr)->isLit()) /* BUG0_65 Torches created by object generator or projectile launcher sensors have no charges. Charges are only defined if the Torch is lit which is not possible at the time it is created */ if ((iconIndex == kDMIconIndiceWeaponTorchUnlit) && ((Weapon *)junkPtr)->isLit()) /* BUG0_65 Torches created by object generator or projectile launcher sensors have no charges. Charges are only defined if the Torch is lit which is not possible at the time it is created */
((Weapon *)junkPtr)->setChargeCount(15); ((Weapon *)junkPtr)->setChargeCount(15);
return unusedThing; return unusedThing;

View file

@ -1197,9 +1197,9 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
if (_vm->_dungeonMan->_isFacingFountain) { if (_vm->_dungeonMan->_isFacingFountain) {
uint16 iconIdx = _vm->_objectMan->getIconIndex(thingHandObject); uint16 iconIdx = _vm->_objectMan->getIconIndex(thingHandObject);
uint16 weight = _vm->_dungeonMan->getObjectWeight(thingHandObject); uint16 weight = _vm->_dungeonMan->getObjectWeight(thingHandObject);
if ((iconIdx >= k8_IconIndiceJunkWater) && (iconIdx <= k9_IconIndiceJunkWaterSkin)) if ((iconIdx >= kDMIconIndiceJunkWater) && (iconIdx <= kDMIconIndiceJunkWaterSkin))
junkPtr->setChargeCount(3); /* Full */ junkPtr->setChargeCount(3); /* Full */
else if (iconIdx == k195_IconIndicePotionEmptyFlask) else if (iconIdx == kDMIconIndicePotionEmptyFlask)
((Potion*)junkPtr)->setType(k15_PotionTypeWaterFlask); ((Potion*)junkPtr)->setType(k15_PotionTypeWaterFlask);
else { else {
commandProcessType80ClickInDungeonViewTouchFrontWall(); commandProcessType80ClickInDungeonViewTouchFrontWall();
@ -1356,7 +1356,7 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
} }
Thing topPileThing = _vm->_dungeonMan->_pileTopObject[viewCell]; Thing topPileThing = _vm->_dungeonMan->_pileTopObject[viewCell];
if (_vm->_objectMan->getIconIndex(topPileThing) != kM1_IconIndiceNone) { if (_vm->_objectMan->getIconIndex(topPileThing) != kDMIconIndiceNone) {
_vm->_moveSens->getMoveResult(topPileThing, mapX, mapY, kM1_MapXNotOnASquare, 0); _vm->_moveSens->getMoveResult(topPileThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
_vm->_championMan->putObjectInLeaderHand(topPileThing, true); _vm->_championMan->putObjectInLeaderHand(topPileThing, true);
} }
@ -1380,7 +1380,7 @@ void EventManager::processType80_clickInDungeonViewDropLeaderHandObject(uint16 v
uint16 currCell = normalizeModulo4(_vm->_dungeonMan->_partyDir + viewCell); uint16 currCell = normalizeModulo4(_vm->_dungeonMan->_partyDir + viewCell);
Thing removedThing = _vm->_championMan->getObjectRemovedFromLeaderHand(); Thing removedThing = _vm->_championMan->getObjectRemovedFromLeaderHand();
_vm->_moveSens->getMoveResult(thingWithNewCell(removedThing, currCell), kM1_MapXNotOnASquare, 0, mapX, mapY); _vm->_moveSens->getMoveResult(thingWithNewCell(removedThing, currCell), kM1_MapXNotOnASquare, 0, mapX, mapY);
if (droppingIntoAnAlcove && _vm->_dungeonMan->_isFacingViAltar && (_vm->_objectMan->getIconIndex(removedThing) == k147_IconIndiceJunkChampionBones)) { if (droppingIntoAnAlcove && _vm->_dungeonMan->_isFacingViAltar && (_vm->_objectMan->getIconIndex(removedThing) == kDMIconIndiceJunkChampionBones)) {
Junk *removedJunk = (Junk*)_vm->_dungeonMan->getThingData(removedThing); Junk *removedJunk = (Junk*)_vm->_dungeonMan->getThingData(removedThing);
TimelineEvent newEvent; TimelineEvent newEvent;
setMapAndTime(newEvent._mapTime, _vm->_dungeonMan->_partyMapIndex, _vm->_gameTime + 1); setMapAndTime(newEvent._mapTime, _vm->_dungeonMan->_partyMapIndex, _vm->_gameTime + 1);

View file

@ -3309,8 +3309,8 @@ T0115077_DrawSecondHalfSquareCreature:
sourceHeight = heightRedEagle = ((CreatureAspect *)objectAspect)->_heightSide; sourceHeight = heightRedEagle = ((CreatureAspect *)objectAspect)->_heightSide;
} else { } else {
useCreatureBackBitmap = getFlag(AL_0_creatureGraphicInfoRed, k0x0010_CreatureInfoGraphicMaskBack) && (creatureDirectionDelta == 0); useCreatureBackBitmap = getFlag(AL_0_creatureGraphicInfoRed, k0x0010_CreatureInfoGraphicMaskBack) && (creatureDirectionDelta == 0);
useCreatureAttackBitmap = !useCreatureBackBitmap && getFlag(creatureAspectInt, k0x0080_MaskActiveGroupIsAttacking) && getFlag(AL_0_creatureGraphicInfoRed, k0x0020_CreatureInfoGraphicMaskAttack); useCreatureAttackBitmap = !useCreatureBackBitmap;
if (useCreatureAttackBitmap) { if (useCreatureAttackBitmap && getFlag(creatureAspectInt, k0x0080_MaskActiveGroupIsAttacking) && getFlag(AL_0_creatureGraphicInfoRed, k0x0020_CreatureInfoGraphicMaskAttack)) {
useFlippedHorizontallyCreatureFrontImage = false; useFlippedHorizontallyCreatureFrontImage = false;
sourceByteWidth = byteWidth = ((CreatureAspect *)objectAspect)->_byteWidthAttack; sourceByteWidth = byteWidth = ((CreatureAspect *)objectAspect)->_byteWidthAttack;
sourceHeight = heightRedEagle = ((CreatureAspect *)objectAspect)->_heightAttack; sourceHeight = heightRedEagle = ((CreatureAspect *)objectAspect)->_heightAttack;

View file

@ -1820,9 +1820,9 @@ int16 GroupMan::getMeleeActionDamage(Champion *champ, int16 champIndex, Group *g
L0565_i_Damage += _vm->getRandomNumber((L0565_i_Damage >> 1) + 1); L0565_i_Damage += _vm->getRandomNumber((L0565_i_Damage >> 1) + 1);
L0565_i_Damage = ((long)L0565_i_Damage * (long)actionDamageFactor) >> 5; L0565_i_Damage = ((long)L0565_i_Damage * (long)actionDamageFactor) >> 5;
L0568_i_Defense = _vm->getRandomNumber(32) + creatureInfo->_defense + doubledMapDifficulty; L0568_i_Defense = _vm->getRandomNumber(32) + creatureInfo->_defense + doubledMapDifficulty;
if (actionHandObjectIconIndex == k39_IconIndiceWeaponDiamondEdge) if (actionHandObjectIconIndex == kDMIconIndiceWeaponDiamondEdge)
L0568_i_Defense -= L0568_i_Defense >> 2; L0568_i_Defense -= L0568_i_Defense >> 2;
else if (actionHandObjectIconIndex == k43_IconIndiceWeaponHardcleaveExecutioner) else if (actionHandObjectIconIndex == kDMIconIndiceWeaponHardcleaveExecutioner)
L0568_i_Defense -= L0568_i_Defense >> 3; L0568_i_Defense -= L0568_i_Defense >> 3;
L0565_i_Damage += _vm->getRandomNumber(32) - L0568_i_Defense; L0565_i_Damage += _vm->getRandomNumber(32) - L0568_i_Defense;
@ -1847,7 +1847,7 @@ T0231009:
L0565_i_Damage += _vm->getRandomNumber(L0565_i_Damage); L0565_i_Damage += _vm->getRandomNumber(L0565_i_Damage);
L0565_i_Damage >>= 2; L0565_i_Damage >>= 2;
L0565_i_Damage += _vm->getRandomNumber(4) + 1; L0565_i_Damage += _vm->getRandomNumber(4) + 1;
if ((actionHandObjectIconIndex == k40_IconIndiceWeaponVorpalBlade) if ((actionHandObjectIconIndex == kDMIconIndiceWeaponVorpalBlade)
&& !getFlag(creatureInfo->_attributes, k0x0040_MaskCreatureInfo_nonMaterial) && !getFlag(creatureInfo->_attributes, k0x0040_MaskCreatureInfo_nonMaterial)
&& !(L0565_i_Damage >>= 1)) && !(L0565_i_Damage >>= 1))
goto T0231015; goto T0231015;

View file

@ -364,7 +364,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container *chest, bool is
_openChest = thingToOpen; _openChest = thingToOpen;
if (!isPressingEye) { if (!isPressingEye) {
objMan.drawIconInSlotBox(k9_SlotBoxInventoryActionHand, k145_IconIndiceContainerChestOpen); objMan.drawIconInSlotBox(k9_SlotBoxInventoryActionHand, kDMIconIndiceContainerChestOpen);
} }
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k25_PanelOpenChestIndice), dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k25_PanelOpenChestIndice),
_boxPanel, k72_byteWidth, k8_ColorRed, 73); _boxPanel, k72_byteWidth, k8_ColorRed, 73);
@ -380,7 +380,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container *chest, bool is
thing = _vm->_dungeonMan->getNextThing(thing); thing = _vm->_dungeonMan->getNextThing(thing);
} }
while (chestSlotIndex < 8) { while (chestSlotIndex < 8) {
objMan.drawIconInSlotBox(chestSlotIndex + k38_SlotBoxChestFirstSlot, kM1_IconIndiceNone); objMan.drawIconInSlotBox(chestSlotIndex + k38_SlotBoxChestFirstSlot, kDMIconIndiceNone);
_chestSlots[chestSlotIndex++] = Thing::_none; _chestSlots[chestSlotIndex++] = Thing::_none;
} }
} }
@ -501,7 +501,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
Common::String descString; Common::String descString;
Common::String str; Common::String str;
if (iconIndex == k147_IconIndiceJunkChampionBones) { if (iconIndex == kDMIconIndiceJunkChampionBones) {
switch (_vm->getGameLanguage()) { // localized switch (_vm->getGameLanguage()) { // localized
case Common::FR_FRA: case Common::FR_FRA:
// Fix original bug dur to a cut&paste error: string was concatenated then overwritten by the name // Fix original bug dur to a cut&paste error: string was concatenated then overwritten by the name
@ -514,7 +514,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
descString = str; descString = str;
} else if ((thingType == k8_PotionThingType) } else if ((thingType == k8_PotionThingType)
&& (iconIndex != k163_IconIndicePotionWaterFlask) && (iconIndex != kDMIconIndicePotionWaterFlask)
&& (champMan.getSkillLevel((ChampionIndex)_vm->ordinalToIndex(_inventoryChampionOrdinal), k2_ChampionSkillPriest) > 1)) { && (champMan.getSkillLevel((ChampionIndex)_vm->ordinalToIndex(_inventoryChampionOrdinal), k2_ChampionSkillPriest) > 1)) {
str = ('_' + ((Potion *)rawThingPtr)->getPower() / 40); str = ('_' + ((Potion *)rawThingPtr)->getPower() / 40);
str += " "; str += " ";
@ -537,8 +537,8 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
potentialAttribMask = k0x0008_DescriptionMaskCursed | k0x0002_DescriptionMaskPoisoned | k0x0004_DescriptionMaskBroken; potentialAttribMask = k0x0008_DescriptionMaskCursed | k0x0002_DescriptionMaskPoisoned | k0x0004_DescriptionMaskBroken;
Weapon *weapon = (Weapon *)rawThingPtr; Weapon *weapon = (Weapon *)rawThingPtr;
actualAttribMask = (weapon->getCursed() << 3) | (weapon->getPoisoned() << 1) | (weapon->getBroken() << 2); actualAttribMask = (weapon->getCursed() << 3) | (weapon->getPoisoned() << 1) | (weapon->getBroken() << 2);
if ((iconIndex >= k4_IconIndiceWeaponTorchUnlit) if ((iconIndex >= kDMIconIndiceWeaponTorchUnlit)
&& (iconIndex <= k7_IconIndiceWeaponTorchLit) && (iconIndex <= kDMIconIndiceWeaponTorchLit)
&& (weapon->getChargeCount() == 0)) { && (weapon->getChargeCount() == 0)) {
switch (_vm->getGameLanguage()) { // localized switch (_vm->getGameLanguage()) { // localized
@ -569,7 +569,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
break; break;
} }
case k10_JunkThingType: { case k10_JunkThingType: {
if ((iconIndex >= k8_IconIndiceJunkWater) && (iconIndex <= k9_IconIndiceJunkWaterSkin)) { if ((iconIndex >= kDMIconIndiceJunkWater) && (iconIndex <= kDMIconIndiceJunkWaterSkin)) {
potentialAttribMask = 0; potentialAttribMask = 0;
const char *descStringEN[4] = {"(EMPTY)", "(ALMOST EMPTY)", "(ALMOST FULL)", "(FULL)"}; const char *descStringEN[4] = {"(EMPTY)", "(ALMOST EMPTY)", "(ALMOST FULL)", "(FULL)"};
const char *descStringDE[4] = {"(LEER)", "(FAST LEER)", "(FAST VOLL)", "(VOLL)"}; const char *descStringDE[4] = {"(LEER)", "(FAST LEER)", "(FAST VOLL)", "(VOLL)"};
@ -589,7 +589,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
} }
drawPanelObjectDescriptionString(descString.c_str()); drawPanelObjectDescriptionString(descString.c_str());
} else if ((iconIndex >= k0_IconIndiceJunkCompassNorth) && (iconIndex <= k3_IconIndiceJunkCompassWest)) { } else if ((iconIndex >= kDMIconIndiceJunkCompassNorth) && (iconIndex <= kDMIconIndiceJunkCompassWest)) {
const static char *directionNameEN[4] = {"NORTH", "EAST", "SOUTH", "WEST"}; const static char *directionNameEN[4] = {"NORTH", "EAST", "SOUTH", "WEST"};
const static char *directionNameDE[4] = {"NORDEN", "OSTEN", "SUEDEN", "WESTEN"}; const static char *directionNameDE[4] = {"NORDEN", "OSTEN", "SUEDEN", "WESTEN"};
const static char *directionNameFR[4] = {"AU NORD", "A L'EST", "AU SUD", "A L'OUEST"}; const static char *directionNameFR[4] = {"AU NORD", "A L'EST", "AU SUD", "A L'OUEST"};
@ -691,8 +691,8 @@ void InventoryMan::setDungeonViewPalette() {
uint16 slotIndex = k1_ChampionSlotActionHand + 1; uint16 slotIndex = k1_ChampionSlotActionHand + 1;
while (slotIndex--) { while (slotIndex--) {
Thing slotThing = curChampion->_slots[slotIndex]; Thing slotThing = curChampion->_slots[slotIndex];
if ((_vm->_objectMan->getObjectType(slotThing) >= k4_IconIndiceWeaponTorchUnlit) && if ((_vm->_objectMan->getObjectType(slotThing) >= kDMIconIndiceWeaponTorchUnlit) &&
(_vm->_objectMan->getObjectType(slotThing) <= k7_IconIndiceWeaponTorchLit)) { (_vm->_objectMan->getObjectType(slotThing) <= kDMIconIndiceWeaponTorchLit)) {
Weapon *curWeapon = (Weapon *)_vm->_dungeonMan->getThingData(slotThing); Weapon *curWeapon = (Weapon *)_vm->_dungeonMan->getThingData(slotThing);
*curTorchLightPower = curWeapon->getChargeCount(); *curTorchLightPower = curWeapon->getChargeCount();
} else { } else {
@ -759,7 +759,7 @@ void InventoryMan::decreaseTorchesLightPower() {
int16 slotIndex = k1_ChampionSlotActionHand + 1; int16 slotIndex = k1_ChampionSlotActionHand + 1;
while (slotIndex--) { while (slotIndex--) {
int16 iconIndex = _vm->_objectMan->getIconIndex(curChampion->_slots[slotIndex]); int16 iconIndex = _vm->_objectMan->getIconIndex(curChampion->_slots[slotIndex]);
if ((iconIndex >= k4_IconIndiceWeaponTorchUnlit) && (iconIndex <= k7_IconIndiceWeaponTorchLit)) { if ((iconIndex >= kDMIconIndiceWeaponTorchUnlit) && (iconIndex <= kDMIconIndiceWeaponTorchLit)) {
Weapon *curWeapon = (Weapon *)_vm->_dungeonMan->getThingData(curChampion->_slots[slotIndex]); Weapon *curWeapon = (Weapon *)_vm->_dungeonMan->getThingData(curChampion->_slots[slotIndex]);
if (curWeapon->getChargeCount()) { if (curWeapon->getChargeCount()) {
if (curWeapon->setChargeCount(curWeapon->getChargeCount() - 1) == 0) { if (curWeapon->setChargeCount(curWeapon->getChargeCount() - 1) == 0) {
@ -803,7 +803,7 @@ void InventoryMan::drawChampionSkillsAndStatistics() {
_vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice), _boxPanel, k72_byteWidth, k8_ColorRed, 73); _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice), _boxPanel, k72_byteWidth, k8_ColorRed, 73);
int16 textPosY = 58; int16 textPosY = 58;
for (uint16 idx = k0_ChampionSkillFighter; idx <= k3_ChampionSkillWizard; idx++) { for (uint16 idx = k0_ChampionSkillFighter; idx <= k3_ChampionSkillWizard; idx++) {
int16 skillLevel = MIN((uint16)16, _vm->_championMan->getSkillLevel(championIndex, idx | k0x8000_IgnoreTemporaryExperience)); int16 skillLevel = MIN((uint16)16, _vm->_championMan->getSkillLevel(championIndex, idx | kDMIgnoreTemporaryExperience));
if (skillLevel == 1) if (skillLevel == 1)
continue; continue;
@ -851,7 +851,7 @@ void InventoryMan::drawStopPressingMouth() {
} }
void InventoryMan::drawStopPressingEye() { void InventoryMan::drawStopPressingEye() {
drawIconToViewport(k202_IconIndiceEyeNotLooking, 12, 13); drawIconToViewport(kDMIconIndiceEyeNotLooking, 12, 13);
drawPanel(); drawPanel();
_vm->_displayMan->drawViewport(k0_viewportNotDungeonView); _vm->_displayMan->drawViewport(k0_viewportNotDungeonView);
Thing leaderHandObject = _vm->_championMan->_leaderHandObject; Thing leaderHandObject = _vm->_championMan->_leaderHandObject;
@ -908,7 +908,7 @@ void InventoryMan::clickOnMouth() {
Champion *curChampion = &_vm->_championMan->_champions[championIndex]; Champion *curChampion = &_vm->_championMan->_champions[championIndex];
Junk *junkData = (Junk *)_vm->_dungeonMan->getThingData(handThing); Junk *junkData = (Junk *)_vm->_dungeonMan->getThingData(handThing);
bool removeObjectFromLeaderHand; bool removeObjectFromLeaderHand;
if ((iconIndex >= k8_IconIndiceJunkWater) && (iconIndex <= k9_IconIndiceJunkWaterSkin)) { if ((iconIndex >= kDMIconIndiceJunkWater) && (iconIndex <= kDMIconIndiceJunkWaterSkin)) {
if (!(junkData->getChargeCount())) if (!(junkData->getChargeCount()))
return; return;
@ -995,8 +995,8 @@ void InventoryMan::clickOnMouth() {
break; break;
} }
((Potion *)junkData)->setType(k20_PotionTypeEmptyFlask); ((Potion *)junkData)->setType(k20_PotionTypeEmptyFlask);
} else if ((iconIndex >= k168_IconIndiceJunkApple) && (iconIndex < k176_IconIndiceJunkIronKey)) } else if ((iconIndex >= kDMIconIndiceJunkApple) && (iconIndex < kDMIconIndiceJunkIronKey))
curChampion->_food = MIN(curChampion->_food + foodAmounts[iconIndex - k168_IconIndiceJunkApple], 2048); curChampion->_food = MIN(curChampion->_food + foodAmounts[iconIndex - kDMIconIndiceJunkApple], 2048);
if (curChampion->_currStamina > curChampion->_maxStamina) if (curChampion->_currStamina > curChampion->_maxStamina)
curChampion->_currStamina = curChampion->_maxStamina; curChampion->_currStamina = curChampion->_maxStamina;
@ -1006,7 +1006,7 @@ void InventoryMan::clickOnMouth() {
if (removeObjectFromLeaderHand) { if (removeObjectFromLeaderHand) {
for (uint16 i = 5; --i; _vm->delay(8)) { /* Animate mouth icon */ for (uint16 i = 5; --i; _vm->delay(8)) { /* Animate mouth icon */
_vm->_objectMan->drawIconToScreen(k205_IconIndiceMouthOpen + !(i & 0x0001), 56, 46); _vm->_objectMan->drawIconToScreen(kDMIconIndiceMouthOpen + !(i & 0x0001), 56, 46);
_vm->_eventMan->discardAllInput(); _vm->_eventMan->discardAllInput();
if (_vm->_engineShouldQuit) if (_vm->_engineShouldQuit)
return; return;
@ -1059,7 +1059,7 @@ void InventoryMan::clickOnEye() {
_vm->_eventMan->hideMouse(); _vm->_eventMan->hideMouse();
_vm->_eventMan->hideMouse(); _vm->_eventMan->hideMouse();
_vm->delay(8); _vm->delay(8);
drawIconToViewport(k203_IconIndiceEyeLooking, 12, 13); drawIconToViewport(kDMIconIndiceEyeLooking, 12, 13);
if (_vm->_championMan->_leaderEmptyHanded) if (_vm->_championMan->_leaderEmptyHanded)
drawChampionSkillsAndStatistics(); drawChampionSkillsAndStatistics();
else { else {

View file

@ -204,7 +204,7 @@ void MenuMan::drawActionIcon(ChampionIndex championIndex) {
Thing thing = champion.getSlot(k1_ChampionSlotActionHand); Thing thing = champion.getSlot(k1_ChampionSlotActionHand);
IconIndice iconIndex; IconIndice iconIndex;
if (thing == Thing::_none) { if (thing == Thing::_none) {
iconIndex = k201_IconIndiceActionEmptyHand; iconIndex = kDMIconIndiceActionEmptyHand;
} else if (_vm->_dungeonMan->_objectInfos[_vm->_dungeonMan->getObjectInfoIndex(thing)]._actionSetIndex) { } else if (_vm->_dungeonMan->_objectInfos[_vm->_dungeonMan->getObjectInfoIndex(thing)]._actionSetIndex) {
iconIndex = _vm->_objectMan->getIconIndex(thing); iconIndex = _vm->_objectMan->getIconIndex(thing);
} else { } else {
@ -787,7 +787,7 @@ void MenuMan::menusPrintSpellFailureMessage(Champion *champ, uint16 failureType,
Potion *MenuMan::getEmptyFlaskInHand(Champion *champ, Thing *potionThing) { Potion *MenuMan::getEmptyFlaskInHand(Champion *champ, Thing *potionThing) {
for (int16 slotIndex = k2_ChampionSlotHead; --slotIndex >= k0_ChampionSlotReadyHand; ) { for (int16 slotIndex = k2_ChampionSlotHead; --slotIndex >= k0_ChampionSlotReadyHand; ) {
Thing curThing = champ->_slots[slotIndex]; Thing curThing = champ->_slots[slotIndex];
if ((curThing != Thing::_none) && (_vm->_objectMan->getIconIndex(curThing) == k195_IconIndicePotionEmptyFlask)) { if ((curThing != Thing::_none) && (_vm->_objectMan->getIconIndex(curThing) == kDMIconIndicePotionEmptyFlask)) {
*potionThing = curThing; *potionThing = curThing;
return (Potion *)_vm->_dungeonMan->getThingData(curThing); return (Potion *)_vm->_dungeonMan->getThingData(curThing);
} }
@ -1488,7 +1488,7 @@ bool MenuMan::isMeleeActionPerformed(int16 champIndex, Champion *champ, int16 ac
uint16 actionHitProbability = actionHitProbabilityArray[actionIndex]; uint16 actionHitProbability = actionHitProbabilityArray[actionIndex];
uint16 actionDamageFactor = actionDamageFactorArray[actionIndex]; uint16 actionDamageFactor = actionDamageFactorArray[actionIndex];
if ((_vm->_objectMan->getIconIndex(champ->_slots[k1_ChampionSlotActionHand]) == k40_IconIndiceWeaponVorpalBlade) || (actionIndex == k24_ChampionActionDisrupt)) { if ((_vm->_objectMan->getIconIndex(champ->_slots[k1_ChampionSlotActionHand]) == kDMIconIndiceWeaponVorpalBlade) || (actionIndex == k24_ChampionActionDisrupt)) {
setFlag(actionHitProbability, k0x8000_hitNonMaterialCreatures); setFlag(actionHitProbability, k0x8000_hitNonMaterialCreatures);
} }
_actionDamage = _vm->_groupMan->getMeleeActionDamage(champ, champIndex, (Group *)_vm->_dungeonMan->getThingData(_actionTargetGroupThing), _vm->ordinalToIndex(targetCreatureOrdinal), targetMapX, targetMapY, actionHitProbability, actionDamageFactor, skillIndex); _actionDamage = _vm->_groupMan->getMeleeActionDamage(champ, champIndex, (Group *)_vm->_dungeonMan->getThingData(_actionTargetGroupThing), _vm->ordinalToIndex(targetCreatureOrdinal), targetMapX, targetMapY, actionHitProbability, actionDamageFactor, skillIndex);

View file

@ -704,7 +704,7 @@ void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing
objectType = _vm->_objectMan->getObjectType(thing); objectType = _vm->_objectMan->getObjectType(thing);
} else { } else {
thingType = kM1_PartyThingType; thingType = kM1_PartyThingType;
objectType = kM1_IconIndiceNone; objectType = kDMIconIndiceNone;
} }
if ((!addThing) && (thingType != kM1_PartyThingType)) if ((!addThing) && (thingType != kM1_PartyThingType))
@ -878,7 +878,7 @@ bool MovesensMan::isObjectInPartyPossession(int16 objectType) {
if (curObjectType == objectType) if (curObjectType == objectType)
return true; return true;
if (curObjectType == k144_IconIndiceContainerChestClosed) { if (curObjectType == kDMIconIndiceContainerChestClosed) {
Container *container = (Container *)_vm->_dungeonMan->getThingData(curThing); Container *container = (Container *)_vm->_dungeonMan->getThingData(curThing);
curThing = container->getSlot(); curThing = container->getSlot();
while (curThing != Thing::_endOfList) { while (curThing != Thing::_endOfList) {

View file

@ -133,7 +133,7 @@ void ObjectMan::loadObjectNames() {
IconIndice ObjectMan::getObjectType(Thing thing) { IconIndice ObjectMan::getObjectType(Thing thing) {
if (thing == Thing::_none) if (thing == Thing::_none)
return kM1_IconIndiceNone; return kDMIconIndiceNone;
int16 objectInfoIndex = _vm->_dungeonMan->getObjectInfoIndex(thing); int16 objectInfoIndex = _vm->_dungeonMan->getObjectInfoIndex(thing);
if (objectInfoIndex != -1) if (objectInfoIndex != -1)
@ -146,35 +146,35 @@ IconIndice ObjectMan::getIconIndex(Thing thing) {
static byte chargeCountToTorchType[16] = {0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3}; // @ G0029_auc_Graphic562_ChargeCountToTorchType static byte chargeCountToTorchType[16] = {0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3}; // @ G0029_auc_Graphic562_ChargeCountToTorchType
int16 iconIndex = getObjectType(thing); int16 iconIndex = getObjectType(thing);
if (iconIndex != kM1_IconIndiceNone) { if (iconIndex != kDMIconIndiceNone) {
if (((iconIndex < k32_IconIndiceWeaponDagger) && (iconIndex >= k0_IconIndiceJunkCompassNorth)) || if (((iconIndex < kDMIconIndiceWeaponDagger) && (iconIndex >= kDMIconIndiceJunkCompassNorth)) ||
((iconIndex >= k148_IconIndicePotionMaPotionMonPotion) && (iconIndex <= k163_IconIndicePotionWaterFlask)) || ((iconIndex >= kDMIconIndicePotionMaPotionMonPotion) && (iconIndex <= kDMIconIndicePotionWaterFlask)) ||
(iconIndex == k195_IconIndicePotionEmptyFlask)) { (iconIndex == kDMIconIndicePotionEmptyFlask)) {
Junk *junkThing = (Junk*)_vm->_dungeonMan->getThingData(thing); Junk *junkThing = (Junk*)_vm->_dungeonMan->getThingData(thing);
switch (iconIndex) { switch (iconIndex) {
case k0_IconIndiceJunkCompassNorth: case kDMIconIndiceJunkCompassNorth:
iconIndex += _vm->_dungeonMan->_partyDir; iconIndex += _vm->_dungeonMan->_partyDir;
break; break;
case k4_IconIndiceWeaponTorchUnlit: case kDMIconIndiceWeaponTorchUnlit:
if (((Weapon*)junkThing)->isLit()) if (((Weapon*)junkThing)->isLit())
iconIndex += chargeCountToTorchType[((Weapon*)junkThing)->getChargeCount()]; iconIndex += chargeCountToTorchType[((Weapon*)junkThing)->getChargeCount()];
break; break;
case k30_IconIndiceScrollOpen: case kDMIconIndiceScrollOpen:
if (((Scroll*)junkThing)->getClosed()) if (((Scroll*)junkThing)->getClosed())
iconIndex++; iconIndex++;
break; break;
case k8_IconIndiceJunkWater: case kDMIconIndiceJunkWater:
case k12_IconIndiceJunkIllumuletUnequipped: case kDMIconIndiceJunkIllumuletUnequipped:
case k10_IconIndiceJunkJewelSymalUnequipped: case kDMIconIndiceJunkJewelSymalUnequipped:
if (junkThing->getChargeCount()) if (junkThing->getChargeCount())
iconIndex++; iconIndex++;
break; break;
case k23_IconIndiceWeaponBoltBladeStormEmpty: case kDMIconIndiceWeaponBoltBladeStormEmpty:
case k14_IconIndiceWeaponFlamittEmpty: case kDMIconIndiceWeaponFlamittEmpty:
case k18_IconIndiceWeaponStormringEmpty: case kDMIconIndiceWeaponStormringEmpty:
case k25_IconIndiceWeaponFuryRaBladeEmpty: case kDMIconIndiceWeaponFuryRaBladeEmpty:
case k16_IconIndiceWeaponEyeOfTimeEmpty: case kDMIconIndiceWeaponEyeOfTimeEmpty:
case k20_IconIndiceWeaponStaffOfClawsEmpty: case kDMIconIndiceWeaponStaffOfClawsEmpty:
if (((Weapon*)junkThing)->getChargeCount()) if (((Weapon*)junkThing)->getChargeCount())
iconIndex++; iconIndex++;
break; break;
@ -201,7 +201,7 @@ void ObjectMan::extractIconFromBitmap(uint16 iconIndex, byte *destBitmap) {
void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) { void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
SlotBox *slotBox = &_slotBoxes[slotBoxIndex]; SlotBox *slotBox = &_slotBoxes[slotBoxIndex];
slotBox->_iconIndex = iconIndex; slotBox->_iconIndex = iconIndex;
if (slotBox->_iconIndex == kM1_IconIndiceNone) if (slotBox->_iconIndex == kDMIconIndiceNone)
return; return;
Box blitBox; Box blitBox;
@ -237,7 +237,7 @@ void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
void ObjectMan::drawLeaderObjectName(Thing thing) { void ObjectMan::drawLeaderObjectName(Thing thing) {
char *objectName = nullptr; char *objectName = nullptr;
int16 iconIndex = getIconIndex(thing); int16 iconIndex = getIconIndex(thing);
if (iconIndex == k147_IconIndiceJunkChampionBones) { if (iconIndex == kDMIconIndiceJunkChampionBones) {
Junk *junk = (Junk*)_vm->_dungeonMan->getThingData(thing); Junk *junk = (Junk*)_vm->_dungeonMan->getThingData(thing);
char champBonesName[16]; char champBonesName[16];

View file

@ -138,8 +138,8 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in
if ((projectileThingData->_attack > _vm->getRandomNumber(128)) if ((projectileThingData->_attack > _vm->getRandomNumber(128))
&& getFlag(associatedAllowedSlots, k0x0100_ObjectAllowedSlotPouchPassAndThroughDoors) && getFlag(associatedAllowedSlots, k0x0100_ObjectAllowedSlotPouchPassAndThroughDoors)
&& ( (projectileAssociatedThingType != k10_JunkThingType) && ( (projectileAssociatedThingType != k10_JunkThingType)
|| (iconIndex < k176_IconIndiceJunkIronKey) || (iconIndex < kDMIconIndiceJunkIronKey)
|| (iconIndex > k191_IconIndiceJunkMasterKey) || (iconIndex > kDMIconIndiceJunkMasterKey)
)) { )) {
return false; return false;
} }

View file

@ -930,7 +930,7 @@ T0255002:
while (curThing != Thing::_endOfList) { while (curThing != Thing::_endOfList) {
if ((curThing.getCell() == cell) && (curThing.getType() == k10_JunkThingType)) { if ((curThing.getCell() == cell) && (curThing.getType() == k10_JunkThingType)) {
int16 iconIndex = _vm->_objectMan->getIconIndex(curThing); int16 iconIndex = _vm->_objectMan->getIconIndex(curThing);
if (iconIndex == k147_IconIndiceJunkChampionBones) { if (iconIndex == kDMIconIndiceJunkChampionBones) {
Junk *junkData = (Junk *)_vm->_dungeonMan->getThingData(curThing); Junk *junkData = (Junk *)_vm->_dungeonMan->getThingData(curThing);
if (junkData->getChargeCount() == championIndex) { if (junkData->getChargeCount() == championIndex) {
_vm->_dungeonMan->unlinkThingFromList(curThing, Thing(0), mapX, mapY); /* BUG0_25 When a champion dies, no bones object is created so it is not possible to bring the champion back to life at an altar of Vi. Each time a champion is brought back to life, the bones object is removed from the dungeon but it is not marked as unused and thus becomes an orphan. After a large number of champion deaths, all JUNK things are exhausted and the game cannot create any more. This also affects the creation of JUNK things dropped by some creatures when they die (Screamer, Rockpile, Magenta Worm, Pain Rat, Red Dragon) */ _vm->_dungeonMan->unlinkThingFromList(curThing, Thing(0), mapX, mapY); /* BUG0_25 When a champion dies, no bones object is created so it is not possible to bring the champion back to life at an altar of Vi. Each time a champion is brought back to life, the bones object is removed from the dungeon but it is not marked as unused and thus becomes an orphan. After a large number of champion deaths, all JUNK things are exhausted and the game cannot create any more. This also affects the creation of JUNK things dropped by some creatures when they die (Screamer, Rockpile, Magenta Worm, Pain Rat, Red Dragon) */