aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-08-25 22:09:30 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit938b38a66a87e11bdb6719a22023c0dcede1b5bb (patch)
tree63e245cc4ec18e90c5759c491c7b455aad49c6fd
parentd2fbd98f3d28d14b58f215bd1559ef7433df08e3 (diff)
downloadscummvm-rg350-938b38a66a87e11bdb6719a22023c0dcede1b5bb.tar.gz
scummvm-rg350-938b38a66a87e11bdb6719a22023c0dcede1b5bb.tar.bz2
scummvm-rg350-938b38a66a87e11bdb6719a22023c0dcede1b5bb.zip
DM: Rename class members of MovesensMan
-rw-r--r--engines/dm/champion.cpp4
-rw-r--r--engines/dm/console.cpp4
-rw-r--r--engines/dm/dm.cpp4
-rw-r--r--engines/dm/dungeonman.cpp8
-rw-r--r--engines/dm/eventman.cpp22
-rw-r--r--engines/dm/group.cpp24
-rw-r--r--engines/dm/menus.cpp8
-rw-r--r--engines/dm/movesens.cpp146
-rw-r--r--engines/dm/movesens.h54
-rw-r--r--engines/dm/projexpl.cpp16
-rw-r--r--engines/dm/timeline.cpp36
11 files changed, 162 insertions, 164 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index b7f2460af0..9e30bdf177 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -1476,7 +1476,7 @@ void ChampionMan::championKill(uint16 champIndex) {
L0966_ps_Junk->setDoNotDiscard(true);
L0966_ps_Junk->setChargeCount(champIndex);
curCell = curChampion->_cell;
- _vm->_moveSens->f267_getMoveResult(thingWithNewCell(unusedThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
+ _vm->_moveSens->getMoveResult(thingWithNewCell(unusedThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
curChampion->_symbolStep = 0;
curChampion->_symbols[0] = '\0';
@@ -1553,7 +1553,7 @@ void ChampionMan::dropAllObjects(uint16 champIndex) {
for (uint16 slotIndex = k0_ChampionSlotReadyHand; slotIndex < k30_ChampionSlotChest_1; slotIndex++) {
Thing curThing = getObjectRemovedFromSlot(champIndex, slotDropOrder[slotIndex]);
if (curThing != Thing::_none)
- _vm->_moveSens->f267_getMoveResult(thingWithNewCell(curThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
+ _vm->_moveSens->getMoveResult(thingWithNewCell(curThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
}
diff --git a/engines/dm/console.cpp b/engines/dm/console.cpp
index b931733b54..77da72a632 100644
--- a/engines/dm/console.cpp
+++ b/engines/dm/console.cpp
@@ -143,7 +143,7 @@ bool Console::Cmd_pos(int argc, const char** argv) {
if (haventWarned.check())
debugPrintf("Setting position directly can cause glitches and crashes.\n");
debugPrintf("Position set to (%d, %d)\n", x, y);
- _vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY,
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY,
x - currMap._offsetMapX, y - currMap._offsetMapY);
} else
goto argumentError;
@@ -177,7 +177,7 @@ bool Console::Cmd_map(int argc, const char** argv) {
debugPrintf("Setting map directly can cause glitches and crashes.\n");
debugPrintf("Map set to %d\n", index);
- _vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_newPartyMapIndex = _vm->_dungeonMan->getLocationAfterLevelChange(
_vm->_dungeonMan->_partyMapIndex, index - _vm->_dungeonMan->_partyMapIndex,
&_vm->_dungeonMan->_partyMapX, &_vm->_dungeonMan->_partyMapY);
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 1b218e13c8..c82246de38 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -306,7 +306,7 @@ void DMEngine::initializeGame() {
startGame();
if (_newGameFl)
- _moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
+ _moveSens->getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
_eventMan->showMouse();
_eventMan->discardAllInput();
}
@@ -439,7 +439,7 @@ void DMEngine::gameloop() {
if (_newPartyMapIndex != kM1_mapIndexNone) {
processNewPartyMap(_newPartyMapIndex);
- _moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
+ _moveSens->getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
_newPartyMapIndex = kM1_mapIndexNone;
_eventMan->discardAllInput();
}
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 5f356b9a09..82b1e8db5c 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -1461,28 +1461,28 @@ Thing DungeonMan::getDiscardThing(uint16 thingType) {
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->f267_getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
break;
case k5_WeaponThingType:
if (((Weapon*)squareThingData)->getDoNotDiscard())
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->f267_getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
break;
case k10_JunkThingType:
if (((Junk*)squareThingData)->getDoNotDiscard())
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->f267_getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
break;
case k8_PotionThingType:
if (((Potion*)squareThingData)->getDoNotDiscard())
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->f267_getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
break;
}
setCurrentMap(currentMapIdx);
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 5007b8c3a3..c84fd010aa 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -940,9 +940,9 @@ void EventManager::commandTurnParty(CommandType cmdType) {
return;
}
- _vm->_moveSens->f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, Thing::_party, true, false);
+ _vm->_moveSens->processThingAdditionOrRemoval(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, Thing::_party, true, false);
_vm->_championMan->setPartyDirection(normalizeModulo4(_vm->_dungeonMan->_partyDir + ((cmdType == k2_CommandTurnRight) ? 1 : 3)));
- _vm->_moveSens->f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, Thing::_party, true, true);
+ _vm->_moveSens->processThingAdditionOrRemoval(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, Thing::_party, true, true);
}
void EventManager::commandMoveParty(CommandType cmdType) {
@@ -988,7 +988,7 @@ void EventManager::commandMoveParty(CommandType cmdType) {
_vm->_dungeonMan->mapCoordsAfterRelMovement(_vm->_dungeonMan->_partyDir, movementArrowToStepForwardCount[movementArrowIdx], movementArrowToSepRightCount[movementArrowIdx], partyMapX, partyMapY);
int16 partySquareType = Square(AL1115_ui_Square = _vm->_dungeonMan->getSquare(partyMapX, partyMapY).toByte()).getType();
if (partySquareType == k3_ElementTypeStairs) {
- _vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_dungeonMan->_partyMapX = partyMapX;
_vm->_dungeonMan->_partyMapY = partyMapY;
commandTakeStairs(getFlag(AL1115_ui_Square, k0x0004_StairsUp));
@@ -1030,9 +1030,9 @@ void EventManager::commandMoveParty(CommandType cmdType) {
}
if (isStairsSquare)
- _vm->_moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, partyMapX, partyMapY);
+ _vm->_moveSens->getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, partyMapX, partyMapY);
else
- _vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, partyMapX, partyMapY);
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, partyMapX, partyMapY);
uint16 disabledMovtTicks = 1;
championsPtr = _vm->_championMan->_champions;
@@ -1137,7 +1137,7 @@ void EventManager::commandProcessType80ClickInDungeonViewTouchFrontWall() {
if ((mapX >= 0) && (mapX < _vm->_dungeonMan->_currMapWidth)
&& (mapY >= 0) && (mapY < _vm->_dungeonMan->_currMapHeight))
- _vm->_stopWaitingForPlayerInput = _vm->_moveSens->f275_sensorIsTriggeredByClickOnWall(mapX, mapY, returnOppositeDir(_vm->_dungeonMan->_partyDir));
+ _vm->_stopWaitingForPlayerInput = _vm->_moveSens->sensorIsTriggeredByClickOnWall(mapX, mapY, returnOppositeDir(_vm->_dungeonMan->_partyDir));
}
void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY) {
@@ -1161,7 +1161,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
if ((((Door*)junkPtr)->hasButton()) && _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
_vm->_stopWaitingForPlayerInput = true;
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k01_soundSWITCH, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, k1_soundModePlayIfPrioritized);
- _vm->_moveSens->f268_addEvent(k10_TMEventTypeDoor, L1155_i_MapX, L1156_i_MapY, 0, k2_SensorEffToggle, _vm->_gameTime + 1);
+ _vm->_moveSens->addEvent(k10_TMEventTypeDoor, L1155_i_MapX, L1156_i_MapY, 0, k2_SensorEffToggle, _vm->_gameTime + 1);
return;
}
} else if (isLeaderHandObjThrown(posX, posY))
@@ -1349,7 +1349,7 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
mapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_partyDir], mapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_partyDir];
Thing groupThing = _vm->_groupMan->groupGetThing(mapX, mapY);
if ((groupThing != Thing::_endOfList) &&
- !_vm->_moveSens->f264_isLevitating(groupThing) &&
+ !_vm->_moveSens->isLevitating(groupThing) &&
_vm->_groupMan->getCreatureOrdinalInCell((Group*)_vm->_dungeonMan->getThingData(groupThing), normalizeModulo4(viewCell + _vm->_dungeonMan->_partyDir))) {
return; /* It is not possible to grab an object on floor if there is a non levitating creature on its cell */
}
@@ -1357,7 +1357,7 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
Thing topPileThing = _vm->_dungeonMan->_pileTopObject[viewCell];
if (_vm->_objectMan->f33_getIconIndex(topPileThing) != kM1_IconIndiceNone) {
- _vm->_moveSens->f267_getMoveResult(topPileThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(topPileThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
_vm->_championMan->putObjectInLeaderHand(topPileThing, true);
}
@@ -1379,7 +1379,7 @@ void EventManager::processType80_clickInDungeonViewDropLeaderHandObject(uint16 v
uint16 currCell = normalizeModulo4(_vm->_dungeonMan->_partyDir + viewCell);
Thing removedThing = _vm->_championMan->getObjectRemovedFromLeaderHand();
- _vm->_moveSens->f267_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->f33_getIconIndex(removedThing) == k147_IconIndiceJunkChampionBones)) {
Junk *removedJunk = (Junk*)_vm->_dungeonMan->getThingData(removedThing);
TimelineEvent newEvent;
@@ -1428,7 +1428,7 @@ void EventManager::discardAllInput() {
}
void EventManager::commandTakeStairs(bool stairsGoDown) {
- _vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_newPartyMapIndex = _vm->_dungeonMan->getLocationAfterLevelChange(_vm->_dungeonMan->_partyMapIndex, stairsGoDown ? -1 : 1, &_vm->_dungeonMan->_partyMapX, &_vm->_dungeonMan->_partyMapY);
_vm->_dungeonMan->setCurrentMap(_vm->_newPartyMapIndex);
_vm->_championMan->setPartyDirection(_vm->_dungeonMan->getStairsExitDirection(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY));
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 99ce13381a..91554184bc 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -155,7 +155,7 @@ void GroupMan::dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThing, in
if ((currentThing).getType() == k5_WeaponThingType) {
L0371_B_WeaponDropped = true;
}
- _vm->_moveSens->f267_getMoveResult(currentThing, kM1_MapXNotOnASquare, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(currentThing, kM1_MapXNotOnASquare, 0, mapX, mapY);
} while ((currentThing = nextThing) != Thing::_endOfList);
if (mode >= k0_soundModePlayImmediately)
@@ -284,7 +284,7 @@ void GroupMan::dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int
currWeapon->setType(currFixedPossession);
currWeapon->setCursed(cursedPossessions);
nextUnusedThing = thingWithNewCell(nextUnusedThing, ((cell == k255_CreatureTypeSingleCenteredCreature) || !_vm->getRandomNumber(4)) ? _vm->getRandomNumber(4) : cell);
- _vm->_moveSens->f267_getMoveResult(nextUnusedThing, kM1_MapXNotOnASquare, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(nextUnusedThing, kM1_MapXNotOnASquare, 0, mapX, mapY);
currFixedPossession = *fixedPossessions++;
}
_vm->_sound->f064_SOUND_RequestPlay_CPSD(weaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, mode);
@@ -516,7 +516,7 @@ void GroupMan::groupDelete(int16 mapX, int16 mapY) {
L0373_ps_Group = (Group *)_vm->_dungeonMan->getThingData(L0372_T_GroupThing);
for (uint16 i = 0; i < 4; ++i)
L0373_ps_Group->_health[i] = 0;
- _vm->_moveSens->f267_getMoveResult(L0372_T_GroupThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(L0372_T_GroupThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
L0373_ps_Group->_nextThing = Thing::_none;
if (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) {
_activeGroups[L0373_ps_Group->getActiveGroupIndex()]._groupThingIndex = -1;
@@ -654,10 +654,10 @@ 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], AL0451_i_DestinationMapY += _vm->_dirIntoStepCountNorth[AL0446_i_Direction];
- if (_vm->_moveSens->f267_getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY))
+ if (_vm->_moveSens->getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY))
goto T0209139_Return;
- L0465_s_NextEvent._B._location._mapX = _vm->_moveSens->_g397_moveResultMapX;
- L0465_s_NextEvent._B._location._mapY = _vm->_moveSens->_g398_moveResultMapY;
+ L0465_s_NextEvent._B._location._mapX = _vm->_moveSens->_moveResultMapX;
+ L0465_s_NextEvent._B._location._mapY = _vm->_moveSens->_moveResultMapY;
}
L0465_s_NextEvent._type = k37_TMEventTypeUpdateBehaviourGroup;
AL0446_i_Ticks = MAX(ABS(_vm->_dungeonMan->_currMapIndex - _vm->_dungeonMan->_partyMapIndex) << 4, L0448_s_CreatureInfo._movementTicks << 1);
@@ -834,10 +834,10 @@ T0209061_MoveGroup:
AL0447_i_Ticks = (L0461_i_MovementTicks >> 1) - L0462_i_TicksSinceLastMove;
L0453_B_NewGroupDirectionFound = (AL0447_i_Ticks <= 0);
if (L0453_B_NewGroupDirectionFound) {
- if (_vm->_moveSens->f267_getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY))
+ if (_vm->_moveSens->getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY))
goto T0209139_Return;
- L0465_s_NextEvent._B._location._mapX = _vm->_moveSens->_g397_moveResultMapX;
- L0465_s_NextEvent._B._location._mapY = _vm->_moveSens->_g398_moveResultMapY;;
+ L0465_s_NextEvent._B._location._mapX = _vm->_moveSens->_moveResultMapX;
+ L0465_s_NextEvent._B._location._mapY = _vm->_moveSens->_moveResultMapY;;
L0445_ps_ActiveGroup->_priorMapX = eventMapX;
L0445_ps_ActiveGroup->_priorMapY = eventMapY;
L0445_ps_ActiveGroup->_lastMoveTime = _vm->_gameTime;
@@ -1336,7 +1336,7 @@ int32 GroupMan::getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 crea
if (L0331_ui_CreatureType == k13_CreatureTypeCouatl) {
if (_vm->getRandomNumber(2)) {
toggleFlag(AL0326_ui_Aspect, k0x0040_MaskActiveGroupFlipBitmap);
- L1635_ui_SoundIndex = _vm->_moveSens->f514_getSound(k13_CreatureTypeCouatl);
+ L1635_ui_SoundIndex = _vm->_moveSens->getSound(k13_CreatureTypeCouatl);
if (L1635_ui_SoundIndex <= k34_D13_soundCount)
_vm->_sound->f064_SOUND_RequestPlay_CPSD(L1635_ui_SoundIndex, _currentGroupMapX, _currentGroupMapY, k1_soundModePlayIfPrioritized);
}
@@ -1850,7 +1850,7 @@ Thing GroupMan::groupGetGenerated(int16 creatureType, int16 healthMultiplier, ui
}
} while (creatureCount--);
L0353_ps_Group->_cells = L0352_ui_GroupCells;
- if (_vm->_moveSens->f267_getMoveResult(L0349_T_GroupThing, kM1_MapXNotOnASquare, 0, mapX, mapY)) { /* If F0267_MOVE_GetMoveResult_CPSCE returns true then the group was either killed by a projectile impact (in which case the thing data was marked as unused) or the party is on the destination square and an event is created to move the creature into the dungeon later (in which case the thing is referenced in the event) */
+ if (_vm->_moveSens->getMoveResult(L0349_T_GroupThing, kM1_MapXNotOnASquare, 0, mapX, mapY)) { /* If F0267_MOVE_GetMoveResult_CPSCE returns true then the group was either killed by a projectile impact (in which case the thing data was marked as unused) or the party is on the destination square and an event is created to move the creature into the dungeon later (in which case the thing is referenced in the event) */
return Thing::_none;
}
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k17_soundBUZZ, mapX, mapY, k1_soundModePlayIfPrioritized);
@@ -2103,7 +2103,7 @@ void GroupMan::fuseAction(uint16 mapX, uint16 mapY) {
}
}
if (isSquareACorridorTeleporterPitOrDoor(L0548_i_MapX, L0549_i_MapY)) {
- if (!_vm->_moveSens->f267_getMoveResult(L0555_T_LordChaosThing, mapX, mapY, L0548_i_MapX, L0549_i_MapY)) {
+ if (!_vm->_moveSens->getMoveResult(L0555_T_LordChaosThing, mapX, mapY, L0548_i_MapX, L0549_i_MapY)) {
startWanedring(L0548_i_MapX, L0549_i_MapY);
}
return;
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index ce372f0f59..8750d30024 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -623,7 +623,7 @@ T0412033:
_vm->_championMan->addObjectInSlot((ChampionIndex)champIndex, L1272_T_Object, AL1267_ui_SlotIndex);
_vm->_championMan->drawChampionState((ChampionIndex)champIndex);
} else {
- _vm->_moveSens->f267_getMoveResult(L1272_T_Object, kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
+ _vm->_moveSens->getMoveResult(L1272_T_Object, kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
break;
case k8_spellType_otherFireshield:
@@ -1285,9 +1285,9 @@ T0407032:
/* CHANGE6_00_FIX The presence of a group over the pit is checked so that you cannot climb down a pit with the rope if there is a group levitating over it */
if ((_vm->_dungeonMan->getSquare(L1251_i_MapX, L1252_i_MapY).getType() == k2_PitElemType) && (_vm->_groupMan->groupGetThing(L1251_i_MapX, L1252_i_MapY) == Thing::_endOfList)) {
/* BUG0_77 The party moves forward when using the rope in front of a closed pit. The engine does not check whether the pit is open before moving the party over the pit. This is not consistent with the behavior when using the rope in front of a corridor where nothing happens */
- _vm->_moveSens->_g402_useRopeToClimbDownPit = true;
- _vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, L1251_i_MapX, L1252_i_MapY);
- _vm->_moveSens->_g402_useRopeToClimbDownPit = false;
+ _vm->_moveSens->_useRopeToClimbDownPit = true;
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, L1251_i_MapX, L1252_i_MapY);
+ _vm->_moveSens->_useRopeToClimbDownPit = false;
} else {
L1249_ui_ActionDisabledTicks = 0;
}
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 37dd738a90..fce6df36cf 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -41,19 +41,19 @@
namespace DM {
MovesensMan::MovesensMan(DMEngine* vm) : _vm(vm) {
- _g397_moveResultMapX = 0;
- _g398_moveResultMapY = 0;
- _g399_moveResultMapIndex = 0;
- _g400_moveResultDir = 0;
- _g401_moveResultCell = 0;
- _g402_useRopeToClimbDownPit = false;
- _g403_sensorRotationEffect = 0;
- _g404_sensorRotationEffMapX = 0;
- _g405_sensorRotationEffMapY = 0;
- _g406_sensorRotationEffCell = 0;
+ _moveResultMapX = 0;
+ _moveResultMapY = 0;
+ _moveResultMapIndex = 0;
+ _moveResultDir = 0;
+ _moveResultCell = 0;
+ _useRopeToClimbDownPit = false;
+ _sensorRotationEffect = 0;
+ _sensorRotationEffMapX = 0;
+ _sensorRotationEffMapY = 0;
+ _sensorRotationEffCell = 0;
}
-bool MovesensMan::f275_sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16 cellParam) {
+bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16 cellParam) {
Thing L0750_T_ThingBeingProcessed;
uint16 L0751_ui_ThingType;
uint16 L0752_ui_Cell;
@@ -126,7 +126,7 @@ bool MovesensMan::f275_sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, ui
L0750_T_ThingBeingProcessed = L0763_T_LastProcessedThing;
}
if (!L0753_B_DoNotTriggerSensor && (L0757_ui_SensorType == k11_SensorWallOrnClickWithSpecObjRemovedRotateSensors)) {
- f270_sensorTriggetLocalEffect(k2_SensorEffToggle, mapX, mapY, L0752_ui_Cell); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */
+ triggerLocalEffect(k2_SensorEffToggle, mapX, mapY, L0752_ui_Cell); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */
}
break;
case k12_SensorWallObjGeneratorRotateSensors:
@@ -134,23 +134,23 @@ bool MovesensMan::f275_sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, ui
goto T0275058_ProceedToNextThing;
L0753_B_DoNotTriggerSensor = !_vm->_championMan->_leaderEmptyHanded;
if (!L0753_B_DoNotTriggerSensor) {
- f270_sensorTriggetLocalEffect(k2_SensorEffToggle, mapX, mapY, L0752_ui_Cell); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */
+ triggerLocalEffect(k2_SensorEffToggle, mapX, mapY, L0752_ui_Cell); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */
}
break;
case k13_SensorWallSingleObjStorageRotateSensors:
if (_vm->_championMan->_leaderEmptyHanded) {
- if ((L0761_T_LeaderHandObject = f273_sensorGetObjectOfTypeInCell(mapX, mapY, L0752_ui_Cell, L0758_i_SensorData)) == Thing::_none)
+ if ((L0761_T_LeaderHandObject = getObjectOfTypeInCell(mapX, mapY, L0752_ui_Cell, L0758_i_SensorData)) == Thing::_none)
goto T0275058_ProceedToNextThing;
_vm->_dungeonMan->unlinkThingFromList(L0761_T_LeaderHandObject, Thing(0), mapX, mapY);
_vm->_championMan->putObjectInLeaderHand(L0761_T_LeaderHandObject, true);
} else {
- if ((_vm->_objectMan->f32_getObjectType(L0761_T_LeaderHandObject) != L0758_i_SensorData) || (f273_sensorGetObjectOfTypeInCell(mapX, mapY, L0752_ui_Cell, L0758_i_SensorData) != Thing::_none))
+ if ((_vm->_objectMan->f32_getObjectType(L0761_T_LeaderHandObject) != L0758_i_SensorData) || (getObjectOfTypeInCell(mapX, mapY, L0752_ui_Cell, L0758_i_SensorData) != Thing::_none))
goto T0275058_ProceedToNextThing;
_vm->_championMan->getObjectRemovedFromLeaderHand();
_vm->_dungeonMan->linkThingToList(thingWithNewCell(L0761_T_LeaderHandObject, L0752_ui_Cell), Thing(0), mapX, mapY);
L0761_T_LeaderHandObject = Thing::_none;
}
- f270_sensorTriggetLocalEffect(k2_SensorEffToggle, mapX, mapY, L0752_ui_Cell); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */
+ triggerLocalEffect(k2_SensorEffToggle, mapX, mapY, L0752_ui_Cell); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */
if ((L0756_i_SensorEffect == k3_SensorEffHold) && !_vm->_championMan->_leaderEmptyHanded) {
L0753_B_DoNotTriggerSensor = true;
} else {
@@ -196,7 +196,7 @@ bool MovesensMan::f275_sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, ui
_vm->_championMan->putObjectInLeaderHand(L0761_T_LeaderHandObject, true);
}
}
- f272_sensorTriggerEffect(L0755_ps_Sensor, L0756_i_SensorEffect, mapX, mapY, L0752_ui_Cell);
+ triggerEffect(L0755_ps_Sensor, L0756_i_SensorEffect, mapX, mapY, L0752_ui_Cell);
}
goto T0275058_ProceedToNextThing;
}
@@ -206,11 +206,11 @@ T0275058_ProceedToNextThing:
L0763_T_LastProcessedThing = L0750_T_ThingBeingProcessed;
L0750_T_ThingBeingProcessed = _vm->_dungeonMan->getNextThing(L0750_T_ThingBeingProcessed);
}
- f271_processRotationEffect();
+ processRotationEffect();
return L0759_B_AtLeastOneSensorWasTriggered;
}
-bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destMapX, int16 destMapY) {
+bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destMapX, int16 destMapY) {
int16 L0708_i_Multiple = 0;
#define AL0708_i_DestinationSquare L0708_i_Multiple
#define AL0708_i_ScentIndex L0708_i_Multiple
@@ -242,11 +242,11 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
if (thing != Thing::_party) {
L0710_i_ThingType = thing.getType();
L0717_ui_ThingCell = thing.getCell();
- L0713_B_ThingLevitates = f264_isLevitating(thing);
+ L0713_B_ThingLevitates = isLevitating(thing);
}
/* If moving the party or a creature on the party map from a dungeon square then check for a projectile impact */
if ((mapX >= 0) && ((thing == Thing::_party) || ((L0710_i_ThingType == k4_GroupThingType) && (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex)))) {
- if (f266_moveIsKilledByProjectileImpact(mapX, mapY, destMapX, destMapY, thing)) {
+ if (moveIsKilledByProjectileImpact(mapX, mapY, destMapX, destMapY, thing)) {
return true; /* The specified group thing cannot be moved because it was killed by a projectile impact */
}
}
@@ -279,7 +279,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
}
if (L0710_i_ThingType == k14_ProjectileThingType) {
L0712_ps_Teleporter = (Teleporter *)_vm->_dungeonMan->getThingData(thing);
- _g400_moveResultDir = (_vm->_timeline->_g370_events[((Projectile *)L0712_ps_Teleporter)->_eventIndex])._C._projectile.getDir();
+ _moveResultDir = (_vm->_timeline->_g370_events[((Projectile *)L0712_ps_Teleporter)->_eventIndex])._C._projectile.getDir();
}
for (L0728_i_ChainedMoveCount = 1000; --L0728_i_ChainedMoveCount; ) { /* No more than 1000 chained moves at once (in a chain of teleporters and pits for example) */
AL0708_i_DestinationSquare = _vm->_dungeonMan->_currMapData[destMapX][destMapY];
@@ -313,10 +313,10 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
if (L0712_ps_Teleporter->isAudible()) {
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k17_soundBUZZ, destMapX, destMapY, k1_soundModePlayIfPrioritized);
}
- L0720_ui_MoveGroupResult = f262_getTeleporterRotatedGroupResult(L0712_ps_Teleporter, thing, L0714_ui_MapIndexSource);
+ L0720_ui_MoveGroupResult = getTeleporterRotatedGroupResult(L0712_ps_Teleporter, thing, L0714_ui_MapIndexSource);
} else {
if (L0710_i_ThingType == k14_ProjectileThingType) {
- thing = f263_getTeleporterRotatedProjectileThing(L0712_ps_Teleporter, thing);
+ thing = getTeleporterRotatedProjectileThing(L0712_ps_Teleporter, thing);
} else {
if (!(L0712_ps_Teleporter->getAbsoluteRotation()) && (mapX != -2)) {
thing = thingWithNewCell(thing, normalizeModulo4(thing.getCell() + L0712_ps_Teleporter->getRotation()));
@@ -328,7 +328,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
break;
} else {
if ((AL0709_i_DestinationSquareType == k2_ElementTypePit) && !L0713_B_ThingLevitates && getFlag(AL0708_i_DestinationSquare, k0x0008_PitOpen) && !getFlag(AL0708_i_DestinationSquare, k0x0001_PitImaginary)) {
- if (L0723_B_DrawDungeonViewWhileFalling && !_g402_useRopeToClimbDownPit) {
+ if (L0723_B_DrawDungeonViewWhileFalling && !_useRopeToClimbDownPit) {
L0723_B_DrawDungeonViewWhileFalling = true;
if (L0719_i_TraversedPitCount) {
_vm->_dungeonMan->setCurrentMapAndPartyMap(L0715_ui_MapIndexDestination);
@@ -345,7 +345,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
_vm->_dungeonMan->_partyMapX = destMapX;
_vm->_dungeonMan->_partyMapY = destMapY;
if (_vm->_championMan->_partyChampionCount > 0) {
- if (_g402_useRopeToClimbDownPit) {
+ if (_useRopeToClimbDownPit) {
for (AL0709_i_ChampionIndex = k0_ChampionFirst, L0711_ps_Champion = _vm->_championMan->_champions; AL0709_i_ChampionIndex < _vm->_championMan->_partyChampionCount; AL0709_i_ChampionIndex++, L0711_ps_Champion++) {
if (L0711_ps_Champion->_currHealth) {
_vm->_championMan->decrementStamina(AL0709_i_ChampionIndex, ((L0711_ps_Champion->_load * 25) / _vm->_championMan->getMaximumLoad(L0711_ps_Champion)) + 1);
@@ -357,7 +357,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
}
}
}
- _g402_useRopeToClimbDownPit = false;
+ _useRopeToClimbDownPit = false;
} else {
if (L0710_i_ThingType == k4_GroupThingType) {
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
@@ -397,10 +397,10 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
}
return true; /* The specified group thing cannot be moved because it was killed by a fall or because it is not allowed on the destination map */
}
- _g397_moveResultMapX = destMapX;
- _g398_moveResultMapY = destMapY;
- _g399_moveResultMapIndex = L0715_ui_MapIndexDestination;
- _g401_moveResultCell = thing.getCell();
+ _moveResultMapX = destMapX;
+ _moveResultMapY = destMapY;
+ _moveResultMapIndex = L0715_ui_MapIndexDestination;
+ _moveResultCell = thing.getCell();
L0725_B_PartySquare = (L0715_ui_MapIndexDestination == L0714_ui_MapIndexSource) && (destMapX == mapX) && (destMapY == mapY);
if (L0725_B_PartySquare) {
if (thing == Thing::_party) {
@@ -408,7 +408,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
return false;
}
} else {
- if ((_g401_moveResultCell == L0717_ui_ThingCell) && (L0710_i_ThingType != k14_ProjectileThingType)) {
+ if ((_moveResultCell == L0717_ui_ThingCell) && (L0710_i_ThingType != k14_ProjectileThingType)) {
return false;
}
}
@@ -442,12 +442,12 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
}
if (mapX >= 0) {
if (thing == Thing::_party) {
- f276_sensorProcessThingAdditionOrRemoval(mapX, mapY, Thing::_party, L0725_B_PartySquare, false);
+ processThingAdditionOrRemoval(mapX, mapY, Thing::_party, L0725_B_PartySquare, false);
} else {
if (L0713_B_ThingLevitates) {
_vm->_dungeonMan->unlinkThingFromList(thing, Thing(0), mapX, mapY);
} else {
- f276_sensorProcessThingAdditionOrRemoval(mapX, mapY, thing, (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (mapX == _vm->_dungeonMan->_partyMapX) && (mapY == _vm->_dungeonMan->_partyMapY), false);
+ processThingAdditionOrRemoval(mapX, mapY, thing, (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (mapX == _vm->_dungeonMan->_partyMapX) && (mapY == _vm->_dungeonMan->_partyMapY), false);
}
}
}
@@ -459,7 +459,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
_vm->_groupMan->groupDelete(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
if (L0715_ui_MapIndexDestination == L0714_ui_MapIndexSource) {
- f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, Thing::_party, L0725_B_PartySquare, true);
+ processThingAdditionOrRemoval(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, Thing::_party, L0725_B_PartySquare, true);
} else {
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
_vm->_newPartyMapIndex = L0715_ui_MapIndexDestination;
@@ -477,10 +477,10 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
if (L0721_B_GroupOnPartyMap) {
_vm->_groupMan->removeActiveGroup(AL0708_i_ActiveGroupIndex);
}
- f265_createEvent60to61_moveGroup(thing, destMapX, destMapY, L0715_ui_MapIndexDestination, L0726_B_Audible);
+ createEventMoveGroup(thing, destMapX, destMapY, L0715_ui_MapIndexDestination, L0726_B_Audible);
return true; /* The specified group thing cannot be moved because the party or another group is on the destination square */
}
- L1638_ui_MovementSoundIndex = f514_getSound(((Group *)_vm->_dungeonMan->_thingData[k4_GroupThingType])[thing.getIndex()]._type);
+ L1638_ui_MovementSoundIndex = getSound(((Group *)_vm->_dungeonMan->_thingData[k4_GroupThingType])[thing.getIndex()]._type);
if (L1638_ui_MovementSoundIndex < k34_D13_soundCount) {
_vm->_sound->f064_SOUND_RequestPlay_CPSD(L1638_ui_MovementSoundIndex, destMapX, destMapY, k1_soundModePlayIfPrioritized);
}
@@ -496,7 +496,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
if (L0713_B_ThingLevitates) {
_vm->_dungeonMan->linkThingToList(thing, Thing(0), destMapX, destMapY);
} else {
- f276_sensorProcessThingAdditionOrRemoval(destMapX, destMapY, thing, false, true);
+ processThingAdditionOrRemoval(destMapX, destMapY, thing, false, true);
}
if (L0720_ui_MoveGroupResult || (mapX < 0)) { /* If group moved from one map to another or if it was just placed on a square */
_vm->_groupMan->startWanedring(destMapX, destMapY);
@@ -517,7 +517,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
if (L0710_i_ThingType == k14_ProjectileThingType) { /* BUG0_29 An explosion can trigger a floor sensor. Explosions do not trigger floor sensors on the square where they are created. However, if an explosion is moved by a teleporter (or by falling into a pit, see BUG0_26) after it was created, it can trigger floor sensors on the destination square. This is because explosions are not considered as levitating in the code, while projectiles are. The condition here should be (L0713_B_ThingLevitates) so that explosions would not start sensor processing on their destination square as they should be Levitating. This would work if F0264_MOVE_IsLevitating returned true for explosions (see BUG0_26) */
_vm->_dungeonMan->linkThingToList(thing, Thing(0), destMapX, destMapY);
} else {
- f276_sensorProcessThingAdditionOrRemoval(destMapX, destMapY, thing, (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (destMapX == _vm->_dungeonMan->_partyMapX) && (destMapY == _vm->_dungeonMan->_partyMapY), true);
+ processThingAdditionOrRemoval(destMapX, destMapY, thing, (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (destMapX == _vm->_dungeonMan->_partyMapX) && (destMapY == _vm->_dungeonMan->_partyMapY), true);
}
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
}
@@ -525,7 +525,7 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
return false;
}
-bool MovesensMan::f264_isLevitating(Thing thing) {
+bool MovesensMan::isLevitating(Thing thing) {
int16 L0695_i_ThingType;
@@ -538,7 +538,7 @@ bool MovesensMan::f264_isLevitating(Thing thing) {
return false;
}
-bool MovesensMan::f266_moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY, Thing thing) {
+bool MovesensMan::moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY, Thing thing) {
Thing L0697_T_Thing;
uint16 L0699_ui_Multiple;
#define AL0699_ui_Cell L0699_ui_Multiple
@@ -632,7 +632,7 @@ T0266017_CheckProjectileImpacts:
return false;
}
-void MovesensMan::f268_addEvent(byte type, byte mapX, byte mapY, byte cell, byte effect, int32 time) {
+void MovesensMan::addEvent(byte type, byte mapX, byte mapY, byte cell, byte effect, int32 time) {
TimelineEvent L0729_s_Event;
setMapAndTime(L0729_s_Event._mapTime, _vm->_dungeonMan->_currMapIndex, time);
@@ -645,7 +645,7 @@ void MovesensMan::f268_addEvent(byte type, byte mapX, byte mapY, byte cell, byte
_vm->_timeline->f238_addEventGetEventIndex(&L0729_s_Event);
}
-int16 MovesensMan::f514_getSound(byte creatureType) {
+int16 MovesensMan::getSound(byte creatureType) {
if (_vm->_championMan->_partyIsSleeping) {
return 35;
}
@@ -690,7 +690,7 @@ int16 MovesensMan::f514_getSound(byte creatureType) {
return -1000; // if this is returned, it's an error, this should break it good
}
-int16 MovesensMan::f262_getTeleporterRotatedGroupResult(Teleporter* teleporter, Thing thing, uint16 mapIndex) {
+int16 MovesensMan::getTeleporterRotatedGroupResult(Teleporter* teleporter, Thing thing, uint16 mapIndex) {
int16 L0683_i_Rotation;
uint16 L0684_ui_GroupDirections;
uint16 L0685_ui_UpdatedGroupDirections;
@@ -740,11 +740,11 @@ int16 MovesensMan::f262_getTeleporterRotatedGroupResult(Teleporter* teleporter,
return 1;
}
-Thing MovesensMan::f263_getTeleporterRotatedProjectileThing(Teleporter* teleporter, Thing projectileThing) {
+Thing MovesensMan::getTeleporterRotatedProjectileThing(Teleporter* teleporter, Thing projectileThing) {
int16 L0693_i_UpdatedDirection;
int16 L0694_i_Rotation;
- L0693_i_UpdatedDirection = _g400_moveResultDir;
+ L0693_i_UpdatedDirection = _moveResultDir;
L0694_i_Rotation = teleporter->getRotation();
if (teleporter->getAbsoluteRotation()) {
L0693_i_UpdatedDirection = L0694_i_Rotation;
@@ -752,11 +752,11 @@ Thing MovesensMan::f263_getTeleporterRotatedProjectileThing(Teleporter* teleport
L0693_i_UpdatedDirection = normalizeModulo4(L0693_i_UpdatedDirection + L0694_i_Rotation);
projectileThing = thingWithNewCell(projectileThing, normalizeModulo4((projectileThing).getCell() + L0694_i_Rotation));
}
- _g400_moveResultDir = L0693_i_UpdatedDirection;
+ _moveResultDir = L0693_i_UpdatedDirection;
return projectileThing;
}
-void MovesensMan::f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing) {
+void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing) {
Thing L0766_T_Thing;
int16 L0767_i_ThingType;
bool L0768_B_TriggerSensor;
@@ -873,7 +873,7 @@ void MovesensMan::f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 m
case k8_SensorFloorPartyPossession:
if (L0767_i_ThingType != kM1_PartyThingType)
goto T0276079;
- L0768_B_TriggerSensor = f274_sensorIsObjcetInPartyPossession(L0779_i_SensorData);
+ L0768_B_TriggerSensor = isObjcetInPartyPossession(L0779_i_SensorData);
break;
case k9_SensorFloorVersionChecker:
if ((L0767_i_ThingType != kM1_PartyThingType) || !addThing || partySquare)
@@ -914,7 +914,7 @@ void MovesensMan::f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 m
if (L0769_ps_Sensor->getAttrAudibleA())
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k01_soundSWITCH, mapX, mapY, k1_soundModePlayIfPrioritized);
- f272_sensorTriggerEffect(L0769_ps_Sensor, L0778_i_Effect, mapX, mapY, (uint16)kM1_CellAny); // this will wrap around
+ triggerEffect(L0769_ps_Sensor, L0778_i_Effect, mapX, mapY, (uint16)kM1_CellAny); // this will wrap around
goto T0276079;
}
if (L0771_ui_ThingType >= k4_GroupThingType)
@@ -922,10 +922,10 @@ void MovesensMan::f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 m
T0276079:
L0766_T_Thing = _vm->_dungeonMan->getNextThing(L0766_T_Thing);
}
- f271_processRotationEffect();
+ processRotationEffect();
}
-bool MovesensMan::f274_sensorIsObjcetInPartyPossession(int16 objectType) {
+bool MovesensMan::isObjcetInPartyPossession(int16 objectType) {
int16 L0742_i_ChampionIndex;
uint16 L0743_ui_SlotIndex = 0;
Thing L0744_T_Thing = Thing::_none;
@@ -968,7 +968,7 @@ T0274003:
return false;
}
-void MovesensMan::f272_sensorTriggerEffect(Sensor* sensor, int16 effect, int16 mapX, int16 mapY, uint16 cell) {
+void MovesensMan::triggerEffect(Sensor* sensor, int16 effect, int16 mapX, int16 mapY, uint16 cell) {
byte g59_squareTypeToEventType[7] = { // @ G0059_auc_Graphic562_SquareTypeToEventType
k6_TMEventTypeWall,
k5_TMEventTypeCorridor,
@@ -990,7 +990,7 @@ void MovesensMan::f272_sensorTriggerEffect(Sensor* sensor, int16 effect, int16 m
}
L0738_l_Time = _vm->_gameTime + sensor->getAttrValue();
if (sensor->getAttrLocalEffect()) {
- f270_sensorTriggetLocalEffect(sensor->getActionLocalEffect(), mapX, mapY, cell);
+ triggerLocalEffect(sensor->getActionLocalEffect(), mapX, mapY, cell);
} else {
L0736_i_TargetMapX = sensor->getActionTargetMapX();
L0737_i_TargetMapY = sensor->getActionTargetMapY();
@@ -1000,22 +1000,22 @@ void MovesensMan::f272_sensorTriggerEffect(Sensor* sensor, int16 effect, int16 m
} else {
L0740_ui_TargetCell = k0_CellNorthWest;
}
- f268_addEvent(g59_squareTypeToEventType[L0739_ui_SquareType], L0736_i_TargetMapX, L0737_i_TargetMapY, L0740_ui_TargetCell, effect, L0738_l_Time);
+ addEvent(g59_squareTypeToEventType[L0739_ui_SquareType], L0736_i_TargetMapX, L0737_i_TargetMapY, L0740_ui_TargetCell, effect, L0738_l_Time);
}
}
-void MovesensMan::f270_sensorTriggetLocalEffect(int16 localEffect, int16 effX, int16 effY, int16 effCell) {
+void MovesensMan::triggerLocalEffect(int16 localEffect, int16 effX, int16 effY, int16 effCell) {
if (localEffect == k10_SensorEffAddExp) {
- f269_sensorAddSkillExperience(k8_ChampionSkillSteal, 300, localEffect != kM1_CellAny);
+ addSkillExperience(k8_ChampionSkillSteal, 300, localEffect != kM1_CellAny);
return;
}
- _g403_sensorRotationEffect = localEffect;
- _g404_sensorRotationEffMapX = effX;
- _g405_sensorRotationEffMapY = effY;
- _g406_sensorRotationEffCell = effCell;
+ _sensorRotationEffect = localEffect;
+ _sensorRotationEffMapX = effX;
+ _sensorRotationEffMapY = effY;
+ _sensorRotationEffCell = effCell;
}
-void MovesensMan::f269_sensorAddSkillExperience(int16 skillIndex, uint16 exp, bool leaderOnly) {
+void MovesensMan::addSkillExperience(int16 skillIndex, uint16 exp, bool leaderOnly) {
if (leaderOnly) {
if (_vm->_championMan->_leaderIndex != kM1_ChampionNone) {
@@ -1032,35 +1032,35 @@ void MovesensMan::f269_sensorAddSkillExperience(int16 skillIndex, uint16 exp, bo
}
}
-void MovesensMan::f271_processRotationEffect() {
+void MovesensMan::processRotationEffect() {
Thing L0732_T_FirstSensorThing;
Thing L0733_T_LastSensorThing;
Sensor* L0734_ps_FirstSensor;
Sensor* L0735_ps_LastSensor;
- if (_g403_sensorRotationEffect == kM1_SensorEffNone) {
+ if (_sensorRotationEffect == kM1_SensorEffNone) {
return;
}
- switch (_g403_sensorRotationEffect) {
+ switch (_sensorRotationEffect) {
case k1_SensorEffClear:
case k2_SensorEffToggle:
- L0732_T_FirstSensorThing = _vm->_dungeonMan->getSquareFirstThing(_g404_sensorRotationEffMapX, _g405_sensorRotationEffMapY);
- while (((L0732_T_FirstSensorThing).getType() != k3_SensorThingType) || ((_g406_sensorRotationEffCell != kM1_CellAny) && ((L0732_T_FirstSensorThing).getCell() != _g406_sensorRotationEffCell))) {
+ L0732_T_FirstSensorThing = _vm->_dungeonMan->getSquareFirstThing(_sensorRotationEffMapX, _sensorRotationEffMapY);
+ while (((L0732_T_FirstSensorThing).getType() != k3_SensorThingType) || ((_sensorRotationEffCell != kM1_CellAny) && ((L0732_T_FirstSensorThing).getCell() != _sensorRotationEffCell))) {
L0732_T_FirstSensorThing = _vm->_dungeonMan->getNextThing(L0732_T_FirstSensorThing);
}
L0734_ps_FirstSensor = (Sensor *)_vm->_dungeonMan->getThingData(L0732_T_FirstSensorThing);
L0733_T_LastSensorThing = L0734_ps_FirstSensor->getNextThing();
- while ((L0733_T_LastSensorThing != Thing::_endOfList) && (((L0733_T_LastSensorThing).getType() != k3_SensorThingType) || ((_g406_sensorRotationEffCell != kM1_CellAny) && ((L0733_T_LastSensorThing).getCell() != _g406_sensorRotationEffCell)))) {
+ while ((L0733_T_LastSensorThing != Thing::_endOfList) && (((L0733_T_LastSensorThing).getType() != k3_SensorThingType) || ((_sensorRotationEffCell != kM1_CellAny) && ((L0733_T_LastSensorThing).getCell() != _sensorRotationEffCell)))) {
L0733_T_LastSensorThing = _vm->_dungeonMan->getNextThing(L0733_T_LastSensorThing);
}
if (L0733_T_LastSensorThing == Thing::_endOfList)
break;
- _vm->_dungeonMan->unlinkThingFromList(L0732_T_FirstSensorThing, Thing(0), _g404_sensorRotationEffMapX, _g405_sensorRotationEffMapY);
+ _vm->_dungeonMan->unlinkThingFromList(L0732_T_FirstSensorThing, Thing(0), _sensorRotationEffMapX, _sensorRotationEffMapY);
L0735_ps_LastSensor = (Sensor *)_vm->_dungeonMan->getThingData(L0733_T_LastSensorThing);
L0733_T_LastSensorThing = _vm->_dungeonMan->getNextThing(L0733_T_LastSensorThing);
while (((L0733_T_LastSensorThing != Thing::_endOfList) && ((L0733_T_LastSensorThing).getType() == k3_SensorThingType))) {
- if ((_g406_sensorRotationEffCell == kM1_CellAny) || ((L0733_T_LastSensorThing).getCell() == _g406_sensorRotationEffCell)) {
+ if ((_sensorRotationEffCell == kM1_CellAny) || ((L0733_T_LastSensorThing).getCell() == _sensorRotationEffCell)) {
L0735_ps_LastSensor = (Sensor *)_vm->_dungeonMan->getThingData(L0733_T_LastSensorThing);
}
L0733_T_LastSensorThing = _vm->_dungeonMan->getNextThing(L0733_T_LastSensorThing);
@@ -1068,10 +1068,10 @@ void MovesensMan::f271_processRotationEffect() {
L0734_ps_FirstSensor->setNextThing(L0735_ps_LastSensor->getNextThing());
L0735_ps_LastSensor->setNextThing(L0732_T_FirstSensorThing);
}
- _g403_sensorRotationEffect = kM1_SensorEffNone;
+ _sensorRotationEffect = kM1_SensorEffNone;
}
-void MovesensMan::f265_createEvent60to61_moveGroup(Thing groupThing, int16 mapX, int16 mapY, int16 mapIndex, bool audible) {
+void MovesensMan::createEventMoveGroup(Thing groupThing, int16 mapX, int16 mapY, int16 mapIndex, bool audible) {
TimelineEvent L0696_s_Event;
setMapAndTime(L0696_s_Event._mapTime, mapIndex, _vm->_gameTime + 5);
@@ -1083,7 +1083,7 @@ void MovesensMan::f265_createEvent60to61_moveGroup(Thing groupThing, int16 mapX,
_vm->_timeline->f238_addEventGetEventIndex(&L0696_s_Event);
}
-Thing MovesensMan::f273_sensorGetObjectOfTypeInCell(int16 mapX, int16 mapY, int16 cell, int16 objectType) {
+Thing MovesensMan::getObjectOfTypeInCell(int16 mapX, int16 mapY, int16 cell, int16 objectType) {
Thing L0741_T_Thing;
diff --git a/engines/dm/movesens.h b/engines/dm/movesens.h
index 79a1fa9bf1..c9381fab9f 100644
--- a/engines/dm/movesens.h
+++ b/engines/dm/movesens.h
@@ -38,37 +38,35 @@ namespace DM {
class MovesensMan {
DMEngine *_vm;
public:
- int16 _g397_moveResultMapX; // @ G0397_i_MoveResultMapX
- int16 _g398_moveResultMapY; // @ G0398_i_MoveResultMapY
- uint16 _g399_moveResultMapIndex; // @ G0399_ui_MoveResultMapIndex
- int16 _g400_moveResultDir; // @ G0400_i_MoveResultDirection
- uint16 _g401_moveResultCell; // @ G0401_ui_MoveResultCell
- bool _g402_useRopeToClimbDownPit; // @ G0402_B_UseRopeToClimbDownPit
- int16 _g403_sensorRotationEffect; // @ G0403_i_SensorRotationEffect
- int16 _g404_sensorRotationEffMapX; // @ G0404_i_SensorRotationEffectMapX
- int16 _g405_sensorRotationEffMapY; // @ G0405_i_SensorRotationEffectMapY
- int16 _g406_sensorRotationEffCell; // @ G0406_i_SensorRotationEffectCell
explicit MovesensMan(DMEngine *vm);
- bool f275_sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16 cellParam); // @ F0275_SENSOR_IsTriggeredByClickOnWall
- bool f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destMapX, int16 destMapY); // @ F0267_MOVE_GetMoveResult_CPSCE
- bool f264_isLevitating(Thing thing); // @ F0264_MOVE_IsLevitating
- bool f266_moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY, Thing thing); // @ F0266_MOVE_IsKilledByProjectileImpact
- void f268_addEvent(byte type, byte mapX, byte mapY, byte cell, byte effect, int32 time); // @ F0268_SENSOR_AddEvent
- int16 f514_getSound(byte creatureType); // @ F0514_MOVE_GetSound
- int16 f262_getTeleporterRotatedGroupResult(Teleporter *teleporter, Thing thing, uint16 mapIndex);// @ F0262_MOVE_GetTeleporterRotatedGroupResult
- Thing f263_getTeleporterRotatedProjectileThing(Teleporter *teleporter, Thing projectileThing); // @ F0263_MOVE_GetTeleporterRotatedProjectileThing
- void f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing);// @ F0276_SENSOR_ProcessThingAdditionOrRemoval
- bool f274_sensorIsObjcetInPartyPossession(int16 objectType); // @ F0274_SENSOR_IsObjectInPartyPossession
- void f272_sensorTriggerEffect(Sensor *sensor, int16 effect, int16 mapX, int16 mapY, uint16 cell); // @ F0272_SENSOR_TriggerEffect
- void f270_sensorTriggetLocalEffect(int16 localEffect, int16 effX, int16 effY, int16 effCell); // @ F0270_SENSOR_TriggerLocalEffect
- void f269_sensorAddSkillExperience(int16 skillIndex, uint16 exp, bool leaderOnly); // @ F0269_SENSOR_AddSkillExperience
- void f271_processRotationEffect();// @ F0271_SENSOR_ProcessRotationEffect
- void f265_createEvent60to61_moveGroup(Thing groupThing, int16 mapX, int16 mapY, int16 mapIndex, bool audible); // @ F0265_MOVE_CreateEvent60To61_MoveGroup
- Thing f273_sensorGetObjectOfTypeInCell(int16 mapX, int16 mapY, int16 cell, int16 objectType); // @ F0273_SENSOR_GetObjectOfTypeInCell
-
-
+ int16 _moveResultMapX; // @ G0397_i_MoveResultMapX
+ int16 _moveResultMapY; // @ G0398_i_MoveResultMapY
+ uint16 _moveResultMapIndex; // @ G0399_ui_MoveResultMapIndex
+ int16 _moveResultDir; // @ G0400_i_MoveResultDirection
+ uint16 _moveResultCell; // @ G0401_ui_MoveResultCell
+ bool _useRopeToClimbDownPit; // @ G0402_B_UseRopeToClimbDownPit
+ int16 _sensorRotationEffect; // @ G0403_i_SensorRotationEffect
+ int16 _sensorRotationEffMapX; // @ G0404_i_SensorRotationEffectMapX
+ int16 _sensorRotationEffMapY; // @ G0405_i_SensorRotationEffectMapY
+ int16 _sensorRotationEffCell; // @ G0406_i_SensorRotationEffectCell
+ bool sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16 cellParam); // @ F0275_SENSOR_IsTriggeredByClickOnWall
+ bool getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destMapX, int16 destMapY); // @ F0267_MOVE_GetMoveResult_CPSCE
+ bool isLevitating(Thing thing); // @ F0264_MOVE_IsLevitating
+ bool moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY, Thing thing); // @ F0266_MOVE_IsKilledByProjectileImpact
+ void addEvent(byte type, byte mapX, byte mapY, byte cell, byte effect, int32 time); // @ F0268_SENSOR_AddEvent
+ int16 getSound(byte creatureType); // @ F0514_MOVE_GetSound
+ int16 getTeleporterRotatedGroupResult(Teleporter *teleporter, Thing thing, uint16 mapIndex);// @ F0262_MOVE_GetTeleporterRotatedGroupResult
+ Thing getTeleporterRotatedProjectileThing(Teleporter *teleporter, Thing projectileThing); // @ F0263_MOVE_GetTeleporterRotatedProjectileThing
+ void processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing);// @ F0276_SENSOR_ProcessThingAdditionOrRemoval
+ bool isObjcetInPartyPossession(int16 objectType); // @ F0274_SENSOR_IsObjectInPartyPossession
+ void triggerEffect(Sensor *sensor, int16 effect, int16 mapX, int16 mapY, uint16 cell); // @ F0272_SENSOR_TriggerEffect
+ void triggerLocalEffect(int16 localEffect, int16 effX, int16 effY, int16 effCell); // @ F0270_SENSOR_TriggerLocalEffect
+ void addSkillExperience(int16 skillIndex, uint16 exp, bool leaderOnly); // @ F0269_SENSOR_AddSkillExperience
+ void processRotationEffect();// @ F0271_SENSOR_ProcessRotationEffect
+ void createEventMoveGroup(Thing groupThing, int16 mapX, int16 mapY, int16 mapIndex, bool audible); // @ F0265_MOVE_CreateEvent60To61_MoveGroup
+ Thing getObjectOfTypeInCell(int16 mapX, int16 mapY, int16 cell, int16 objectType); // @ F0273_SENSOR_GetObjectOfTypeInCell
};
}
diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp
index 8ef401313d..591f17f120 100644
--- a/engines/dm/projexpl.cpp
+++ b/engines/dm/projexpl.cpp
@@ -152,7 +152,7 @@ T0217004:
L0494_ps_Door = (Door *)_vm->_dungeonMan->getSquareFirstThingData(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY);
if ((AL0487_i_DoorState != k5_doorState_DESTROYED) && (L0486_T_ProjectileAssociatedThing == Thing::_explOpenDoor)) {
if (L0494_ps_Door->hasButton()) {
- _vm->_moveSens->f268_addEvent(k10_TMEventTypeDoor, AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, 0, k2_SensorEffToggle, _vm->_gameTime + 1);
+ _vm->_moveSens->addEvent(k10_TMEventTypeDoor, AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, 0, k2_SensorEffToggle, _vm->_gameTime + 1);
}
break;
}
@@ -414,7 +414,7 @@ void ProjExpl::f215_projectileDelete(Thing projectileThing, Thing* groupSlot, in
_vm->_dungeonMan->linkThingToList(L0479_T_Thing, L0478_T_PreviousThing, kM1_MapXNotOnASquare, 0);
}
} else {
- _vm->_moveSens->f267_getMoveResult(Thing((L0479_T_Thing).getTypeAndIndex() | getFlag(projectileThing.toUint16(), 0xC)), -2, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(Thing((L0479_T_Thing).getTypeAndIndex() | getFlag(projectileThing.toUint16(), 0xC)), -2, 0, mapX, mapY);
}
}
L0480_ps_Projectile->_nextThing = Thing::_none;
@@ -489,12 +489,12 @@ void ProjExpl::f219_processEvents48To49_projectile(TimelineEvent* event) {
}
L0515_T_ProjectileThingNewCell = thingWithNewCell(L0515_T_ProjectileThingNewCell, L0518_ui_Cell &= 0x0003);
if (L0522_B_ProjectileMovesToOtherSquare) {
- _vm->_moveSens->f267_getMoveResult(L0515_T_ProjectileThingNewCell, L0525_i_SourceMapX, L0526_i_SourceMapY, L0523_i_DestinationMapX, L0524_i_DestinationMapY);
- L0519_ps_Event->_C._projectile.setMapX(_vm->_moveSens->_g397_moveResultMapX);
- L0519_ps_Event->_C._projectile.setMapY(_vm->_moveSens->_g398_moveResultMapY);
- L0519_ps_Event->_C._projectile.setDir((Direction)_vm->_moveSens->_g400_moveResultDir);
- L0515_T_ProjectileThingNewCell = thingWithNewCell(L0515_T_ProjectileThingNewCell, _vm->_moveSens->_g401_moveResultCell);
- M31_setMap(L0519_ps_Event->_mapTime, _vm->_moveSens->_g399_moveResultMapIndex);
+ _vm->_moveSens->getMoveResult(L0515_T_ProjectileThingNewCell, L0525_i_SourceMapX, L0526_i_SourceMapY, L0523_i_DestinationMapX, L0524_i_DestinationMapY);
+ L0519_ps_Event->_C._projectile.setMapX(_vm->_moveSens->_moveResultMapX);
+ L0519_ps_Event->_C._projectile.setMapY(_vm->_moveSens->_moveResultMapY);
+ L0519_ps_Event->_C._projectile.setDir((Direction)_vm->_moveSens->_moveResultDir);
+ L0515_T_ProjectileThingNewCell = thingWithNewCell(L0515_T_ProjectileThingNewCell, _vm->_moveSens->_moveResultCell);
+ M31_setMap(L0519_ps_Event->_mapTime, _vm->_moveSens->_moveResultMapIndex);
} else {
if ((Square(_vm->_dungeonMan->getSquare(L0523_i_DestinationMapX, L0524_i_DestinationMapY)).getType() == k4_DoorElemType) && f217_projectileHasImpactOccurred(k4_DoorElemType, L0523_i_DestinationMapX, L0524_i_DestinationMapY, L0518_ui_Cell, L0521_T_ProjectileThing)) {
return;
diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp
index db3e2158b1..002b7a6ec9 100644
--- a/engines/dm/timeline.cpp
+++ b/engines/dm/timeline.cpp
@@ -554,11 +554,11 @@ void Timeline::f249_moveTeleporterOrPitSquareThings(uint16 mapX, uint16 mapY) {
if ((_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (mapX == _vm->_dungeonMan->_partyMapX) && (mapY == _vm->_dungeonMan->_partyMapY)) {
- _vm->_moveSens->f267_getMoveResult(Thing::_party, mapX, mapY, mapX, mapY);
+ _vm->_moveSens->getMoveResult(Thing::_party, mapX, mapY, mapX, mapY);
_vm->_championMan->drawChangedObjectIcons();
}
if ((L0645_T_Thing = _vm->_groupMan->groupGetThing(mapX, mapY)) != Thing::_endOfList) {
- _vm->_moveSens->f267_getMoveResult(L0645_T_Thing, mapX, mapY, mapX, mapY);
+ _vm->_moveSens->getMoveResult(L0645_T_Thing, mapX, mapY, mapX, mapY);
}
L0645_T_Thing = _vm->_dungeonMan->getSquareFirstObject(mapX, mapY);
L0648_T_NextThing = L0645_T_Thing;
@@ -575,24 +575,24 @@ void Timeline::f249_moveTeleporterOrPitSquareThings(uint16 mapX, uint16 mapY) {
L0648_T_NextThing = _vm->_dungeonMan->getNextThing(L0645_T_Thing);
AL0644_ui_ThingType = L0645_T_Thing.getType();
if (AL0644_ui_ThingType > k4_GroupThingType) {
- _vm->_moveSens->f267_getMoveResult(L0645_T_Thing, mapX, mapY, mapX, mapY);
+ _vm->_moveSens->getMoveResult(L0645_T_Thing, mapX, mapY, mapX, mapY);
}
if (AL0644_ui_ThingType == k14_ProjectileThingType) {
L0646_ps_Projectile = (Projectile*)_vm->_dungeonMan->getThingData(L0645_T_Thing);
L0647_ps_Event = &_g370_events[L0646_ps_Projectile->_eventIndex];
- L0647_ps_Event->_C._projectile.setMapX(_vm->_moveSens->_g397_moveResultMapX);
- L0647_ps_Event->_C._projectile.setMapY(_vm->_moveSens->_g398_moveResultMapY);
- L0647_ps_Event->_C._projectile.setDir((Direction)_vm->_moveSens->_g400_moveResultDir);
- L0647_ps_Event->_B._slot = thingWithNewCell(L0645_T_Thing, _vm->_moveSens->_g401_moveResultCell).toUint16();
- M31_setMap(L0647_ps_Event->_mapTime, _vm->_moveSens->_g399_moveResultMapIndex);
+ L0647_ps_Event->_C._projectile.setMapX(_vm->_moveSens->_moveResultMapX);
+ L0647_ps_Event->_C._projectile.setMapY(_vm->_moveSens->_moveResultMapY);
+ L0647_ps_Event->_C._projectile.setDir((Direction)_vm->_moveSens->_moveResultDir);
+ L0647_ps_Event->_B._slot = thingWithNewCell(L0645_T_Thing, _vm->_moveSens->_moveResultCell).toUint16();
+ M31_setMap(L0647_ps_Event->_mapTime, _vm->_moveSens->_moveResultMapIndex);
} else {
if (AL0644_ui_ThingType == k15_ExplosionThingType) {
for (AL0644_ui_EventIndex = 0, L0647_ps_Event = _g370_events; AL0644_ui_EventIndex < _g369_eventMaxCount; L0647_ps_Event++, AL0644_ui_EventIndex++) {
if ((L0647_ps_Event->_type == k25_TMEventTypeExplosion) && (L0647_ps_Event->_C._slot == L0645_T_Thing.toUint16())) { /* BUG0_23 A Fluxcage explosion remains on a square forever. If you open a pit or teleporter on a square where there is a Fluxcage explosion, the Fluxcage explosion is moved but the associated event is not updated (because Fluxcage explosions do not use k25_TMEventTypeExplosion but rather k24_TMEventTypeRemoveFluxcage) causing the Fluxcage explosion to remain in the dungeon forever on its destination square. When the k24_TMEventTypeRemoveFluxcage expires the explosion thing is not removed, but it is marked as unused. Consequently, any objects placed on the Fluxcage square after it was moved but before it expires become orphans upon expiration. After expiration, any object placed on the fluxcage square is cloned when picked up */
- L0647_ps_Event->_B._location._mapX = _vm->_moveSens->_g397_moveResultMapX;
- L0647_ps_Event->_B._location._mapY = _vm->_moveSens->_g398_moveResultMapY;
- L0647_ps_Event->_C._slot = thingWithNewCell(L0645_T_Thing, _vm->_moveSens->_g401_moveResultCell).toUint16();
- M31_setMap(L0647_ps_Event->_mapTime, _vm->_moveSens->_g399_moveResultMapIndex);
+ L0647_ps_Event->_B._location._mapX = _vm->_moveSens->_moveResultMapX;
+ L0647_ps_Event->_B._location._mapY = _vm->_moveSens->_moveResultMapY;
+ L0647_ps_Event->_C._slot = thingWithNewCell(L0645_T_Thing, _vm->_moveSens->_moveResultCell).toUint16();
+ M31_setMap(L0647_ps_Event->_mapTime, _vm->_moveSens->_moveResultMapIndex);
}
}
}
@@ -661,10 +661,10 @@ void Timeline::f248_timelineProcessEvent6_squareWall(TimelineEvent* event) {
L0638_ps_Sensor->setData(L0637_ui_SensorData);
if (L0638_ps_Sensor->getAttrEffectA() == k3_SensorEffHold) {
AL0636_B_TriggerSetEffect = ((L0637_ui_SensorData == 0) != L0638_ps_Sensor->getAttrRevertEffectA());
- _vm->_moveSens->f272_sensorTriggerEffect(L0638_ps_Sensor, AL0636_B_TriggerSetEffect ? k0_SensorEffSet : k1_SensorEffClear, L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
+ _vm->_moveSens->triggerEffect(L0638_ps_Sensor, AL0636_B_TriggerSetEffect ? k0_SensorEffSet : k1_SensorEffClear, L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
} else {
if (L0637_ui_SensorData == 0) {
- _vm->_moveSens->f272_sensorTriggerEffect(L0638_ps_Sensor, L0638_ps_Sensor->getAttrEffectA(), L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
+ _vm->_moveSens->triggerEffect(L0638_ps_Sensor, L0638_ps_Sensor->getAttrEffectA(), L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
}
}
}
@@ -687,10 +687,10 @@ void Timeline::f248_timelineProcessEvent6_squareWall(TimelineEvent* event) {
L0638_ps_Sensor->setData(L0637_ui_SensorData);
AL0636_B_TriggerSetEffect = (Sensor::getDataMask1(L0637_ui_SensorData) == Sensor::getDataMask2(L0637_ui_SensorData)) != L0638_ps_Sensor->getAttrRevertEffectA();
if (L0638_ps_Sensor->getAttrEffectA() == k3_SensorEffHold) {
- _vm->_moveSens->f272_sensorTriggerEffect(L0638_ps_Sensor, AL0636_B_TriggerSetEffect ? k0_SensorEffSet : k1_SensorEffClear, L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
+ _vm->_moveSens->triggerEffect(L0638_ps_Sensor, AL0636_B_TriggerSetEffect ? k0_SensorEffSet : k1_SensorEffClear, L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
} else {
if (AL0636_B_TriggerSetEffect) {
- _vm->_moveSens->f272_sensorTriggerEffect(L0638_ps_Sensor, L0638_ps_Sensor->getAttrEffectA(), L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
+ _vm->_moveSens->triggerEffect(L0638_ps_Sensor, L0638_ps_Sensor->getAttrEffectA(), L0641_i_MapX, L0642_i_MapY, L0643_ui_Cell);
}
}
} else {
@@ -713,7 +713,7 @@ void Timeline::f248_timelineProcessEvent6_squareWall(TimelineEvent* event) {
}
L0634_T_Thing = _vm->_dungeonMan->getNextThing(L0634_T_Thing);
}
- _vm->_moveSens->f271_processRotationEffect();
+ _vm->_moveSens->processRotationEffect();
}
void Timeline::f247_triggerProjectileLauncher(Sensor* sensor, TimelineEvent* event) {
@@ -882,7 +882,7 @@ T0252001:
if (event->_type == k61_TMEventTypeMoveGroupAudible) {
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k17_soundBUZZ, L0656_ui_MapX, L0657_ui_MapY, k1_soundModePlayIfPrioritized);
}
- _vm->_moveSens->f267_getMoveResult(Thing(event->_C._slot), kM1_MapXNotOnASquare, 0, L0656_ui_MapX, L0657_ui_MapY);
+ _vm->_moveSens->getMoveResult(Thing(event->_C._slot), kM1_MapXNotOnASquare, 0, L0656_ui_MapX, L0657_ui_MapY);
} else {
if (!L0659_B_RandomDirectionMoveRetried) {
L0659_B_RandomDirectionMoveRetried = true;