diff --git a/changelog b/changelog index 52706bc9d2c..432e9b2b909 100644 --- a/changelog +++ b/changelog @@ -66,6 +66,8 @@ Version 1.13.11: * Added confirmation prompt when clearing map labels. * Added show_border= key to the [main_map_border] to control whether map borders draw. Right now this is utilized in the cutscene themes. + * If [main_map_border] background_image= is empty, the game map background + will be plain black. * WFL Engine: * A new string insert() function has been added, similar to replace() * WML Engine: diff --git a/data/themes/_initial.cfg b/data/themes/_initial.cfg index 75971021f8e..c66d3fb713c 100644 --- a/data/themes/_initial.cfg +++ b/data/themes/_initial.cfg @@ -15,7 +15,6 @@ #define CUTSCENE_THEME_BACKGROUND [main_map_border] border_size = 0.5 - background_image = "terrain/off-map/background.png~CS(-255,-255,-255)" tile_image = "alphamask.png" show_border = no [/main_map_border] diff --git a/src/display.cpp b/src/display.cpp index b4dfc626257..a93f9451b40 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1502,13 +1502,19 @@ void display::draw_all_panels() render_buttons(); } - static void draw_background(surface screen, const SDL_Rect& area, const std::string& image) { + // No background image, just fill in black. + if(image.empty()) { + sdl::fill_rectangle(area, color_t(0, 0, 0)); + return; + } + const surface background(image::get_image(image)); if(background.null()) { return; } + const unsigned int width = background->w; const unsigned int height = background->h;