Move hardcoded definition of the footpath-teleport images in [game-config]

Still think about allow ability to change it, but I prefer cache the
footpath before adding to much things to the real-time drawing part.

And it's also good to have a default images (works for any
discontinuous path) It will maybe be used if terrain teleport is added
one day.
This commit is contained in:
Ali El Gariani 2007-12-23 15:47:32 +00:00
parent 08383c88a2
commit 73eec9bacf
4 changed files with 9 additions and 1 deletions

View file

@ -140,6 +140,8 @@
dot_image="misc/dot.png"
footprint_prefix="footsteps/foot-normal,footsteps/foot-slow"
footprint_teleport_enter="footsteps/teleport-in.png"
footprint_teleport_exit="footsteps/teleport-out.png"
missile_n_image=projectiles/missile-n.png
missile_ne_image=projectiles/missile-ne.png

View file

@ -70,6 +70,8 @@ namespace game_config
std::string cross_image = "misc/cross.png";
std::vector<std::string> foot_speed_prefix;
std::string foot_teleport_enter = "footsteps/teleport-in.png";
std::string foot_teleport_exit = "footsteps/teleport-out.png";
std::string observer_image = "misc/eye.png";
std::string tod_bright_image = "misc/tod-bright.png";
@ -164,6 +166,8 @@ namespace game_config
cross_image = v["cross_image"];
foot_speed_prefix = utils::split(v["footprint_prefix"]);
foot_teleport_enter = v["footprint_teleport_enter"];
foot_teleport_exit = v["footprint_teleport_exit"];
terrain_mask_image = v["terrain_mask_image"];
grid_image = v["grid_image"];

View file

@ -68,6 +68,7 @@ namespace game_config
extern std::vector<Uint32> defense_color_scale;
extern std::vector<std::string> foot_speed_prefix;
extern std::string foot_teleport_enter, foot_teleport_exit;
extern int title_logo_x, title_logo_y, title_buttons_x, title_buttons_y, title_buttons_padding, title_tip_x, title_tip_width, title_tip_padding;

View file

@ -750,7 +750,8 @@ std::vector<surface> game_display::footsteps_images(const gamemap::location& loc
const std::string sense( h==0 ? "-in" : "-out" );
if (!tiles_adjacent(*(i-1+h), *(i+h))) {
std::string teleport_image = "footsteps/teleport" + sense + ".png";
std::string teleport_image =
h==0 ? game_config::foot_teleport_enter : game_config::foot_teleport_exit;
teleport = image::get_image(teleport_image, image::UNMASKED);
continue;
}