mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Ouch. #37 is not so easy. :>
This commit is contained in:
@@ -3510,7 +3510,7 @@ void CBattleInterface::showAliveStack(const CStack *stack, SDL_Surface * to)
|
||||
{
|
||||
const THex nextPos = stack->position + (stack->attackerOwned ? 1 : -1);
|
||||
const bool edge = stack->position % BFIELD_WIDTH == (stack->attackerOwned ? BFIELD_WIDTH - 2 : 1);
|
||||
const bool moveInside = !edge && !vstd::contains(curInt->cb->battleGetAvailableHexes(stack, true), nextPos);
|
||||
const bool moveInside = !edge && !isHexAccessible(nextPos);
|
||||
int xAdd = (stack->attackerOwned ? 220 : 202) +
|
||||
(stack->doubleWide() ? 44 : 0) * (stack->attackerOwned ? +1 : -1) +
|
||||
(moveInside ? amountNormal->w + 10 : 0) * (stack->attackerOwned ? -1 : +1);
|
||||
@@ -3959,6 +3959,13 @@ void CBattleInterface::bTacticNextStack()
|
||||
stackActivated(stacksOfMine.front());
|
||||
}
|
||||
|
||||
bool CBattleInterface::isHexAccessible(THex nextPos)
|
||||
{
|
||||
//!vstd::contains(curInt->cb->battleGetAvailableHexes(stack, true), nextPos)
|
||||
//TODO has to be fast
|
||||
return true;
|
||||
}
|
||||
|
||||
void CBattleHero::show(SDL_Surface *to)
|
||||
{
|
||||
//animation of flag
|
||||
|
@@ -460,6 +460,7 @@ private:
|
||||
void giveCommand(ui8 action, THex tile, ui32 stack, si32 additional=-1);
|
||||
bool isTileAttackable(const THex & number) const; //returns true if tile 'number' is neighboring any tile from active stack's range or is one of these tiles
|
||||
bool blockedByObstacle(THex hex) const;
|
||||
bool isHexAccessible(THex nextPos);
|
||||
bool isCatapultAttackable(THex hex) const; //returns true if given tile can be attacked by catapult
|
||||
|
||||
std::list<SBattleEffect> battleEffects; //different animations to display on the screen like spell effects
|
||||
|
Reference in New Issue
Block a user