Shorten some code. (No functional change, just easier to read.)
This commit is contained in:
parent
e89da38edf
commit
00be5cfa20
1 changed files with 3 additions and 3 deletions
|
@ -276,16 +276,16 @@ void terrain_builder::rebuild_terrain(const map_location &loc)
|
|||
btile.images_foreground.clear();
|
||||
btile.images_background.clear();
|
||||
const std::string filename =
|
||||
map().get_terrain_info(map().get_terrain(loc)).minimap_image();
|
||||
map().get_terrain_info(loc).minimap_image();
|
||||
animated<image::locator> img_loc;
|
||||
img_loc.add_frame(100,image::locator("terrain/" + filename + ".png"));
|
||||
img_loc.start_animation(0, true);
|
||||
btile.images_background.push_back(img_loc);
|
||||
|
||||
//Combine base and overlay image if necessary
|
||||
if(map().get_terrain_info(map().get_terrain(loc)).is_combined()) {
|
||||
if(map().get_terrain_info(loc).is_combined()) {
|
||||
const std::string filename_ovl =
|
||||
map().get_terrain_info(map().get_terrain(loc)).minimap_image_overlay();
|
||||
map().get_terrain_info(loc).minimap_image_overlay();
|
||||
animated<image::locator> img_loc_ovl;
|
||||
img_loc_ovl.add_frame(100,image::locator("terrain/" + filename_ovl + ".png"));
|
||||
img_loc_ovl.start_animation(0, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue