From cdbbc15e5623f47a0e93e5d9113ac64b709cf6de Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 25 Jul 2016 16:13:53 +0200 Subject: DM: Refactor f318_dropAllObjects, f319_championKill and f323_unpoison. Rename _moveSens --- engines/dm/group.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/dm/group.cpp') diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index ec2090cc6e..1d8fc18d2f 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -144,7 +144,7 @@ void GroupMan::f188_dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThin if ((L0365_T_CurrentThing).getType() == k5_WeaponThingType) { L0371_B_WeaponDropped = true; } - _vm->_movsens->f267_getMoveResult(L0365_T_CurrentThing, kM1_MapXNotOnASquare, 0, mapX, mapY); + _vm->_moveSens->f267_getMoveResult(L0365_T_CurrentThing, kM1_MapXNotOnASquare, 0, mapX, mapY); } while ((L0365_T_CurrentThing = L0366_T_NextThing) != Thing::_endOfList); if (mode >= k0_soundModePlayImmediately) { _vm->f064_SOUND_RequestPlay_CPSD(L0371_B_WeaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, mode); @@ -256,7 +256,7 @@ void GroupMan::f186_dropCreatureFixedPossessions(uint16 creatureType, int16 mapX L0360_ps_Weapon->setType(L0356_ui_FixedPossession); L0360_ps_Weapon->setCursed(L0361_B_Cursed); L0358_T_Thing = M15_thingWithNewCell(L0358_T_Thing, ((cell == k255_CreatureTypeSingleCenteredCreature) || !_vm->getRandomNumber(4)) ? _vm->getRandomNumber(4) : cell); - _vm->_movsens->f267_getMoveResult(L0358_T_Thing, kM1_MapXNotOnASquare, 0, mapX, mapY); + _vm->_moveSens->f267_getMoveResult(L0358_T_Thing, kM1_MapXNotOnASquare, 0, mapX, mapY); } _vm->f064_SOUND_RequestPlay_CPSD(L0362_B_WeaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, mode); } @@ -487,7 +487,7 @@ void GroupMan::f189_delete(int16 mapX, int16 mapY) { L0373_ps_Group = (Group *)_vm->_dungeonMan->f156_getThingData(L0372_T_GroupThing); for (uint16 i = 0; i < 4; ++i) L0373_ps_Group->_health[i] = 0; - _vm->_movsens->f267_getMoveResult(L0372_T_GroupThing, mapX, mapY, kM1_MapXNotOnASquare, 0); + _vm->_moveSens->f267_getMoveResult(L0372_T_GroupThing, mapX, mapY, kM1_MapXNotOnASquare, 0); L0373_ps_Group->_nextThing = Thing::_none; if (_vm->_dungeonMan->_g272_currMapIndex == _vm->_dungeonMan->_g309_partyMapIndex) { _vm->_groupMan->_g375_activeGroups[L0373_ps_Group->getActiveGroupIndex()]._groupThingIndex = -1; @@ -625,10 +625,10 @@ void GroupMan::f209_processEvents29to41(int16 eventMapX, int16 eventMapY, int16 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->_movsens->f267_getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY)) + if (_vm->_moveSens->f267_getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY)) goto T0209139_Return; - L0465_s_NextEvent._B._location._mapX = _vm->_movsens->_g397_moveResultMapX; - L0465_s_NextEvent._B._location._mapY = _vm->_movsens->_g398_moveResultMapY; + L0465_s_NextEvent._B._location._mapX = _vm->_moveSens->_g397_moveResultMapX; + L0465_s_NextEvent._B._location._mapY = _vm->_moveSens->_g398_moveResultMapY; } L0465_s_NextEvent._type = k37_TMEventTypeUpdateBehaviourGroup; AL0446_i_Ticks = MAX(ABS(_vm->_dungeonMan->_g272_currMapIndex - _vm->_dungeonMan->_g309_partyMapIndex) << 4, L0448_s_CreatureInfo._movementTicks << 1); @@ -797,10 +797,10 @@ T0209058_MoveInRandomDirection: && f202_isMovementPossible(&L0448_s_CreatureInfo, eventMapX, eventMapY, AL0446_i_Direction, false)) { T0209061_MoveGroup: if (L0453_B_NewGroupDirectionFound = ((AL0447_i_Ticks = (L0461_i_MovementTicks >> 1) - L0462_i_TicksSinceLastMove) <= 0)) { - if (_vm->_movsens->f267_getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY)) + if (_vm->_moveSens->f267_getMoveResult(L0449_T_GroupThing, eventMapX, eventMapY, AL0450_i_DestinationMapX, AL0451_i_DestinationMapY)) goto T0209139_Return; - L0465_s_NextEvent._B._location._mapX = _vm->_movsens->_g397_moveResultMapX; - L0465_s_NextEvent._B._location._mapY = _vm->_movsens->_g398_moveResultMapY;; + L0465_s_NextEvent._B._location._mapX = _vm->_moveSens->_g397_moveResultMapX; + L0465_s_NextEvent._B._location._mapY = _vm->_moveSens->_g398_moveResultMapY;; L0445_ps_ActiveGroup->_priorMapX = eventMapX; L0445_ps_ActiveGroup->_priorMapY = eventMapY; L0445_ps_ActiveGroup->_lastMoveTime = _vm->_g313_gameTime; @@ -1291,7 +1291,7 @@ int32 GroupMan::f179_getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 if (L0331_ui_CreatureType == k13_CreatureTypeCouatl) { if (_vm->getRandomNumber(2)) { toggleFlag(AL0326_ui_Aspect, k0x0040_MaskActiveGroupFlipBitmap); - L1635_ui_SoundIndex = _vm->_movsens->f514_getSound(k13_CreatureTypeCouatl); + L1635_ui_SoundIndex = _vm->_moveSens->f514_getSound(k13_CreatureTypeCouatl); if (L1635_ui_SoundIndex <= k34_D13_soundCount) { _vm->f064_SOUND_RequestPlay_CPSD(L1635_ui_SoundIndex, _g378_currentGroupMapX, _g379_currentGroupMapY, k1_soundModePlayIfPrioritized); } @@ -1806,7 +1806,7 @@ Thing GroupMan::f185_groupGetGenerated(int16 creatureType, int16 healthMultiplie } } while (creatureCount--); L0353_ps_Group->_cells = L0352_ui_GroupCells; - if (_vm->_movsens->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->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) */ return Thing::_none; } _vm->f064_SOUND_RequestPlay_CPSD(k17_soundBUZZ, mapX, mapY, k1_soundModePlayIfPrioritized); @@ -2049,7 +2049,7 @@ void GroupMan::f225_fuseAction(uint16 mapX, uint16 mapY) { } } if (f223_isSquareACorridorTeleporterPitOrDoor(L0548_i_MapX, L0549_i_MapY)) { - if (!_vm->_movsens->f267_getMoveResult(L0555_T_LordChaosThing, mapX, mapY, L0548_i_MapX, L0549_i_MapY)) { + if (!_vm->_moveSens->f267_getMoveResult(L0555_T_LordChaosThing, mapX, mapY, L0548_i_MapX, L0549_i_MapY)) { f180_startWanedring(L0548_i_MapX, L0549_i_MapY); } return; -- cgit v1.2.3