For the footpath when teleporting,

...use a halo image instead of footsteps in funky directions (but
continue to draw them for entering and leaving the villages). It's
mainly a visual indicator to show that there is something special
happening and that your footpath is not just stuck in the village.

It's a quick Gimp, but if/when replaced, it must stay light. Because
it's coded to stay visible like footsteps when the unit move and
teleport, and so it must work well under the teleport anim. If really
needed, we can add a new unit key specifing the image to use. Btw, the
siver mage seems to not have his teleport anim in cfg but the images
are there.
This commit is contained in:
Ali El Gariani 2007-11-12 13:23:34 +00:00
parent eaed87630a
commit 65afbc60ab
2 changed files with 11 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -695,6 +695,8 @@ std::vector<surface> game_display::footsteps_images(const gamemap::location& loc
}
const std::string foot_speed_prefix = game_config::foot_speed_prefix[image_number-1];
surface teleport = NULL;
// We draw 2 half-hex (with possibly different directions),
// but skip the first for the first step.
const int first_half = (i == route_.steps.begin()) ? 1 : 0;
@ -702,10 +704,15 @@ std::vector<surface> game_display::footsteps_images(const gamemap::location& loc
const int second_half = (i+1 == route_.steps.end()) ? 0 : 1;
for (int h = first_half; h <= second_half; h++) {
std::string rotate;
if (!tiles_adjacent(*(i-1+h), *(i+h))) {
teleport = image::get_image("footsteps/teleport-step.png", image::UNMASKED);
continue;
}
// In function of the half, use the incoming or outgoing direction
gamemap::location::DIRECTION dir = (i-1+h)->get_relative_dir(*(i+h));
std::string rotate;
if (dir > gamemap::location::SOUTH_EAST) {
// No image, take the opposite direction and do a 180 rotation
dir = i->get_opposite_dir(dir);
@ -719,6 +726,9 @@ std::vector<surface> game_display::footsteps_images(const gamemap::location& loc
res.push_back(image::get_image(image, image::UNMASKED));
}
// we draw teleport image (if any) in last
if (teleport != NULL) res.push_back(teleport);
return res;
}