1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-07 00:58:39 +02:00

Ench0's patch from #948.

This commit is contained in:
Michał W. Urbańczyk
2012-06-01 17:23:26 +00:00
parent b7c4da65b5
commit dc4d30df0e

View File

@ -632,10 +632,10 @@ void CBattleInterface::show(SDL_Surface * to)
CSDL_Ext::blit8bppAlphaTo24bpp(cellShade, NULL, to, &temp_rect); CSDL_Ext::blit8bppAlphaTo24bpp(cellShade, NULL, to, &temp_rect);
} }
} }
//patch by ench0
//patch by ench0: show enemy stack movement shadow
// activeStack == NULL means it is opponent's turn... // activeStack == NULL means it is opponent's turn...
if(activeStack) if(activeStack && settings["battle"]["stackRange"].Bool())
{ {
// display the movement shadow of the stack at b (i.e. stack under mouse) // display the movement shadow of the stack at b (i.e. stack under mouse)
const CStack * const shere = curInt->cb->battleGetStackByPos(b, false); const CStack * const shere = curInt->cb->battleGetStackByPos(b, false);
@ -651,6 +651,7 @@ void CBattleInterface::show(SDL_Surface * to)
} }
} }
} }
//always highlight pointed hex //always highlight pointed hex
int x = 14 + ((b/GameConstants::BFIELD_WIDTH)%2==0 ? 22 : 0) + 44*(b%GameConstants::BFIELD_WIDTH) + pos.x; int x = 14 + ((b/GameConstants::BFIELD_WIDTH)%2==0 ? 22 : 0) + 44*(b%GameConstants::BFIELD_WIDTH) + pos.x;
int y = 86 + 42 * (b/GameConstants::BFIELD_WIDTH) + pos.y; int y = 86 + 42 * (b/GameConstants::BFIELD_WIDTH) + pos.y;