From 082274ca8ba24b4ddb475fa5638d1cf2bd7df312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boldizs=C3=A1r=20Lipka?= Date: Tue, 22 Jul 2014 18:14:11 +0200 Subject: [PATCH] Draw terrain overlays on the minimap. --- src/minimap.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/minimap.cpp b/src/minimap.cpp index 6d752911fb64..43ab84b4bd97 100644 --- a/src/minimap.cpp +++ b/src/minimap.cpp @@ -328,7 +328,19 @@ SDL_Rect draw_minimap(CVideo &video, const SDL_Rect &area, const gamemap &map, c img.set_scale(scale_factor, scale_factor); video.draw_texture(img, xpos, ypos); - img.set_color_mod(255, 255, 255); + + if (terrain_info.is_combined()) { + sdl::timage overlay = image::get_texture("terrain/" + terrain_info.minimap_image_overlay() + ".png", image::HEXED); + if (fogged) { + overlay.set_color_mod(100, 100, 100); + } + if (highlighted) { + overlay.set_color_mod(150, 150, 150); + } + + overlay.set_scale(scale_factor, scale_factor); + video.draw_texture(overlay, xpos, ypos); + } } else { SDL_Color col; std::map::const_iterator it = game_config::team_rgb_range.find(terrain_info.id());