|
|
@@ -632,6 +632,25 @@ void CBattleInterface::show(SDL_Surface * to)
|
|
|
CSDL_Ext::blit8bppAlphaTo24bpp(cellShade, NULL, to, &temp_rect);
|
|
|
}
|
|
|
}
|
|
|
+ //patch by ench0
|
|
|
+ const CStack * const shere = curInt->cb->battleGetStackByPos(b, false);
|
|
|
+
|
|
|
+ // display the movement shadow of the stack at b (i.e. stack under mouse)
|
|
|
+ if(shere && shere->alive())
|
|
|
+ {
|
|
|
+ // activeStack == NULL means it is opponent's turn...
|
|
|
+ if (activeStack && shere != activeStack)
|
|
|
+ {
|
|
|
+ std::vector<BattleHex> v = curInt->cb->battleGetAvailableHexes(shere, true );
|
|
|
+ BOOST_FOREACH (BattleHex hex, v)
|
|
|
+ {
|
|
|
+ int x = 14 + ((hex / GameConstants::BFIELD_WIDTH ) % 2 == 0 ? 22 : 0) + 44 * (hex % GameConstants::BFIELD_WIDTH) + pos.x;
|
|
|
+ int y = 86 + 42 * (hex / GameConstants::BFIELD_WIDTH) + pos.y;
|
|
|
+ SDL_Rect temp_rect = genRect (cellShade->h, cellShade->w, x, y);
|
|
|
+ CSDL_Ext::blit8bppAlphaTo24bpp (cellShade, NULL, to, &temp_rect);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//always highlight pointed hex
|
|
|
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;
|