1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Some renamings for consistency

This commit is contained in:
krs 2023-05-22 21:16:31 +03:00
parent 4a3426bb70
commit a8a82e89ea
2 changed files with 7 additions and 7 deletions

View File

@ -521,14 +521,14 @@ std::vector<std::vector<BattleHex::EDir>> BattleFieldController::getOutsideNeigh
return output;
}
std::vector<std::shared_ptr<IImage>> BattleFieldController::calculateFullRangedDamageHighlightImages(std::vector<std::vector<BattleHex::EDir>> fullRangedDamageLimitHexesNeighbourDirections)
std::vector<std::shared_ptr<IImage>> BattleFieldController::calculateRangedFullDamageHighlightImages(std::vector<std::vector<BattleHex::EDir>> rangedFullDamageLimitHexesNeighbourDirections)
{
std::vector<std::shared_ptr<IImage>> output; // if no image is to be shown an empty image is still added to help with traverssing the range
if(fullRangedDamageLimitHexesNeighbourDirections.empty())
if(rangedFullDamageLimitHexesNeighbourDirections.empty())
return output;
for(auto & directions : fullRangedDamageLimitHexesNeighbourDirections)
for(auto & directions : rangedFullDamageLimitHexesNeighbourDirections)
{
std::bitset<6> mask;
@ -537,7 +537,7 @@ std::vector<std::shared_ptr<IImage>> BattleFieldController::calculateFullRangedD
mask.set(direction);
uint8_t imageKey = static_cast<uint8_t>(mask.to_ulong());
output.push_back(fullDamageRangeLimitImages->getImage(hexEdgeMaskToFrameIndex[imageKey]));
output.push_back(rangedFullDamageLimitImages->getImage(hexEdgeMaskToFrameIndex[imageKey]));
}
return output;
@ -556,7 +556,7 @@ void BattleFieldController::showHighlightedHexes(Canvas & canvas)
std::vector<BattleHex> rangedFullDamageHexes = getRangedFullDamageHexes();
std::vector<BattleHex> rangedFullDamageLimitHexes = getRangedFullDamageLimitHexes(rangedFullDamageHexes);
std::vector<std::vector<BattleHex::EDir>> rangedFullDamageLimitHexesNeighbourDirections = getOutsideNeighbourDirectionsForLimitHexes(rangedFullDamageHexes, rangedFullDamageLimitHexes);
std::vector<std::shared_ptr<IImage>> rangedFullDamageLimitHexesHighligts = calculateFullRangedDamageHighlightImages(rangedFullDamageLimitHexesNeighbourDirections);
std::vector<std::shared_ptr<IImage>> rangedFullDamageLimitHexesHighligts = calculateRangedFullDamageHighlightImages(rangedFullDamageLimitHexesNeighbourDirections);
auto const & hoveredMouseHexes = owner.actionsController->currentActionSpellcasting(getHoveredHex()) ? hoveredSpellHexes : hoveredMoveHexes;

View File

@ -33,7 +33,7 @@ class BattleFieldController : public CIntObject
std::shared_ptr<IImage> cellUnitMovementHighlight;
std::shared_ptr<IImage> cellUnitMaxMovementHighlight;
std::shared_ptr<IImage> cellShade;
std::unique_ptr<CAnimation> fullDamageRangeLimitImages;
std::unique_ptr<CAnimation> rangedFullDamageLimitImages;
std::shared_ptr<CAnimation> attackCursors;
@ -85,7 +85,7 @@ class BattleFieldController : public CIntObject
/// calculates what image to use as range limit, depending on the direction of neighbors
/// a mask is used internally to mark the directions of all neighbours
/// based on this mask the corresponding image is selected
std::vector<std::shared_ptr<IImage>> calculateFullRangedDamageHighlightImages(std::vector<std::vector<BattleHex::EDir>> fullRangeLimitHexesNeighbourDirections);
std::vector<std::shared_ptr<IImage>> calculateRangedFullDamageHighlightImages(std::vector<std::vector<BattleHex::EDir>> fullRangeLimitHexesNeighbourDirections);
void showBackground(Canvas & canvas);
void showBackgroundImage(Canvas & canvas);