aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/champion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dm/champion.cpp')
-rw-r--r--engines/dm/champion.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 9302216766..b8dac7ff3e 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -142,13 +142,13 @@ void ChampionMan::applyModifiersToStatistics(Champion* champ, ChampionSlot slotI
int16 statIndex;
int16 modifier = 0;
ThingType thingType = thing.getType();
- if (((thingType == kWeaponThingType) || (thingType == kArmourThingType))
+ if (((thingType == k5_WeaponThingType) || (thingType == k6_ArmourThingType))
&& (slotIndex >= k0_ChampionSlotReadyHand)
&& (slotIndex <= k12_ChampionSlotQuiverLine_1_1)) {
Weapon *weapon = (Weapon*)_vm->_dungeonMan->getThingData(thing);
Armour *armour = (Armour*)_vm->_dungeonMan->getThingData(thing);
- if (((thingType == kWeaponThingType) && weapon->getCursed())
- || ((thingType == kArmourThingType) && armour->getCursed())) {
+ if (((thingType == k5_WeaponThingType) && weapon->getCursed())
+ || ((thingType == k6_ArmourThingType) && armour->getCursed())) {
statIndex = k0_ChampionStatLuck;
modifier = -3;
goto T0299044_ApplyModifier;
@@ -437,7 +437,7 @@ ChampionIndex ChampionMan::getIndexInCell(ViewCell cell) {
}
void ChampionMan::resetDataToStartGame() {
- if (!_vm->_dungeonMan->_messages._newGame) {
+ if (!_vm->_dungeonMan->_messages._g298_newGame) {
warning("MISSING CODE: stuff for resetting for loaded games");
assert(false);
}
@@ -468,26 +468,26 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
champ->_actionIndex = k255_ChampionActionNone;
champ->_enableActionEventIndex = -1;
champ->_hideDamageReceivedIndex = -1;
- champ->_dir = dunMan._currMap._partyDir;
+ champ->_dir = dunMan._currMap._g308_partyDir;
ViewCell AL_0_viewCell = k0_ViewCellFronLeft;
- while (getIndexInCell((ViewCell)((AL_0_viewCell + dunMan._currMap._partyDir) & 3)) != kM1_ChampionNone)
+ while (getIndexInCell((ViewCell)((AL_0_viewCell + dunMan._currMap._g308_partyDir) & 3)) != kM1_ChampionNone)
AL_0_viewCell = (ViewCell)(AL_0_viewCell + 1);
- champ->_cell = (ViewCell)((AL_0_viewCell + dunMan._currMap._partyDir) & 3);
+ champ->_cell = (ViewCell)((AL_0_viewCell + dunMan._currMap._g308_partyDir) & 3);
champ->clearAttributes(k0x0400_ChampionAttributeIcon);
- champ->_directionMaximumDamageReceived = dunMan._currMap._partyDir;
+ champ->_directionMaximumDamageReceived = dunMan._currMap._g308_partyDir;
champ->_food = 1500 + _vm->_rnd->getRandomNumber(256);
champ->_water = 1500 + _vm->_rnd->getRandomNumber(256);
int16 AL_0_slotIndex_Red;
for (AL_0_slotIndex_Red = k0_ChampionSlotReadyHand; AL_0_slotIndex_Red < k30_ChampionSlotChest_1; ++AL_0_slotIndex_Red) {
champ->setSlot((ChampionSlot)AL_0_slotIndex_Red, Thing::_none);
}
- Thing thing = dunMan.getSquareFirstThing(dunMan._currMap._partyPosX, dunMan._currMap._partyPosY);
- while (thing.getType() != kTextstringType) {
+ Thing thing = dunMan.getSquareFirstThing(dunMan._currMap._g306_partyPosX, dunMan._currMap._g307_partyPosY);
+ while (thing.getType() != k2_TextstringType) {
thing = dunMan.getNextThing(thing);
}
char decodedChampionText[77];
char* character_Green = decodedChampionText;
- dunMan.decodeText(character_Green, thing, (TextType)(kTextTypeScroll | kDecodeEvenIfInvisible));
+ dunMan.decodeText(character_Green, thing, (TextType)(k2_TextTypeScroll | k0x8000_DecodeEvenIfInvisible));
int16 AL_0_characterIndex = 0;
uint16 AL_2_character;
while ((AL_2_character = *character_Green++) != '\n') {
@@ -557,21 +557,21 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
_vm->_menuMan->drawActionIcon((ChampionIndex)(_g305_partyChampionCount - 1));
}
- int16 mapX = _vm->_dungeonMan->_currMap._partyPosX;
- int16 mapY = _vm->_dungeonMan->_currMap._partyPosY;
+ int16 mapX = _vm->_dungeonMan->_currMap._g306_partyPosX;
+ int16 mapY = _vm->_dungeonMan->_currMap._g307_partyPosY;
- uint16 championObjectsCell = returnOppositeDir((direction)(dunMan._currMap._partyDir));
- mapX += _vm->_dirIntoStepCountEast[dunMan._currMap._partyDir];
- mapY += _vm->_dirIntoStepCountNorth[dunMan._currMap._partyDir];
+ uint16 championObjectsCell = returnOppositeDir((direction)(dunMan._currMap._g308_partyDir));
+ mapX += _vm->_dirIntoStepCountEast[dunMan._currMap._g308_partyDir];
+ mapY += _vm->_dirIntoStepCountNorth[dunMan._currMap._g308_partyDir];
thing = dunMan.getSquareFirstThing(mapX, mapY);
AL_0_slotIndex_Red = k13_ChampionSlotBackpackLine_1_1;
uint16 slotIndex_Green;
while (thing != Thing::_endOfList) {
ThingType AL_2_thingType = thing.getType();
- if ((AL_2_thingType > kSensorThingType) && (thing.getCell() == championObjectsCell)) {
- int16 objectAllowedSlots = gObjectInfo[dunMan.getObjectInfoIndex(thing)].getAllowedSlots();
+ if ((AL_2_thingType > k3_SensorThingType) && (thing.getCell() == championObjectsCell)) {
+ int16 objectAllowedSlots = g237_ObjectInfo[dunMan.getObjectInfoIndex(thing)].getAllowedSlots();
switch (AL_2_thingType) {
- case kArmourThingType:
+ case k6_ArmourThingType:
for (slotIndex_Green = k2_ChampionSlotHead; slotIndex_Green <= k5_ChampionSlotFeet; slotIndex_Green++) {
if (objectAllowedSlots & gSlotMasks[slotIndex_Green])
goto T0280048;
@@ -582,15 +582,15 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
goto T0280046;
}
break;
- case kWeaponThingType:
+ case k5_WeaponThingType:
if (champ->getSlot(k1_ChampionSlotActionHand) == Thing::_none) {
slotIndex_Green = k1_ChampionSlotActionHand;
} else {
goto T0280046;
}
break;
- case kScrollThingType:
- case kPotionThingType:
+ case k7_ScrollThingType:
+ case k8_PotionThingType:
if (champ->getSlot(k11_ChampionSlotPouch_1) == Thing::_none) {
slotIndex_Green = k11_ChampionSlotPouch_1;
} else if (champ->getSlot(k6_ChampionSlotPouch_2) == Thing::_none) {
@@ -599,8 +599,8 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
goto T0280046;
}
break;
- case kContainerThingType:
- case kJunkThingType:
+ case k9_ContainerThingType:
+ case k10_JunkThingType:
T0280046:
if ((objectAllowedSlots & gSlotMasks[k10_ChampionSlotNeck]) && (champ->getSlot(k10_ChampionSlotNeck) == Thing::_none)) {
slotIndex_Green = k10_ChampionSlotNeck;
@@ -850,19 +850,19 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
}
{ // block so goto won't skip AL_0_championIconIndex initialization
- int16 AL_0_championIconIndex = championIconIndex(champ->_cell, _vm->_dungeonMan->_currMap._partyDir);
+ int16 AL_0_championIconIndex = championIconIndex(champ->_cell, _vm->_dungeonMan->_currMap._g308_partyDir);
if ((champAttributes & k28_ChampionIcons) && (eventMan._useChampionIconOrdinalAsMousePointerBitmap != _vm->indexToOrdinal(AL_0_championIconIndex))) {
dispMan.clearScreenBox(g46_ChampionColor[champIndex], g54_BoxChampionIcons[AL_0_championIconIndex]);
- dispMan.blitToScreen(dispMan.getBitmap(k28_ChampionIcons), 80, championIconIndex(champ->_dir, _vm->_dungeonMan->_currMap._partyDir) * 19, 0,
+ dispMan.blitToScreen(dispMan.getBitmap(k28_ChampionIcons), 80, championIconIndex(champ->_dir, _vm->_dungeonMan->_currMap._g308_partyDir) * 19, 0,
g54_BoxChampionIcons[AL_0_championIconIndex], k12_ColorDarkestGray);
}
}
if ((champAttributes & k0x0800_ChampionAttributePanel) && isInventoryChamp) {
- if (_vm->_pressingMouth) {
+ if (_vm->_g333_pressingMouth) {
invMan.drawPanelFoodWaterPoisoned();
- } else if (_vm->_pressingEye) {
+ } else if (_vm->_g331_pressingEye) {
if (_g415_leaderEmptyHanded) {
warning("MISSING CODE: F0351_INVENTORY_DrawChampionSkillsAndStatistics");
}