DM: Rename functions and class members of GroupMan
This commit is contained in:
parent
6a02a571cd
commit
5c81e4f4fd
12 changed files with 413 additions and 416 deletions
|
@ -1072,7 +1072,7 @@ int16 ChampionMan::getDamagedChampionCount(uint16 attack, int16 wounds, int16 at
|
|||
int16 ChampionMan::getTargetChampionIndex(int16 mapX, int16 mapY, uint16 cell) {
|
||||
if (_partyChampionCount && (getDistance(mapX, mapY, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY) <= 1)) {
|
||||
signed char orderedCellsToAttack[4];
|
||||
_vm->_groupMan->f229_setOrderedCellsToAttack(orderedCellsToAttack, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, mapX, mapY, cell);
|
||||
_vm->_groupMan->setOrderedCellsToAttack(orderedCellsToAttack, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, mapX, mapY, cell);
|
||||
for (uint16 i = 0; i < 4; i++) {
|
||||
int16 championIndex = getIndexInCell(orderedCellsToAttack[i]);
|
||||
if (championIndex >= 0)
|
||||
|
|
|
@ -365,10 +365,10 @@ void DMEngine::startGame() {
|
|||
}
|
||||
|
||||
void DMEngine::processNewPartyMap(uint16 mapIndex) {
|
||||
_groupMan->f194_removeAllActiveGroups();
|
||||
_groupMan->removeAllActiveGroups();
|
||||
_dungeonMan->setCurrentMapAndPartyMap(mapIndex);
|
||||
_displayMan->loadCurrentMapGraphics();
|
||||
_groupMan->f195_addAllActiveGroups();
|
||||
_groupMan->addAllActiveGroups();
|
||||
_inventoryMan->f337_setDungeonViewPalette();
|
||||
}
|
||||
|
||||
|
@ -972,7 +972,7 @@ void DMEngine::fuseSequnce() {
|
|||
L1431_i_LordChaosMapX = _dungeonMan->_partyMapX;
|
||||
L1432_i_LordChaosMapY = _dungeonMan->_partyMapY;
|
||||
L1431_i_LordChaosMapX += _dirIntoStepCountEast[_dungeonMan->_partyDir], L1432_i_LordChaosMapY += _dirIntoStepCountNorth[_dungeonMan->_partyDir];
|
||||
L1428_ps_Group = (Group*)_dungeonMan->getThingData(L1433_T_LordChaosThing = _groupMan->f175_groupGetThing(L1431_i_LordChaosMapX, L1432_i_LordChaosMapY));
|
||||
L1428_ps_Group = (Group*)_dungeonMan->getThingData(L1433_T_LordChaosThing = _groupMan->groupGetThing(L1431_i_LordChaosMapX, L1432_i_LordChaosMapY));
|
||||
L1428_ps_Group->_health[0] = 10000;
|
||||
_dungeonMan->setGroupCells(L1428_ps_Group, k255_CreatureTypeSingleCenteredCreature, _dungeonMan->_partyMapIndex);
|
||||
_dungeonMan->setGroupDirections(L1428_ps_Group, returnOppositeDir(_dungeonMan->_partyDir), _dungeonMan->_partyMapIndex);
|
||||
|
@ -1028,8 +1028,8 @@ T0446002:
|
|||
fuseSequenceUpdate();
|
||||
for (AL1424_i_MapX = 0; AL1424_i_MapX < _dungeonMan->_currMapWidth; AL1424_i_MapX++) {
|
||||
for (AL1425_i_MapY = 0; AL1425_i_MapY < _dungeonMan->_currMapHeight; AL1425_i_MapY++) {
|
||||
if (((L1427_T_Thing = _groupMan->f175_groupGetThing(AL1424_i_MapX, AL1425_i_MapY)) != Thing::_endOfList) && ((AL1424_i_MapX != L1431_i_LordChaosMapX) || (AL1425_i_MapY != L1432_i_LordChaosMapY))) {
|
||||
_groupMan->f189_delete(AL1424_i_MapX, AL1425_i_MapY);
|
||||
if (((L1427_T_Thing = _groupMan->groupGetThing(AL1424_i_MapX, AL1425_i_MapY)) != Thing::_endOfList) && ((AL1424_i_MapX != L1431_i_LordChaosMapX) || (AL1425_i_MapY != L1432_i_LordChaosMapY))) {
|
||||
_groupMan->groupDelete(AL1424_i_MapX, AL1425_i_MapY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1448,8 +1448,8 @@ Thing DungeonMan::getDiscardThing(uint16 thingType) {
|
|||
case k14_ProjectileThingType:
|
||||
setCurrentMap(mapIndex);
|
||||
if (thingType == k4_GroupThingType) {
|
||||
_vm->_groupMan->f188_dropGroupPossessions(currMapX, currMapY, squareThing, kM1_soundModeDoNotPlaySound);
|
||||
_vm->_groupMan->f189_delete(currMapX, currMapY);
|
||||
_vm->_groupMan->dropGroupPossessions(currMapX, currMapY, squareThing, kM1_soundModeDoNotPlaySound);
|
||||
_vm->_groupMan->groupDelete(currMapX, currMapY);
|
||||
} else {
|
||||
_vm->_projexpl->f214_projectileDeleteEvent(squareThing);
|
||||
unlinkThingFromList(squareThing, Thing(0), currMapX, currMapY);
|
||||
|
@ -1515,14 +1515,14 @@ uint16 DungeonMan::getCreatureAttributes(Thing thing) {
|
|||
|
||||
void DungeonMan::setGroupCells(Group* group, uint16 cells, uint16 mapIndex) {
|
||||
if (mapIndex == _partyMapIndex)
|
||||
_vm->_groupMan->_g375_activeGroups[group->getActiveGroupIndex()]._cells = cells;
|
||||
_vm->_groupMan->_activeGroups[group->getActiveGroupIndex()]._cells = cells;
|
||||
else
|
||||
group->_cells = cells;
|
||||
}
|
||||
|
||||
void DungeonMan::setGroupDirections(Group* group, int16 dir, uint16 mapIndex) {
|
||||
if (mapIndex == _partyMapIndex)
|
||||
_vm->_groupMan->_g375_activeGroups[group->getActiveGroupIndex()]._directions = (Direction)dir;
|
||||
_vm->_groupMan->_activeGroups[group->getActiveGroupIndex()]._directions = (Direction)dir;
|
||||
else
|
||||
group->setDir(normalizeModulo4(dir));
|
||||
}
|
||||
|
|
|
@ -1016,9 +1016,9 @@ void EventManager::commandMoveParty(CommandType cmdType) {
|
|||
if (damage)
|
||||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k18_soundPARTY_DAMAGED, partyMapX, partyMapY, k0_soundModePlayImmediately);
|
||||
} else {
|
||||
isMovementBlocked = (_vm->_groupMan->f175_groupGetThing(partyMapX, partyMapY) != Thing::_endOfList);
|
||||
isMovementBlocked = (_vm->_groupMan->groupGetThing(partyMapX, partyMapY) != Thing::_endOfList);
|
||||
if (isMovementBlocked)
|
||||
_vm->_groupMan->f209_processEvents29to41(partyMapX, partyMapY, kM1_TMEventTypeCreateReactionEvent31ParyIsAdjacent, 0);
|
||||
_vm->_groupMan->processEvents29to41(partyMapX, partyMapY, kM1_TMEventTypeCreateReactionEvent31ParyIsAdjacent, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1347,10 +1347,10 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
|
|||
int16 mapY = _vm->_dungeonMan->_partyMapY;
|
||||
if (viewCell >= k2_ViewCellBackRight) {
|
||||
mapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_partyDir], mapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_partyDir];
|
||||
Thing groupThing = _vm->_groupMan->f175_groupGetThing(mapX, mapY);
|
||||
Thing groupThing = _vm->_groupMan->groupGetThing(mapX, mapY);
|
||||
if ((groupThing != Thing::_endOfList) &&
|
||||
!_vm->_moveSens->f264_isLevitating(groupThing) &&
|
||||
_vm->_groupMan->f176_getCreatureOrdinalInCell((Group*)_vm->_dungeonMan->getThingData(groupThing), normalizeModulo4(viewCell + _vm->_dungeonMan->_partyDir))) {
|
||||
_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 */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3234,14 +3234,14 @@ T0115015_DrawProjectileAsObject:
|
|||
ActiveGroup *activeGroup;
|
||||
if (group == nullptr) { /* If all creature data and info has not already been gathered */
|
||||
group = (Group*)_vm->_dungeonMan->getThingData(groupThing);
|
||||
activeGroup = &_vm->_groupMan->_g375_activeGroups[group->getActiveGroupIndex()];
|
||||
activeGroup = &_vm->_groupMan->_activeGroups[group->getActiveGroupIndex()];
|
||||
CreatureInfo *creatureInfo = &g243_CreatureInfo[group->_type];
|
||||
creatureAspectStruct = &_creatureAspects219[creatureInfo->_creatureAspectIndex];
|
||||
creatureSize = getFlag(creatureInfo->_attributes, k0x0003_MaskCreatureInfo_size);
|
||||
creatureGraphicInfoGreen = creatureInfo->_graphicInfo;
|
||||
}
|
||||
objectAspect = (ObjectAspect*)creatureAspectStruct;
|
||||
AL_0_creatureIndexRed = _vm->_groupMan->f176_getCreatureOrdinalInCell(group, cellYellowBear);
|
||||
AL_0_creatureIndexRed = _vm->_groupMan->getCreatureOrdinalInCell(group, cellYellowBear);
|
||||
|
||||
if (AL_0_creatureIndexRed) { /* If there is a creature on the cell being processed */
|
||||
AL_0_creatureIndexRed--; /* Convert ordinal to index */
|
||||
|
@ -3252,7 +3252,7 @@ T0115015_DrawProjectileAsObject:
|
|||
} else
|
||||
goto T0115129_DrawProjectiles; /* No creature to draw at cell, skip to projectiles */
|
||||
|
||||
creatureDirectionDelta = normalizeModulo4(directionParam - _vm->_groupMan->M50_getCreatureValue(activeGroup->_directions, AL_0_creatureIndexRed));
|
||||
creatureDirectionDelta = normalizeModulo4(directionParam - _vm->_groupMan->getCreatureValue(activeGroup->_directions, AL_0_creatureIndexRed));
|
||||
twoHalfSquareCreaturesFrontView = false;
|
||||
if ((AL_4_groupCells = activeGroup->_cells) == k255_CreatureTypeSingleCenteredCreature) { /* If there is a single centered creature in the group */
|
||||
if (remainingViewCellOrdinalsToProcess || (doorFrontViewDrawingPass == 1))
|
||||
|
@ -3281,7 +3281,7 @@ T0115015_DrawProjectileAsObject:
|
|||
creatureIndexGreen = 0;
|
||||
|
||||
twoHalfSquareCreaturesFrontView = group->getCount();
|
||||
if (((AL_4_groupCells = _vm->_groupMan->M50_getCreatureValue(AL_4_groupCells, AL_0_creatureIndexRed)) == directionParam) || (AL_4_groupCells == returnPrevVal(directionParam)))
|
||||
if (((AL_4_groupCells = _vm->_groupMan->getCreatureValue(AL_4_groupCells, AL_0_creatureIndexRed)) == directionParam) || (AL_4_groupCells == returnPrevVal(directionParam)))
|
||||
AL_2_viewCell = k0_HalfSizedViewCell_LeftColumn;
|
||||
else
|
||||
AL_2_viewCell = k1_HalfSizedViewCell_RightColumn;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,6 @@
|
|||
* maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DM_GROUP_H
|
||||
#define DM_GROUP_H
|
||||
|
||||
|
@ -155,101 +154,99 @@ int32 M32_setTime(int32 &map_time, int32 time); // @ M32_SET_TIME
|
|||
|
||||
class GroupMan {
|
||||
DMEngine *_vm;
|
||||
byte _g392_dropMovingCreatureFixedPossessionsCell[4]; // @ G0392_auc_DropMovingCreatureFixedPossessionsCells
|
||||
uint16 _g391_dropMovingCreatureFixedPossCellCount; // @ G0391_ui_DropMovingCreatureFixedPossessionsCellCount
|
||||
uint16 _g386_fluxCageCount; // @ G0386_ui_FluxCageCount
|
||||
int16 _g385_fluxCages[4]; // @ G0385_ac_FluxCages
|
||||
int16 _g378_currentGroupMapX; // @ G0378_i_CurrentGroupMapX
|
||||
int16 _g379_currentGroupMapY; // @ G0379_i_CurrentGroupMapY
|
||||
Thing _g380_currGroupThing; // @ G0380_T_CurrentGroupThing
|
||||
int16 _g384_groupMovementTestedDirections[4]; // @ G0384_auc_GroupMovementTestedDirections
|
||||
uint16 _g381_currGroupDistanceToParty; // @ G0381_ui_CurrentGroupDistanceToParty
|
||||
int16 _g382_currGroupPrimaryDirToParty; // @ G0382_i_CurrentGroupPrimaryDirectionToParty
|
||||
int16 _g383_currGroupSecondaryDirToParty; // @ G0383_i_CurrentGroupSecondaryDirectionToParty
|
||||
byte _dropMovingCreatureFixedPossessionsCell[4]; // @ G0392_auc_DropMovingCreatureFixedPossessionsCells
|
||||
uint16 _dropMovingCreatureFixedPossCellCount; // @ G0391_ui_DropMovingCreatureFixedPossessionsCellCount
|
||||
uint16 _fluxCageCount; // @ G0386_ui_FluxCageCount
|
||||
int16 _fluxCages[4]; // @ G0385_ac_FluxCages
|
||||
int16 _currentGroupMapX; // @ G0378_i_CurrentGroupMapX
|
||||
int16 _currentGroupMapY; // @ G0379_i_CurrentGroupMapY
|
||||
Thing _currGroupThing; // @ G0380_T_CurrentGroupThing
|
||||
int16 _groupMovementTestedDirections[4]; // @ G0384_auc_GroupMovementTestedDirections
|
||||
uint16 _currGroupDistanceToParty; // @ G0381_ui_CurrentGroupDistanceToParty
|
||||
int16 _currGroupPrimaryDirToParty; // @ G0382_i_CurrentGroupPrimaryDirectionToParty
|
||||
int16 _currGroupSecondaryDirToParty; // @ G0383_i_CurrentGroupSecondaryDirectionToParty
|
||||
|
||||
Thing _g388_groupMovementBlockedByGroupThing; // @ G0388_T_GroupMovementBlockedByGroupThing
|
||||
bool _g389_groupMovementBlockedByDoor; // @ G0389_B_GroupMovementBlockedByDoor
|
||||
bool _g390_groupMovementBlockedByParty; // @ G0390_B_GroupMovementBlockedByParty
|
||||
bool _g387_groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter; // @ G0387_B_GroupMovementBlockedByWallStairsPitFakeWallFluxcageTeleporter
|
||||
int32 _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime; // @ G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime
|
||||
Thing _groupMovementBlockedByGroupThing; // @ G0388_T_GroupMovementBlockedByGroupThing
|
||||
bool _groupMovementBlockedByDoor; // @ G0389_B_GroupMovementBlockedByDoor
|
||||
bool _groupMovementBlockedByParty; // @ G0390_B_GroupMovementBlockedByParty
|
||||
bool _groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter; // @ G0387_B_GroupMovementBlockedByWallStairsPitFakeWallFluxcageTeleporter
|
||||
int32 twoHalfSquareSizedCreaturesGroupLastDirectionSetTime; // @ G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime
|
||||
public:
|
||||
uint16 _g376_maxActiveGroupCount; // @ G0376_ui_MaximumActiveGroupCount
|
||||
ActiveGroup *_g375_activeGroups; // @ G0375_ps_ActiveGroups
|
||||
uint16 _g377_currActiveGroupCount; // @ G0377_ui_CurrentActiveGroupCount
|
||||
uint16 _maxActiveGroupCount; // @ G0376_ui_MaximumActiveGroupCount
|
||||
ActiveGroup *_activeGroups; // @ G0375_ps_ActiveGroups
|
||||
uint16 _currActiveGroupCount; // @ G0377_ui_CurrentActiveGroupCount
|
||||
explicit GroupMan(DMEngine *vm);
|
||||
~GroupMan();
|
||||
|
||||
void f196_initActiveGroups(); // @ F0196_GROUP_InitializeActiveGroups
|
||||
uint16 f145_getGroupCells(Group *group, int16 mapIndex); // @ F0145_DUNGEON_GetGroupCells
|
||||
uint16 f147_getGroupDirections(Group *group, int16 mapIndex); // @ F0147_DUNGEON_GetGroupDirections
|
||||
int16 f176_getCreatureOrdinalInCell(Group *group, uint16 cell); // @ F0176_GROUP_GetCreatureOrdinalInCell
|
||||
uint16 M50_getCreatureValue(uint16 groupVal, uint16 creatureIndex); // @ M50_CREATURE_VALUE
|
||||
void f188_dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThing, int16 mode); // @ F0188_GROUP_DropGroupPossessions
|
||||
void f186_dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int16 mapY, uint16 cell,
|
||||
void initActiveGroups(); // @ F0196_GROUP_InitializeActiveGroups
|
||||
uint16 getGroupCells(Group *group, int16 mapIndex); // @ F0145_DUNGEON_GetGroupCells
|
||||
uint16 getGroupDirections(Group *group, int16 mapIndex); // @ F0147_DUNGEON_GetGroupDirections
|
||||
int16 getCreatureOrdinalInCell(Group *group, uint16 cell); // @ F0176_GROUP_GetCreatureOrdinalInCell
|
||||
uint16 getCreatureValue(uint16 groupVal, uint16 creatureIndex); // @ M50_CREATURE_VALUE
|
||||
void dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThing, int16 mode); // @ F0188_GROUP_DropGroupPossessions
|
||||
void dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int16 mapY, uint16 cell,
|
||||
int16 mode); // @ F0186_GROUP_DropCreatureFixedPossessions
|
||||
int16 f228_getDirsWhereDestIsVisibleFromSource(int16 srcMapX, int16 srcMapY,
|
||||
int16 getDirsWhereDestIsVisibleFromSource(int16 srcMapX, int16 srcMapY,
|
||||
int16 destMapX, int16 destMapY); // @ F0228_GROUP_GetDirectionsWhereDestinationIsVisibleFromSource
|
||||
bool f227_isDestVisibleFromSource(uint16 dir, int16 srcMapX, int16 srcMapY, int16 destMapX,
|
||||
bool isDestVisibleFromSource(uint16 dir, int16 srcMapX, int16 srcMapY, int16 destMapX,
|
||||
int16 destMapY); // @ F0227_GROUP_IsDestinationVisibleFromSource
|
||||
bool f232_groupIsDoorDestoryedByAttack(uint16 mapX, uint16 mapY, int16 attack,
|
||||
bool groupIsDoorDestoryedByAttack(uint16 mapX, uint16 mapY, int16 attack,
|
||||
bool magicAttack, int16 ticks); // @ F0232_GROUP_IsDoorDestroyedByAttack
|
||||
Thing f175_groupGetThing(int16 mapX, int16 mapY); // @ F0175_GROUP_GetThing
|
||||
int16 f190_groupGetDamageCreatureOutcome(Group *group, uint16 creatureIndex,
|
||||
Thing groupGetThing(int16 mapX, int16 mapY); // @ F0175_GROUP_GetThing
|
||||
int16 groupGetDamageCreatureOutcome(Group *group, uint16 creatureIndex,
|
||||
int16 mapX, int16 mapY, int16 damage, bool notMoving); // @ F0190_GROUP_GetDamageCreatureOutcome
|
||||
void f189_delete(int16 mapX, int16 mapY); // @ F0189_GROUP_Delete
|
||||
void f181_groupDeleteEvents(int16 mapX, int16 mapY); // @ F0181_GROUP_DeleteEvents
|
||||
uint16 f178_getGroupValueUpdatedWithCreatureValue(uint16 groupVal, uint16 creatureIndex, uint16 creatreVal); // @ F0178_GROUP_GetGroupValueUpdatedWithCreatureValue
|
||||
int16 f191_getDamageAllCreaturesOutcome(Group *group, int16 mapX, int16 mapY, int16 attack, bool notMoving); // @ F0191_GROUP_GetDamageAllCreaturesOutcome
|
||||
int16 f192_groupGetResistanceAdjustedPoisonAttack(uint16 creatreType, int16 poisonAttack); // @ F0192_GROUP_GetResistanceAdjustedPoisonAttack
|
||||
void f209_processEvents29to41(int16 eventMapX, int16 eventMapY, int16 eventType, uint16 ticks); // @ F0209_GROUP_ProcessEvents29to41
|
||||
bool f202_isMovementPossible(CreatureInfo *creatureInfo, int16 mapX, int16 mapY,
|
||||
void groupDelete(int16 mapX, int16 mapY); // @ F0189_GROUP_Delete
|
||||
void groupDeleteEvents(int16 mapX, int16 mapY); // @ F0181_GROUP_DeleteEvents
|
||||
uint16 getGroupValueUpdatedWithCreatureValue(uint16 groupVal, uint16 creatureIndex, uint16 creatreVal); // @ F0178_GROUP_GetGroupValueUpdatedWithCreatureValue
|
||||
int16 getDamageAllCreaturesOutcome(Group *group, int16 mapX, int16 mapY, int16 attack, bool notMoving); // @ F0191_GROUP_GetDamageAllCreaturesOutcome
|
||||
int16 groupGetResistanceAdjustedPoisonAttack(uint16 creatreType, int16 poisonAttack); // @ F0192_GROUP_GetResistanceAdjustedPoisonAttack
|
||||
void processEvents29to41(int16 eventMapX, int16 eventMapY, int16 eventType, uint16 ticks); // @ F0209_GROUP_ProcessEvents29to41
|
||||
bool isMovementPossible(CreatureInfo *creatureInfo, int16 mapX, int16 mapY,
|
||||
uint16 dir, bool allowMovementOverImaginaryPitsAndFakeWalls); // @ F0202_GROUP_IsMovementPossible
|
||||
int16 f226_getDistanceBetweenSquares(int16 srcMapX, int16 srcMapY, int16 destMapX,
|
||||
int16 getDistanceBetweenSquares(int16 srcMapX, int16 srcMapY, int16 destMapX,
|
||||
int16 destMapY); // @ F0226_GROUP_GetDistanceBetweenSquares
|
||||
|
||||
int16 f200_groupGetDistanceToVisibleParty(Group *group, int16 creatureIndex, int16 mapX, int16 mapY); // @ F0200_GROUP_GetDistanceToVisibleParty
|
||||
int16 f199_getDistanceBetweenUnblockedSquares(int16 srcMapX, int16 srcMapY,
|
||||
int16 groupGetDistanceToVisibleParty(Group *group, int16 creatureIndex, int16 mapX, int16 mapY); // @ F0200_GROUP_GetDistanceToVisibleParty
|
||||
int16 getDistanceBetweenUnblockedSquares(int16 srcMapX, int16 srcMapY,
|
||||
int16 destMapX, int16 destMapY, bool (GroupMan::*isBlocked)(uint16, uint16)); // @ F0199_GROUP_GetDistanceBetweenUnblockedSquares
|
||||
bool f197_isViewPartyBlocked(uint16 mapX, uint16 mapY); // @ F0197_GROUP_IsViewPartyBlocked
|
||||
int32 f179_getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 creatureIndex,
|
||||
bool isViewPartyBlocked(uint16 mapX, uint16 mapY); // @ F0197_GROUP_IsViewPartyBlocked
|
||||
int32 getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 creatureIndex,
|
||||
bool isAttacking); // @ F0179_GROUP_GetCreatureAspectUpdateTime
|
||||
void f205_setDirection(ActiveGroup *activeGroup, int16 dir, int16 creatureIndex, bool twoHalfSquareSizedCreatures); // @ F0205_GROUP_SetDirection
|
||||
void f208_groupAddEvent(TimelineEvent *event, uint32 time); // @ F0208_GROUP_AddEvent
|
||||
int16 f201_getSmelledPartyPrimaryDirOrdinal(CreatureInfo *creatureInfo, int16 mapY, int16 mapX); // @ F0201_GROUP_GetSmelledPartyPrimaryDirectionOrdinal
|
||||
bool f198_isSmellPartyBlocked(uint16 mapX, uint16 mapY); // @ F0198_GROUP_IsSmellPartyBlocked
|
||||
int16 f203_getFirstPossibleMovementDirOrdinal(CreatureInfo *info, int16 mapX, int16 mapY,
|
||||
void setGroupDirection(ActiveGroup *activeGroup, int16 dir, int16 creatureIndex, bool twoHalfSquareSizedCreatures); // @ F0205_GROUP_SetDirection
|
||||
void addGroupEvent(TimelineEvent *event, uint32 time); // @ F0208_GROUP_AddEvent
|
||||
int16 getSmelledPartyPrimaryDirOrdinal(CreatureInfo *creatureInfo, int16 mapY, int16 mapX); // @ F0201_GROUP_GetSmelledPartyPrimaryDirectionOrdinal
|
||||
bool isSmellPartyBlocked(uint16 mapX, uint16 mapY); // @ F0198_GROUP_IsSmellPartyBlocked
|
||||
int16 getFirstPossibleMovementDirOrdinal(CreatureInfo *info, int16 mapX, int16 mapY,
|
||||
bool allowMovementOverImaginaryPitsAndFakeWalls); // @ F0203_GROUP_GetFirstPossibleMovementDirectionOrdinal
|
||||
void f206_groupSetDirGroup(ActiveGroup *activeGroup, int16 dir, int16 creatureIndex,
|
||||
void setDirGroup(ActiveGroup *activeGroup, int16 dir, int16 creatureIndex,
|
||||
int16 creatureSize); // @ F0206_GROUP_SetDirectionGroup
|
||||
void f182_stopAttacking(ActiveGroup *group, int16 mapX, int16 mapY);// @ F0182_GROUP_StopAttacking
|
||||
bool f204_isArchenemyDoubleMovementPossible(CreatureInfo *info, int16 mapX, int16 mapY, uint16 dir); // @ F0204_GROUP_IsArchenemyDoubleMovementPossible
|
||||
bool f207_isCreatureAttacking(Group *group, int16 mapX, int16 mapY, uint16 creatureIndex); // @ F0207_GROUP_IsCreatureAttacking
|
||||
void f229_setOrderedCellsToAttack(signed char * orderedCellsToAttack, int16 targetMapX,
|
||||
void stopAttacking(ActiveGroup *group, int16 mapX, int16 mapY);// @ F0182_GROUP_StopAttacking
|
||||
bool isArchenemyDoubleMovementPossible(CreatureInfo *info, int16 mapX, int16 mapY, uint16 dir); // @ F0204_GROUP_IsArchenemyDoubleMovementPossible
|
||||
bool isCreatureAttacking(Group *group, int16 mapX, int16 mapY, uint16 creatureIndex); // @ F0207_GROUP_IsCreatureAttacking
|
||||
void setOrderedCellsToAttack(signed char * orderedCellsToAttack, int16 targetMapX,
|
||||
int16 targetMapY, int16 attackerMapX, int16 attackerMapY, uint16 cellSource); // @ F0229_GROUP_SetOrderedCellsToAttack
|
||||
void f193_stealFromChampion(Group *group, uint16 championIndex); // @ F0193_GROUP_StealFromChampion
|
||||
int16 f230_getChampionDamage(Group *group, uint16 champIndex); // @ F0230_GROUP_GetChampionDamage
|
||||
void f187_dropMovingCreatureFixedPossession(Thing thing, int16 mapX, int16 mapY); // @ F0187_GROUP_DropMovingCreatureFixedPossessions
|
||||
void f180_startWanedring(int16 mapX, int16 mapY); // @ F0180_GROUP_StartWandering
|
||||
void f183_addActiveGroup(Thing thing, int16 mapX, int16 mapY); // @ F0183_GROUP_AddActiveGroup
|
||||
void f184_removeActiveGroup(uint16 activeGroupIndex); // @ F0184_GROUP_RemoveActiveGroup
|
||||
void f194_removeAllActiveGroups(); // @ F0194_GROUP_RemoveAllActiveGroups
|
||||
void f195_addAllActiveGroups(); // @ F0195_GROUP_AddAllActiveGroups
|
||||
Thing f185_groupGetGenerated(int16 creatureType, int16 healthMultiplier, uint16 creatureCount, Direction dir, int16 mapX, int16 mapY); // @ F0185_GROUP_GetGenerated
|
||||
bool f223_isSquareACorridorTeleporterPitOrDoor(int16 mapX, int16 mapY); // @ F0223_GROUP_IsSquareACorridorTeleporterPitOrDoor
|
||||
int16 f177_getMeleeTargetCreatureOrdinal(int16 groupX, int16 groupY, int16 partyX, int16 paryY,
|
||||
void stealFromChampion(Group *group, uint16 championIndex); // @ F0193_GROUP_StealFromChampion
|
||||
int16 getChampionDamage(Group *group, uint16 champIndex); // @ F0230_GROUP_GetChampionDamage
|
||||
void dropMovingCreatureFixedPossession(Thing thing, int16 mapX, int16 mapY); // @ F0187_GROUP_DropMovingCreatureFixedPossessions
|
||||
void startWanedring(int16 mapX, int16 mapY); // @ F0180_GROUP_StartWandering
|
||||
void addActiveGroup(Thing thing, int16 mapX, int16 mapY); // @ F0183_GROUP_AddActiveGroup
|
||||
void removeActiveGroup(uint16 activeGroupIndex); // @ F0184_GROUP_RemoveActiveGroup
|
||||
void removeAllActiveGroups(); // @ F0194_GROUP_RemoveAllActiveGroups
|
||||
void addAllActiveGroups(); // @ F0195_GROUP_AddAllActiveGroups
|
||||
Thing groupGetGenerated(int16 creatureType, int16 healthMultiplier, uint16 creatureCount, Direction dir, int16 mapX, int16 mapY); // @ F0185_GROUP_GetGenerated
|
||||
bool isSquareACorridorTeleporterPitOrDoor(int16 mapX, int16 mapY); // @ F0223_GROUP_IsSquareACorridorTeleporterPitOrDoor
|
||||
int16 getMeleeTargetCreatureOrdinal(int16 groupX, int16 groupY, int16 partyX, int16 paryY,
|
||||
uint16 champCell); // @ F0177_GROUP_GetMeleeTargetCreatureOrdinal
|
||||
int16 f231_getMeleeActionDamage(Champion *champ, int16 champIndex, Group *group, int16 creatureIndex,
|
||||
int16 getMeleeActionDamage(Champion *champ, int16 champIndex, Group *group, int16 creatureIndex,
|
||||
int16 mapX, int16 mapY, uint16 actionHitProbability, uint16 actionDamageFactor, int16 skillIndex); // @ F0231_GROUP_GetMeleeActionDamage
|
||||
void f224_fluxCageAction(int16 mapX, int16 mapY); // @ F0224_GROUP_FluxCageAction
|
||||
uint16 f222_isLordChaosOnSquare(int16 mapX, int16 mapY); // @ F0222_GROUP_IsLordChaosOnSquare
|
||||
bool f221_isFluxcageOnSquare(int16 mapX, int16 mapY); // @ F0221_GROUP_IsFluxcageOnSquare
|
||||
void f225_fuseAction(uint16 mapX, uint16 mapY); // @ F0225_GROUP_FuseAction
|
||||
void save1_ActiveGroupPart(Common::OutSaveFile *file);
|
||||
void load1_ActiveGroupPart(Common::InSaveFile* file);
|
||||
void fluxCageAction(int16 mapX, int16 mapY); // @ F0224_GROUP_FluxCageAction
|
||||
uint16 isLordChaosOnSquare(int16 mapX, int16 mapY); // @ F0222_GROUP_IsLordChaosOnSquare
|
||||
bool isFluxcageOnSquare(int16 mapX, int16 mapY); // @ F0221_GROUP_IsFluxcageOnSquare
|
||||
void fuseAction(uint16 mapX, uint16 mapY); // @ F0225_GROUP_FuseAction
|
||||
void saveActiveGroupPart(Common::OutSaveFile *file);
|
||||
void loadActiveGroupPart(Common::InSaveFile* file);
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -102,20 +102,20 @@ LoadgameResponse DMEngine::loadgame(int16 slot) {
|
|||
_timeline->_g372_eventCount = file->readUint16BE();
|
||||
_timeline->_g373_firstUnusedEventIndex = file->readUint16BE();
|
||||
_timeline->_g369_eventMaxCount = file->readUint16BE();
|
||||
_groupMan->_g377_currActiveGroupCount = file->readUint16BE();
|
||||
_groupMan->_currActiveGroupCount = file->readUint16BE();
|
||||
_projexpl->_g361_lastCreatureAttackTime = file->readSint32BE();
|
||||
_projexpl->_g362_lastPartyMovementTime = file->readSint32BE();
|
||||
_disabledMovementTicks = file->readSint16BE();
|
||||
_projectileDisableMovementTicks = file->readSint16BE();
|
||||
_lastProjectileDisabledMovementDirection = file->readSint16BE();
|
||||
_championMan->_leaderHandObject = Thing(file->readUint16BE());
|
||||
_groupMan->_g376_maxActiveGroupCount = file->readUint16BE();
|
||||
_groupMan->_maxActiveGroupCount = file->readUint16BE();
|
||||
if (!_restartGameRequest) {
|
||||
_timeline->f233_initTimeline();
|
||||
_groupMan->f196_initActiveGroups();
|
||||
_groupMan->initActiveGroups();
|
||||
}
|
||||
|
||||
_groupMan->load1_ActiveGroupPart(file);
|
||||
_groupMan->loadActiveGroupPart(file);
|
||||
_championMan->loadPartyPart2(file);
|
||||
_timeline->load3_eventsPart(file);
|
||||
_timeline->load4_timelinePart(file);
|
||||
|
@ -130,7 +130,7 @@ LoadgameResponse DMEngine::loadgame(int16 slot) {
|
|||
|
||||
if (_newGameFl) {
|
||||
_timeline->f233_initTimeline();
|
||||
_groupMan->f196_initActiveGroups();
|
||||
_groupMan->initActiveGroups();
|
||||
|
||||
if (L1366_B_FadePalette) {
|
||||
_displayMan->startEndFadeToPalette(_displayMan->_blankBuffer);
|
||||
|
@ -318,17 +318,17 @@ bool DMEngine::writeCompleteSaveFile(int16 saveSlot, Common::String& saveDescrip
|
|||
file->writeUint16BE(_timeline->_g372_eventCount);
|
||||
file->writeUint16BE(_timeline->_g373_firstUnusedEventIndex);
|
||||
file->writeUint16BE(_timeline->_g369_eventMaxCount);
|
||||
file->writeUint16BE(_groupMan->_g377_currActiveGroupCount);
|
||||
file->writeUint16BE(_groupMan->_currActiveGroupCount);
|
||||
file->writeSint32BE(_projexpl->_g361_lastCreatureAttackTime);
|
||||
file->writeSint32BE(_projexpl->_g362_lastPartyMovementTime);
|
||||
file->writeSint16BE(_disabledMovementTicks);
|
||||
file->writeSint16BE(_projectileDisableMovementTicks);
|
||||
file->writeSint16BE(_lastProjectileDisabledMovementDirection);
|
||||
file->writeUint16BE(_championMan->_leaderHandObject.toUint16());
|
||||
file->writeUint16BE(_groupMan->_g376_maxActiveGroupCount);
|
||||
file->writeUint16BE(_groupMan->_maxActiveGroupCount);
|
||||
|
||||
// write C1_SAVE_PART_ACTIVE_GROUP part
|
||||
_groupMan->save1_ActiveGroupPart(file);
|
||||
_groupMan->saveActiveGroupPart(file);
|
||||
// write C2_SAVE_PART_PARTY part
|
||||
_championMan->savePartyPart2(file);
|
||||
// write C3_SAVE_PART_EVENTS part
|
||||
|
|
|
@ -1085,7 +1085,7 @@ bool MenuMan::f407_isActionPerformed(uint16 champIndex, int16 actionIndex) {
|
|||
L1251_i_MapX = _vm->_dungeonMan->_partyMapX;
|
||||
L1252_i_MapY = _vm->_dungeonMan->_partyMapY;
|
||||
L1251_i_MapX += _vm->_dirIntoStepCountEast[L1247_ps_Champion->_dir], L1252_i_MapY += _vm->_dirIntoStepCountNorth[L1247_ps_Champion->_dir];
|
||||
_g517_actionTargetGroupThing = _vm->_groupMan->f175_groupGetThing(L1251_i_MapX, L1252_i_MapY);
|
||||
_g517_actionTargetGroupThing = _vm->_groupMan->groupGetThing(L1251_i_MapX, L1252_i_MapY);
|
||||
L1249_ui_ActionDisabledTicks = G0491_auc_Graphic560_ActionDisabledTicks[actionIndex];
|
||||
L1254_i_ActionSkillIndex = g496_ActionSkillIndex[actionIndex];
|
||||
L1253_i_ActionStamina = G0494_auc_Graphic560_ActionStamina[actionIndex] + _vm->getRandomNumber(2);
|
||||
|
@ -1131,7 +1131,7 @@ T0407014:
|
|||
if ((Square(AL1244_ui_TargetSquare).getType() == k4_DoorElemType) && (Square(AL1244_ui_TargetSquare).getDoorState() == k4_doorState_CLOSED)) {
|
||||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, k1_soundModePlayIfPrioritized);
|
||||
L1249_ui_ActionDisabledTicks = 6;
|
||||
_vm->_groupMan->f232_groupIsDoorDestoryedByAttack(L1251_i_MapX, L1252_i_MapY, _vm->_championMan->getStrength(champIndex, k1_ChampionSlotActionHand), false, 2);
|
||||
_vm->_groupMan->groupIsDoorDestoryedByAttack(L1251_i_MapX, L1252_i_MapY, _vm->_championMan->getStrength(champIndex, k1_ChampionSlotActionHand), false, 2);
|
||||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, k2_soundModePlayOneTickLater);
|
||||
break;
|
||||
}
|
||||
|
@ -1239,14 +1239,14 @@ T0407032:
|
|||
}
|
||||
case k35_ChampionActionFluxcage:
|
||||
f406_setChampionDirectionToPartyDirection(L1247_ps_Champion);
|
||||
_vm->_groupMan->f224_fluxCageAction(L1251_i_MapX, L1252_i_MapY);
|
||||
_vm->_groupMan->fluxCageAction(L1251_i_MapX, L1252_i_MapY);
|
||||
break;
|
||||
case k43_ChampionActionFuse:
|
||||
f406_setChampionDirectionToPartyDirection(L1247_ps_Champion);
|
||||
L1251_i_MapX = _vm->_dungeonMan->_partyMapX;
|
||||
L1252_i_MapY = _vm->_dungeonMan->_partyMapY;
|
||||
L1251_i_MapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_partyDir], L1252_i_MapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_partyDir];
|
||||
_vm->_groupMan->f225_fuseAction(L1251_i_MapX, L1252_i_MapY);
|
||||
_vm->_groupMan->fuseAction(L1251_i_MapX, L1252_i_MapY);
|
||||
break;
|
||||
case k36_ChampionActionHeal:
|
||||
/* CHANGE2_17_IMPROVEMENT Heal action is much more effective
|
||||
|
@ -1283,7 +1283,7 @@ T0407032:
|
|||
L1251_i_MapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_partyDir];
|
||||
L1252_i_MapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_partyDir];
|
||||
/* 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->f175_groupGetThing(L1251_i_MapX, L1252_i_MapY) == Thing::_endOfList)) {
|
||||
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);
|
||||
|
@ -1472,7 +1472,7 @@ bool MenuMan::f402_isMeleeActionPerformed(int16 champIndex, Champion* champ, int
|
|||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, k1_soundModePlayIfPrioritized);
|
||||
if (_g517_actionTargetGroupThing == Thing::_endOfList)
|
||||
goto T0402010;
|
||||
L1238_i_CreatureOrdinal = _vm->_groupMan->f177_getMeleeTargetCreatureOrdinal(targetMapX, targetMapY, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, AL1236_ui_ChampionCell = champ->_cell);
|
||||
L1238_i_CreatureOrdinal = _vm->_groupMan->getMeleeTargetCreatureOrdinal(targetMapX, targetMapY, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, AL1236_ui_ChampionCell = champ->_cell);
|
||||
if (L1238_i_CreatureOrdinal) {
|
||||
switch (normalizeModulo4(AL1236_ui_ChampionCell + 4 - champ->_dir)) {
|
||||
case k2_ViewCellBackRight: /* Champion is on the back right of the square and tries to attack a creature in the front right of its square */
|
||||
|
@ -1493,7 +1493,7 @@ T0402005: /* Check if there is another champion in front */
|
|||
if ((_vm->_objectMan->f33_getIconIndex(champ->_slots[k1_ChampionSlotActionHand]) == k40_IconIndiceWeaponVorpalBlade) || (actionIndex == k24_ChampionActionDisrupt)) {
|
||||
setFlag(AL1237_ui_ActionHitProbability, k0x8000_hitNonMaterialCreatures);
|
||||
}
|
||||
_g513_actionDamage = _vm->_groupMan->f231_getMeleeActionDamage(champ, champIndex, (Group*)_vm->_dungeonMan->getThingData(_g517_actionTargetGroupThing), _vm->ordinalToIndex(L1238_i_CreatureOrdinal), targetMapX, targetMapY, AL1237_ui_ActionHitProbability, AL1236_ui_ActionDamageFactor, skillIndex);
|
||||
_g513_actionDamage = _vm->_groupMan->getMeleeActionDamage(champ, champIndex, (Group*)_vm->_dungeonMan->getThingData(_g517_actionTargetGroupThing), _vm->ordinalToIndex(L1238_i_CreatureOrdinal), targetMapX, targetMapY, AL1237_ui_ActionHitProbability, AL1236_ui_ActionDamageFactor, skillIndex);
|
||||
return true;
|
||||
}
|
||||
T0402010:
|
||||
|
@ -1540,10 +1540,10 @@ bool MenuMan::f401_isGroupFrightenedByAction(int16 champIndex, uint16 actionInde
|
|||
if (((L1230_ui_FearResistance = L1234_ps_CreatureInfo->getFearResistance()) > _vm->getRandomNumber(L1229_i_FrightAmount)) || (L1230_ui_FearResistance == k15_immuneToFear)) {
|
||||
L1231_ui_Experience >>= 1;
|
||||
} else {
|
||||
L1235_ps_ActiveGroup = &_vm->_groupMan->_g375_activeGroups[L1233_ps_Group->getActiveGroupIndex()];
|
||||
L1235_ps_ActiveGroup = &_vm->_groupMan->_activeGroups[L1233_ps_Group->getActiveGroupIndex()];
|
||||
if (L1233_ps_Group->getBehaviour() == k6_behavior_ATTACK) {
|
||||
_vm->_groupMan->f182_stopAttacking(L1235_ps_ActiveGroup, mapX, mapY);
|
||||
_vm->_groupMan->f180_startWanedring(mapX, mapY);
|
||||
_vm->_groupMan->stopAttacking(L1235_ps_ActiveGroup, mapX, mapY);
|
||||
_vm->_groupMan->startWanedring(mapX, mapY);
|
||||
}
|
||||
L1233_ps_Group->setBehaviour(k5_behavior_FLEE);
|
||||
L1235_ps_ActiveGroup->_delayFleeingFromTarget = ((16 - L1230_ui_FearResistance) << 2) / L1234_ps_CreatureInfo->_movementTicks;
|
||||
|
|
|
@ -361,13 +361,13 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
|
|||
} else {
|
||||
if (L0710_i_ThingType == k4_GroupThingType) {
|
||||
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
|
||||
AL0727_ui_Outcome = _vm->_groupMan->f191_getDamageAllCreaturesOutcome((Group *)_vm->_dungeonMan->getThingData(thing), mapX, mapY, 20, false);
|
||||
AL0727_ui_Outcome = _vm->_groupMan->getDamageAllCreaturesOutcome((Group *)_vm->_dungeonMan->getThingData(thing), mapX, mapY, 20, false);
|
||||
_vm->_dungeonMan->setCurrentMap(L0715_ui_MapIndexDestination);
|
||||
L0722_B_FallKilledGroup = (AL0727_ui_Outcome == k2_outcomeKilledAllCreaturesInGroup);
|
||||
if (L0722_B_FallKilledGroup)
|
||||
break;
|
||||
if (AL0727_ui_Outcome == k1_outcomeKilledSomeCreaturesInGroup) {
|
||||
_vm->_groupMan->f187_dropMovingCreatureFixedPossession(thing, destMapX, destMapY);
|
||||
_vm->_groupMan->dropMovingCreatureFixedPossession(thing, destMapX, destMapY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -389,11 +389,11 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
|
|||
}
|
||||
}
|
||||
if ((L0710_i_ThingType == k4_GroupThingType) && (L0722_B_FallKilledGroup || !_vm->_dungeonMan->isCreatureAllowedOnMap(thing, L0715_ui_MapIndexDestination))) {
|
||||
_vm->_groupMan->f187_dropMovingCreatureFixedPossession(thing, destMapX, destMapY);
|
||||
_vm->_groupMan->f188_dropGroupPossessions(destMapX, destMapY, thing, k2_soundModePlayOneTickLater);
|
||||
_vm->_groupMan->dropMovingCreatureFixedPossession(thing, destMapX, destMapY);
|
||||
_vm->_groupMan->dropGroupPossessions(destMapX, destMapY, thing, k2_soundModePlayOneTickLater);
|
||||
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
|
||||
if (mapX >= 0) {
|
||||
_vm->_groupMan->f189_delete(mapX, mapY);
|
||||
_vm->_groupMan->groupDelete(mapX, mapY);
|
||||
}
|
||||
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 */
|
||||
}
|
||||
|
@ -454,9 +454,9 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
|
|||
if (destMapX >= 0) {
|
||||
if (thing == Thing::_party) {
|
||||
_vm->_dungeonMan->setCurrentMap(L0715_ui_MapIndexDestination);
|
||||
if ((thing = _vm->_groupMan->f175_groupGetThing(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY)) != Thing::_endOfList) { /* Delete group if party moves onto its square */
|
||||
_vm->_groupMan->f188_dropGroupPossessions(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, thing, k1_soundModePlayIfPrioritized);
|
||||
_vm->_groupMan->f189_delete(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
|
||||
if ((thing = _vm->_groupMan->groupGetThing(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY)) != Thing::_endOfList) { /* Delete group if party moves onto its square */
|
||||
_vm->_groupMan->dropGroupPossessions(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, thing, k1_soundModePlayIfPrioritized);
|
||||
_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);
|
||||
|
@ -469,13 +469,13 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
|
|||
_vm->_dungeonMan->setCurrentMap(L0715_ui_MapIndexDestination);
|
||||
L0712_ps_Teleporter = (Teleporter *)_vm->_dungeonMan->getThingData(thing);
|
||||
AL0708_i_ActiveGroupIndex = ((Group *)L0712_ps_Teleporter)->getActiveGroupIndex();
|
||||
if (((L0715_ui_MapIndexDestination == _vm->_dungeonMan->_partyMapIndex) && (destMapX == _vm->_dungeonMan->_partyMapX) && (destMapY == _vm->_dungeonMan->_partyMapY)) || (_vm->_groupMan->f175_groupGetThing(destMapX, destMapY) != Thing::_endOfList)) { /* If a group tries to move to the party square or over another group then create an event to move the group later */
|
||||
if (((L0715_ui_MapIndexDestination == _vm->_dungeonMan->_partyMapIndex) && (destMapX == _vm->_dungeonMan->_partyMapX) && (destMapY == _vm->_dungeonMan->_partyMapY)) || (_vm->_groupMan->groupGetThing(destMapX, destMapY) != Thing::_endOfList)) { /* If a group tries to move to the party square or over another group then create an event to move the group later */
|
||||
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
|
||||
if (mapX >= 0) {
|
||||
_vm->_groupMan->f181_groupDeleteEvents(mapX, mapY);
|
||||
_vm->_groupMan->groupDeleteEvents(mapX, mapY);
|
||||
}
|
||||
if (L0721_B_GroupOnPartyMap) {
|
||||
_vm->_groupMan->f184_removeActiveGroup(AL0708_i_ActiveGroupIndex);
|
||||
_vm->_groupMan->removeActiveGroup(AL0708_i_ActiveGroupIndex);
|
||||
}
|
||||
f265_createEvent60to61_moveGroup(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 */
|
||||
|
@ -485,11 +485,11 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
|
|||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(L1638_ui_MovementSoundIndex, destMapX, destMapY, k1_soundModePlayIfPrioritized);
|
||||
}
|
||||
if (L0721_B_GroupOnPartyMap && (L0715_ui_MapIndexDestination != _vm->_dungeonMan->_partyMapIndex)) { /* If the group leaves the party map */
|
||||
_vm->_groupMan->f184_removeActiveGroup(AL0708_i_ActiveGroupIndex);
|
||||
_vm->_groupMan->removeActiveGroup(AL0708_i_ActiveGroupIndex);
|
||||
L0720_ui_MoveGroupResult = true;
|
||||
} else {
|
||||
if ((L0715_ui_MapIndexDestination == _vm->_dungeonMan->_partyMapIndex) && (!L0721_B_GroupOnPartyMap)) { /* If the group arrives on the party map */
|
||||
_vm->_groupMan->f183_addActiveGroup(thing, destMapX, destMapY);
|
||||
_vm->_groupMan->addActiveGroup(thing, destMapX, destMapY);
|
||||
L0720_ui_MoveGroupResult = true;
|
||||
}
|
||||
}
|
||||
|
@ -499,15 +499,15 @@ bool MovesensMan::f267_getMoveResult(Thing thing, int16 mapX, int16 mapY, int16
|
|||
f276_sensorProcessThingAdditionOrRemoval(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->f180_startWanedring(destMapX, destMapY);
|
||||
_vm->_groupMan->startWanedring(destMapX, destMapY);
|
||||
}
|
||||
_vm->_dungeonMan->setCurrentMap(L0714_ui_MapIndexSource);
|
||||
if (mapX >= 0) {
|
||||
if (L0720_ui_MoveGroupResult > 1) { /* If the group behavior was C6_BEHAVIOR_ATTACK before being teleported from and to the party map */
|
||||
_vm->_groupMan->f182_stopAttacking(&_vm->_groupMan->_g375_activeGroups[L0720_ui_MoveGroupResult - 2], mapX, mapY);
|
||||
_vm->_groupMan->stopAttacking(&_vm->_groupMan->_activeGroups[L0720_ui_MoveGroupResult - 2], mapX, mapY);
|
||||
} else {
|
||||
if (L0720_ui_MoveGroupResult) { /* If the group was teleported or leaved the party map or entered the party map */
|
||||
_vm->_groupMan->f181_groupDeleteEvents(mapX, mapY);
|
||||
_vm->_groupMan->groupDeleteEvents(mapX, mapY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ bool MovesensMan::f266_moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMa
|
|||
L0701_ps_Group = (Group *)_vm->_dungeonMan->getThingData(thing);
|
||||
for (AL0699_ui_Cell = k0_CellNorthWest, AL0700_B_CreatureAlive = false; AL0699_ui_Cell < k3_CellSouthWest + 1; AL0699_ui_Cell++) {
|
||||
AL0700_B_CreatureAlive |= L0701_ps_Group->_health[AL0699_ui_Cell];
|
||||
if (_vm->_groupMan->f176_getCreatureOrdinalInCell(L0701_ps_Group, AL0699_ui_Cell)) {
|
||||
if (_vm->_groupMan->getCreatureOrdinalInCell(L0701_ps_Group, AL0699_ui_Cell)) {
|
||||
L0707_auc_ChampionOrCreatureOrdinalInCell[AL0699_ui_Cell] = _vm->indexToOrdinal(AL0699_ui_Cell);
|
||||
}
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ bool MovesensMan::f266_moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMa
|
|||
}
|
||||
}
|
||||
if ((destMapX >= 0) && ((abs(srcMapX - destMapX) + abs(srcMapY - destMapY)) == 1)) { /* If source and destination squares are adjacent (if party or group is not being teleported) */
|
||||
AL0699_ui_PrimaryDirection = _vm->_groupMan->f228_getDirsWhereDestIsVisibleFromSource(srcMapX, srcMapY, destMapX, destMapY);
|
||||
AL0699_ui_PrimaryDirection = _vm->_groupMan->getDirsWhereDestIsVisibleFromSource(srcMapX, srcMapY, destMapX, destMapY);
|
||||
AL0700_i_SecondaryDirection = returnNextVal(AL0699_ui_PrimaryDirection);
|
||||
for (int16 i = 0; i < 4; ++i)
|
||||
L0706_auc_IntermediaryChampionOrCreatureOrdinalInCell[i] = 0;
|
||||
|
@ -704,7 +704,7 @@ int16 MovesensMan::f262_getTeleporterRotatedGroupResult(Teleporter* teleporter,
|
|||
|
||||
L0686_ps_Group = (Group *)_vm->_dungeonMan->getThingData(thing);
|
||||
L0683_i_Rotation = teleporter->getRotation();
|
||||
L0684_ui_GroupDirections = _vm->_groupMan->f147_getGroupDirections(L0686_ps_Group, mapIndex);
|
||||
L0684_ui_GroupDirections = _vm->_groupMan->getGroupDirections(L0686_ps_Group, mapIndex);
|
||||
|
||||
L0689_B_AbsoluteRotation = teleporter->getAbsoluteRotation();
|
||||
if (L0689_B_AbsoluteRotation) {
|
||||
|
@ -713,20 +713,20 @@ int16 MovesensMan::f262_getTeleporterRotatedGroupResult(Teleporter* teleporter,
|
|||
L0685_ui_UpdatedGroupDirections = normalizeModulo4(L0684_ui_GroupDirections + L0683_i_Rotation);
|
||||
}
|
||||
|
||||
L0687_ui_UpdatedGroupCells = _vm->_groupMan->f145_getGroupCells(L0686_ps_Group, mapIndex);
|
||||
L0687_ui_UpdatedGroupCells = _vm->_groupMan->getGroupCells(L0686_ps_Group, mapIndex);
|
||||
if (L0687_ui_UpdatedGroupCells != k255_CreatureTypeSingleCenteredCreature) {
|
||||
L0690_ui_GroupCells = L0687_ui_UpdatedGroupCells;
|
||||
L0691_i_CreatureSize = getFlag(g243_CreatureInfo[L0686_ps_Group->_type]._attributes, k0x0003_MaskCreatureInfo_size);
|
||||
L0692_i_RelativeRotation = normalizeModulo4(4 + L0685_ui_UpdatedGroupDirections - L0684_ui_GroupDirections);
|
||||
for (L0688_i_CreatureIndex = 0; L0688_i_CreatureIndex <= L0686_ps_Group->getCount(); L0688_i_CreatureIndex++) {
|
||||
L0685_ui_UpdatedGroupDirections = _vm->_groupMan->f178_getGroupValueUpdatedWithCreatureValue(L0685_ui_UpdatedGroupDirections, L0688_i_CreatureIndex, L0689_B_AbsoluteRotation ? L0683_i_Rotation : normalizeModulo4(L0684_ui_GroupDirections + L0683_i_Rotation));
|
||||
L0685_ui_UpdatedGroupDirections = _vm->_groupMan->getGroupValueUpdatedWithCreatureValue(L0685_ui_UpdatedGroupDirections, L0688_i_CreatureIndex, L0689_B_AbsoluteRotation ? L0683_i_Rotation : normalizeModulo4(L0684_ui_GroupDirections + L0683_i_Rotation));
|
||||
if (L0691_i_CreatureSize == k0_MaskCreatureSizeQuarter) {
|
||||
L0692_i_RelativeRotation = !L0689_B_AbsoluteRotation;
|
||||
if (L0692_i_RelativeRotation)
|
||||
L0692_i_RelativeRotation = L0683_i_Rotation;
|
||||
}
|
||||
if (L0692_i_RelativeRotation) {
|
||||
L0687_ui_UpdatedGroupCells = _vm->_groupMan->f178_getGroupValueUpdatedWithCreatureValue(L0687_ui_UpdatedGroupCells, L0688_i_CreatureIndex, normalizeModulo4(L0690_ui_GroupCells + L0692_i_RelativeRotation));
|
||||
L0687_ui_UpdatedGroupCells = _vm->_groupMan->getGroupValueUpdatedWithCreatureValue(L0687_ui_UpdatedGroupCells, L0688_i_CreatureIndex, normalizeModulo4(L0690_ui_GroupCells + L0692_i_RelativeRotation));
|
||||
}
|
||||
L0684_ui_GroupDirections >>= 2;
|
||||
L0690_ui_GroupCells >>= 2;
|
||||
|
|
|
@ -170,7 +170,7 @@ T0217004:
|
|||
return false;
|
||||
}
|
||||
L0488_i_Attack = f216_projectileGetImpactAttack(L0490_ps_Projectile, L0486_T_ProjectileAssociatedThing) + 1;
|
||||
_vm->_groupMan->f232_groupIsDoorDestoryedByAttack(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, L0488_i_Attack + _vm->getRandomNumber(L0488_i_Attack), false, 0);
|
||||
_vm->_groupMan->groupIsDoorDestoryedByAttack(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, L0488_i_Attack + _vm->getRandomNumber(L0488_i_Attack), false, 0);
|
||||
break;
|
||||
case kM2_ChampionElemType:
|
||||
if ((AP0456_i_ChampionIndex = _vm->_championMan->getIndexInCell(cell)) < 0) {
|
||||
|
@ -179,8 +179,8 @@ T0217004:
|
|||
L0489_i_ChampionAttack = L0488_i_Attack = f216_projectileGetImpactAttack(L0490_ps_Projectile, L0486_T_ProjectileAssociatedThing);
|
||||
break;
|
||||
case kM1_CreatureElemType:
|
||||
L0491_ps_Group = (Group *)_vm->_dungeonMan->getThingData(_vm->_groupMan->f175_groupGetThing(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY));
|
||||
if (!(L0512_ui_CreatureIndex = _vm->_groupMan->f176_getCreatureOrdinalInCell(L0491_ps_Group, cell))) {
|
||||
L0491_ps_Group = (Group *)_vm->_dungeonMan->getThingData(_vm->_groupMan->groupGetThing(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY));
|
||||
if (!(L0512_ui_CreatureIndex = _vm->_groupMan->getCreatureOrdinalInCell(L0491_ps_Group, cell))) {
|
||||
return false;
|
||||
}
|
||||
L0512_ui_CreatureIndex--;
|
||||
|
@ -195,8 +195,8 @@ T0217004:
|
|||
}
|
||||
L0488_i_Attack = (uint16)((unsigned long)f216_projectileGetImpactAttack(L0490_ps_Projectile, L0486_T_ProjectileAssociatedThing) << 6) / L0493_ps_CreatureInfo->_defense;
|
||||
if (L0488_i_Attack) {
|
||||
if ((AL0487_i_Outcome = _vm->_groupMan->f190_groupGetDamageCreatureOutcome(L0491_ps_Group, L0512_ui_CreatureIndex, AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, L0488_i_Attack + _vm->_groupMan->f192_groupGetResistanceAdjustedPoisonAttack(L0511_ui_CreatureType, _g366_projectilePoisonAttack), true)) != k0_outcomeKilledNoCreaturesInGroup) {
|
||||
_vm->_groupMan->f209_processEvents29to41(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, kM2_TMEventTypeCreateReactionEvent30HitByProjectile, 0);
|
||||
if ((AL0487_i_Outcome = _vm->_groupMan->groupGetDamageCreatureOutcome(L0491_ps_Group, L0512_ui_CreatureIndex, AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, L0488_i_Attack + _vm->_groupMan->groupGetResistanceAdjustedPoisonAttack(L0511_ui_CreatureType, _g366_projectilePoisonAttack), true)) != k0_outcomeKilledNoCreaturesInGroup) {
|
||||
_vm->_groupMan->processEvents29to41(AP0454_i_ProjectileTargetMapX, AP0455_i_ProjectileTargetMapY, kM2_TMEventTypeCreateReactionEvent30HitByProjectile, 0);
|
||||
}
|
||||
_g364_creatureDamageOutcome = AL0487_i_Outcome;
|
||||
if (!L0505_B_CreateExplosionOnImpact &&
|
||||
|
@ -350,7 +350,7 @@ void ProjExpl::f213_explosionCreate(Thing explThing, uint16 attack, uint16 mapXC
|
|||
if ((_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (AP0443_ui_ProjectileMapX == _vm->_dungeonMan->_partyMapX) && (AP0444_ui_ProjectileMapY == _vm->_dungeonMan->_partyMapY)) {
|
||||
_vm->_championMan->getDamagedChampionCount(attack, k0x0001_ChampionWoundReadHand | k0x0002_ChampionWoundActionHand | k0x0004_ChampionWoundHead | k0x0008_ChampionWoundTorso | k0x0010_ChampionWoundLegs | k0x0020_ChampionWoundFeet, k1_attackType_FIRE);
|
||||
} else {
|
||||
if ((L0473_T_Thing = _vm->_groupMan->f175_groupGetThing(AP0443_ui_ProjectileMapX, AP0444_ui_ProjectileMapY)) != Thing::_endOfList) { /* ASSEMBLY_COMPILATION_DIFFERENCE jmp */
|
||||
if ((L0473_T_Thing = _vm->_groupMan->groupGetThing(AP0443_ui_ProjectileMapX, AP0444_ui_ProjectileMapY)) != Thing::_endOfList) { /* ASSEMBLY_COMPILATION_DIFFERENCE jmp */
|
||||
Group *L0472_ps_Group = (Group *)_vm->_dungeonMan->getThingData(L0473_T_Thing);
|
||||
CreatureInfo *L0471_ps_CreatureInfo = &g243_CreatureInfo[L0472_ps_Group->_type];
|
||||
int16 L0469_i_CreatureFireResistance = L0471_ps_CreatureInfo->getFireResistance();
|
||||
|
@ -359,7 +359,7 @@ void ProjExpl::f213_explosionCreate(Thing explThing, uint16 attack, uint16 mapXC
|
|||
attack >>= 2;
|
||||
}
|
||||
if ((attack -= _vm->getRandomNumber((L0469_i_CreatureFireResistance << 1) + 1)) > 0) {
|
||||
_g364_creatureDamageOutcome = _vm->_groupMan->f191_getDamageAllCreaturesOutcome(L0472_ps_Group, AP0443_ui_ProjectileMapX, AP0444_ui_ProjectileMapY, attack, true);
|
||||
_g364_creatureDamageOutcome = _vm->_groupMan->getDamageAllCreaturesOutcome(L0472_ps_Group, AP0443_ui_ProjectileMapX, AP0444_ui_ProjectileMapY, attack, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ void ProjExpl::f219_processEvents48To49_projectile(TimelineEvent* event) {
|
|||
if ((_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (L0523_i_DestinationMapX == _vm->_dungeonMan->_partyMapX) && (L0524_i_DestinationMapY == _vm->_dungeonMan->_partyMapY) && f217_projectileHasImpactOccurred(kM2_ChampionElemType, L0523_i_DestinationMapX, L0524_i_DestinationMapY, L0518_ui_Cell, L0515_T_ProjectileThingNewCell)) {
|
||||
return;
|
||||
}
|
||||
if ((_vm->_groupMan->f175_groupGetThing(L0523_i_DestinationMapX, L0524_i_DestinationMapY) != Thing::_endOfList) && f217_projectileHasImpactOccurred(kM1_CreatureElemType, L0523_i_DestinationMapX, L0524_i_DestinationMapY, L0518_ui_Cell, L0521_T_ProjectileThing)) {
|
||||
if ((_vm->_groupMan->groupGetThing(L0523_i_DestinationMapX, L0524_i_DestinationMapY) != Thing::_endOfList) && f217_projectileHasImpactOccurred(kM1_CreatureElemType, L0523_i_DestinationMapX, L0524_i_DestinationMapY, L0518_ui_Cell, L0521_T_ProjectileThing)) {
|
||||
return;
|
||||
}
|
||||
if (L0520_ps_Projectile->_kineticEnergy <= (AL0516_ui_StepEnergy = L0519_ps_Event->_C._projectile.getStepEnergy())) {
|
||||
|
@ -534,7 +534,7 @@ void ProjExpl::f220_explosionProcessEvent25_explosion(TimelineEvent* event) {
|
|||
L0532_ps_Explosion = &((Explosion*)_vm->_dungeonMan->_thingData[k15_ExplosionThingType])[Thing((event->_C._slot)).getIndex()];
|
||||
AL0531_i_SquareType = Square(_vm->_dungeonMan->_currMapData[L0528_ui_MapX][L0529_ui_MapY]).getType();
|
||||
L0538_B_ExplosionOnPartySquare = (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (L0528_ui_MapX == _vm->_dungeonMan->_partyMapX) && (L0529_ui_MapY == _vm->_dungeonMan->_partyMapY);
|
||||
if ((L0535_T_GroupThing = _vm->_groupMan->f175_groupGetThing(L0528_ui_MapX, L0529_ui_MapY)) != Thing::_endOfList) {
|
||||
if ((L0535_T_GroupThing = _vm->_groupMan->groupGetThing(L0528_ui_MapX, L0529_ui_MapY)) != Thing::_endOfList) {
|
||||
L0533_ps_Group = (Group*)_vm->_dungeonMan->getThingData(L0535_T_GroupThing);
|
||||
L0534_ps_CreatureInfo = &g243_CreatureInfo[AL0537_ui_CreatureType = L0533_ps_Group->_type];
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ void ProjExpl::f220_explosionProcessEvent25_explosion(TimelineEvent* event) {
|
|||
break;
|
||||
case 0xFF80:
|
||||
if (AL0531_i_SquareType == k4_DoorElemType) {
|
||||
_vm->_groupMan->f232_groupIsDoorDestoryedByAttack(L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack, true, 0);
|
||||
_vm->_groupMan->groupIsDoorDestoryedByAttack(L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack, true, 0);
|
||||
}
|
||||
break;
|
||||
case 0xFF83:
|
||||
|
@ -563,12 +563,12 @@ void ProjExpl::f220_explosionProcessEvent25_explosion(TimelineEvent* event) {
|
|||
AL0537_ui_NonMaterialAdditionalAttack++;
|
||||
AL0531_i_CreatureCount = L0533_ps_Group->getCount();
|
||||
do {
|
||||
if (getFlag(_vm->_groupMan->_g375_activeGroups[L0533_ps_Group->getActiveGroupIndex()]._aspect[AL0531_i_CreatureCount], k0x0080_MaskActiveGroupIsAttacking)) { /* Materializer / Zytaz can only be damaged while they are attacking */
|
||||
_vm->_groupMan->f190_groupGetDamageCreatureOutcome(L0533_ps_Group, AL0531_i_CreatureCount, L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack + _vm->getRandomNumber(AL0537_ui_NonMaterialAdditionalAttack) + _vm->getRandomNumber(4), true);
|
||||
if (getFlag(_vm->_groupMan->_activeGroups[L0533_ps_Group->getActiveGroupIndex()]._aspect[AL0531_i_CreatureCount], k0x0080_MaskActiveGroupIsAttacking)) { /* Materializer / Zytaz can only be damaged while they are attacking */
|
||||
_vm->_groupMan->groupGetDamageCreatureOutcome(L0533_ps_Group, AL0531_i_CreatureCount, L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack + _vm->getRandomNumber(AL0537_ui_NonMaterialAdditionalAttack) + _vm->getRandomNumber(4), true);
|
||||
}
|
||||
} while (--AL0531_i_CreatureCount >= 0);
|
||||
} else {
|
||||
_vm->_groupMan->f191_getDamageAllCreaturesOutcome(L0533_ps_Group, L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack, true);
|
||||
_vm->_groupMan->getDamageAllCreaturesOutcome(L0533_ps_Group, L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -586,8 +586,8 @@ void ProjExpl::f220_explosionProcessEvent25_explosion(TimelineEvent* event) {
|
|||
if (L0538_B_ExplosionOnPartySquare) {
|
||||
_vm->_championMan->getDamagedChampionCount(L0530_i_Attack, k0x0000_ChampionWoundNone, k0_attackType_NORMAL);
|
||||
} else {
|
||||
if ((L0535_T_GroupThing != Thing::_endOfList) && (L0530_i_Attack = _vm->_groupMan->f192_groupGetResistanceAdjustedPoisonAttack(AL0537_ui_CreatureType, L0530_i_Attack)) && (_vm->_groupMan->f191_getDamageAllCreaturesOutcome(L0533_ps_Group, L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack, true) != k2_outcomeKilledAllCreaturesInGroup) && (L0530_i_Attack > 2)) {
|
||||
_vm->_groupMan->f209_processEvents29to41(L0528_ui_MapX, L0529_ui_MapY, kM3_TMEventTypeCreateReactionEvent29DangerOnSquare, 0);
|
||||
if ((L0535_T_GroupThing != Thing::_endOfList) && (L0530_i_Attack = _vm->_groupMan->groupGetResistanceAdjustedPoisonAttack(AL0537_ui_CreatureType, L0530_i_Attack)) && (_vm->_groupMan->getDamageAllCreaturesOutcome(L0533_ps_Group, L0528_ui_MapX, L0529_ui_MapY, L0530_i_Attack, true) != k2_outcomeKilledAllCreaturesInGroup) && (L0530_i_Attack > 2)) {
|
||||
_vm->_groupMan->processEvents29to41(L0528_ui_MapX, L0529_ui_MapY, kM3_TMEventTypeCreateReactionEvent29DangerOnSquare, 0);
|
||||
}
|
||||
}
|
||||
if (L0532_ps_Explosion->getAttack() >= 6) {
|
||||
|
|
|
@ -277,7 +277,7 @@ void Timeline::f261_processTimeline() {
|
|||
_vm->_dungeonMan->setCurrentMap(getMap(L0682_s_Event._mapTime));
|
||||
AL0680_ui_EventType = L0682_s_Event._type;
|
||||
if ((AL0680_ui_EventType > (k29_TMEventTypeGroupReactionDangerOnSquare - 1)) && (AL0680_ui_EventType < (k41_TMEventTypeUpdateBehaviour_3 + 1))) {
|
||||
_vm->_groupMan->f209_processEvents29to41(L0682_s_Event._B._location._mapX, L0682_s_Event._B._location._mapY, AL0680_ui_EventType, L0682_s_Event._C._ticks);
|
||||
_vm->_groupMan->processEvents29to41(L0682_s_Event._B._location._mapX, L0682_s_Event._B._location._mapY, AL0680_ui_EventType, L0682_s_Event._C._ticks);
|
||||
} else {
|
||||
switch (AL0680_ui_EventType) {
|
||||
case k48_TMEventTypeMoveProjectileIgnoreImpacts:
|
||||
|
@ -428,10 +428,10 @@ void Timeline::f241_timelineProcessEvent1_doorAnimation(TimelineEvent* event) {
|
|||
f238_addEventGetEventIndex(event);
|
||||
return;
|
||||
}
|
||||
if (((L0599_T_GroupThing = _vm->_groupMan->f175_groupGetThing(L0593_ui_MapX, L0594_ui_MapY)) != Thing::_endOfList) && !getFlag(L0600_ui_CreatureAttributes = _vm->_dungeonMan->getCreatureAttributes(L0599_T_GroupThing), k0x0040_MaskCreatureInfo_nonMaterial)) {
|
||||
if (((L0599_T_GroupThing = _vm->_groupMan->groupGetThing(L0593_ui_MapX, L0594_ui_MapY)) != Thing::_endOfList) && !getFlag(L0600_ui_CreatureAttributes = _vm->_dungeonMan->getCreatureAttributes(L0599_T_GroupThing), k0x0040_MaskCreatureInfo_nonMaterial)) {
|
||||
if (L0596_i_DoorState >= (AL0602_ui_Height ? CreatureInfo::getHeight(L0600_ui_CreatureAttributes) : 1)) { /* Creature height or 1 */
|
||||
if (_vm->_groupMan->f191_getDamageAllCreaturesOutcome((Group*)_vm->_dungeonMan->getThingData(L0599_T_GroupThing), L0593_ui_MapX, L0594_ui_MapY, 5, true) != k2_outcomeKilledAllCreaturesInGroup) {
|
||||
_vm->_groupMan->f209_processEvents29to41(L0593_ui_MapX, L0594_ui_MapY, kM3_TMEventTypeCreateReactionEvent29DangerOnSquare, 0);
|
||||
if (_vm->_groupMan->getDamageAllCreaturesOutcome((Group*)_vm->_dungeonMan->getThingData(L0599_T_GroupThing), L0593_ui_MapX, L0594_ui_MapY, 5, true) != k2_outcomeKilledAllCreaturesInGroup) {
|
||||
_vm->_groupMan->processEvents29to41(L0593_ui_MapX, L0594_ui_MapY, kM3_TMEventTypeCreateReactionEvent29DangerOnSquare, 0);
|
||||
}
|
||||
L0596_i_DoorState = (L0596_i_DoorState == k0_doorState_OPEN) ? k0_doorState_OPEN : (L0596_i_DoorState - 1);
|
||||
L0597_puc_Square->setDoorState(L0596_i_DoorState);
|
||||
|
@ -481,7 +481,7 @@ void Timeline::f242_timelineProcessEvent7_squareFakewall(TimelineEvent* event) {
|
|||
event->_mapTime++;
|
||||
f238_addEventGetEventIndex(event);
|
||||
} else {
|
||||
if (((L0606_T_Thing = _vm->_groupMan->f175_groupGetThing(L0603_ui_MapX, L0604_ui_MapY)) != Thing::_endOfList) && !getFlag(_vm->_dungeonMan->getCreatureAttributes(L0606_T_Thing), k0x0040_MaskCreatureInfo_nonMaterial)) {
|
||||
if (((L0606_T_Thing = _vm->_groupMan->groupGetThing(L0603_ui_MapX, L0604_ui_MapY)) != Thing::_endOfList) && !getFlag(_vm->_dungeonMan->getCreatureAttributes(L0606_T_Thing), k0x0040_MaskCreatureInfo_nonMaterial)) {
|
||||
event->_mapTime++;
|
||||
f238_addEventGetEventIndex(event);
|
||||
} else {
|
||||
|
@ -557,7 +557,7 @@ void Timeline::f249_moveTeleporterOrPitSquareThings(uint16 mapX, uint16 mapY) {
|
|||
_vm->_moveSens->f267_getMoveResult(Thing::_party, mapX, mapY, mapX, mapY);
|
||||
_vm->_championMan->drawChangedObjectIcons();
|
||||
}
|
||||
if ((L0645_T_Thing = _vm->_groupMan->f175_groupGetThing(mapX, mapY)) != Thing::_endOfList) {
|
||||
if ((L0645_T_Thing = _vm->_groupMan->groupGetThing(mapX, mapY)) != Thing::_endOfList) {
|
||||
_vm->_moveSens->f267_getMoveResult(L0645_T_Thing, mapX, mapY, mapX, mapY);
|
||||
}
|
||||
L0645_T_Thing = _vm->_dungeonMan->getSquareFirstObject(mapX, mapY);
|
||||
|
@ -838,7 +838,7 @@ void Timeline::f245_timlineProcessEvent5_squareCorridor(TimelineEvent* event) {
|
|||
if (AL0618_ui_HealthMultiplier == 0) {
|
||||
AL0618_ui_HealthMultiplier = _vm->_dungeonMan->_currMap->_difficulty;
|
||||
}
|
||||
_vm->_groupMan->f185_groupGetGenerated(L0614_ps_Sensor->getData(), AL0618_ui_HealthMultiplier, L0612_i_CreatureCount, (Direction)_vm->getRandomNumber(4), L0616_ui_MapX, L0617_ui_MapY);
|
||||
_vm->_groupMan->groupGetGenerated(L0614_ps_Sensor->getData(), AL0618_ui_HealthMultiplier, L0612_i_CreatureCount, (Direction)_vm->getRandomNumber(4), L0616_ui_MapX, L0617_ui_MapY);
|
||||
if (L0614_ps_Sensor->getAttrAudibleA()) {
|
||||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k17_soundBUZZ, L0616_ui_MapX, L0617_ui_MapY, k1_soundModePlayIfPrioritized);
|
||||
}
|
||||
|
@ -878,7 +878,7 @@ void Timeline::f252_timelineProcessEvents60to61_moveGroup(TimelineEvent* event)
|
|||
L0657_ui_MapY = event->_B._location._mapY;
|
||||
L0657_ui_MapY = event->_B._location._mapY;
|
||||
T0252001:
|
||||
if (((_vm->_dungeonMan->_currMapIndex != _vm->_dungeonMan->_partyMapIndex) || (L0656_ui_MapX != _vm->_dungeonMan->_partyMapX) || (L0657_ui_MapY != _vm->_dungeonMan->_partyMapY)) && (_vm->_groupMan->f175_groupGetThing(L0656_ui_MapX, L0657_ui_MapY) == Thing::_endOfList)) { /* BUG0_24 Lord Chaos may teleport into one of the Black Flames and become invisible until the Black Flame is killed. In this case, _vm->_groupMan->f175_groupGetThing returns the Black Flame thing and the Lord Chaos thing is not moved into the dungeon until the Black Flame is killed */
|
||||
if (((_vm->_dungeonMan->_currMapIndex != _vm->_dungeonMan->_partyMapIndex) || (L0656_ui_MapX != _vm->_dungeonMan->_partyMapX) || (L0657_ui_MapY != _vm->_dungeonMan->_partyMapY)) && (_vm->_groupMan->groupGetThing(L0656_ui_MapX, L0657_ui_MapY) == Thing::_endOfList)) { /* BUG0_24 Lord Chaos may teleport into one of the Black Flames and become invisible until the Black Flame is killed. In this case, _vm->_groupMan->f175_groupGetThing returns the Black Flame thing and the Lord Chaos thing is not moved into the dungeon until the Black Flame is killed */
|
||||
if (event->_type == k61_TMEventTypeMoveGroupAudible) {
|
||||
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k17_soundBUZZ, L0656_ui_MapX, L0657_ui_MapY, k1_soundModePlayIfPrioritized);
|
||||
}
|
||||
|
@ -901,7 +901,7 @@ T0252001:
|
|||
case 3:
|
||||
L0657_ui_MapY++;
|
||||
}
|
||||
if (_vm->_groupMan->f223_isSquareACorridorTeleporterPitOrDoor(L0656_ui_MapX, L0657_ui_MapY))
|
||||
if (_vm->_groupMan->isSquareACorridorTeleporterPitOrDoor(L0656_ui_MapX, L0657_ui_MapY))
|
||||
goto T0252001;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue