diff --git a/changelog b/changelog index d392c473827..bea0d5de8f5 100644 --- a/changelog +++ b/changelog @@ -20,6 +20,8 @@ Version 1.13.6+dev: * Support ability now only lowers adjacent upkeep costs by 1. * Graphics: * Improved terrain graphics: lava, volcano. + * Improved the fake map border terrain so that it now connects with the real + map borders and can better be used to change the apparent shape of the map. * Smoother fade transitions between differently colored time areas. * Adjacent castles of different types now have fewer glitches between them. * Fixed glitches between various mountain tiles (introduced in 1.13.3). diff --git a/data/core/images/terrain/off-map/alpha.png b/data/core/images/terrain/off-map/alpha.png index b27738d33e6..d63de2b1776 100644 Binary files a/data/core/images/terrain/off-map/alpha.png and b/data/core/images/terrain/off-map/alpha.png differ diff --git a/data/core/images/terrain/off-map/border-corner_bottom_left_even.png b/data/core/images/terrain/off-map/border-corner_bottom_left_even.png new file mode 100644 index 00000000000..2c96935fb91 Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_bottom_left_even.png differ diff --git a/data/core/images/terrain/off-map/border-corner_bottom_left_odd.png b/data/core/images/terrain/off-map/border-corner_bottom_left_odd.png new file mode 100644 index 00000000000..b1ef4ed726b Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_bottom_left_odd.png differ diff --git a/data/core/images/terrain/off-map/border-corner_bottom_right_even.png b/data/core/images/terrain/off-map/border-corner_bottom_right_even.png new file mode 100644 index 00000000000..ccc2c1e97d6 Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_bottom_right_even.png differ diff --git a/data/core/images/terrain/off-map/border-corner_bottom_right_odd.png b/data/core/images/terrain/off-map/border-corner_bottom_right_odd.png new file mode 100644 index 00000000000..bc63b4816d7 Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_bottom_right_odd.png differ diff --git a/data/core/images/terrain/off-map/border-corner_top_left.png b/data/core/images/terrain/off-map/border-corner_top_left.png new file mode 100644 index 00000000000..c323b0545fd Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_top_left.png differ diff --git a/data/core/images/terrain/off-map/border-corner_top_left_even.png b/data/core/images/terrain/off-map/border-corner_top_left_even.png new file mode 100644 index 00000000000..c323b0545fd Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_top_left_even.png differ diff --git a/data/core/images/terrain/off-map/border-corner_top_left_odd.png b/data/core/images/terrain/off-map/border-corner_top_left_odd.png new file mode 100644 index 00000000000..83360ba1c9d Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_top_left_odd.png differ diff --git a/data/core/images/terrain/off-map/border-corner_top_right_even.png b/data/core/images/terrain/off-map/border-corner_top_right_even.png new file mode 100644 index 00000000000..7d28121f498 Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_top_right_even.png differ diff --git a/data/core/images/terrain/off-map/border-corner_top_right_odd.png b/data/core/images/terrain/off-map/border-corner_top_right_odd.png new file mode 100644 index 00000000000..c2a1db142ae Binary files /dev/null and b/data/core/images/terrain/off-map/border-corner_top_right_odd.png differ diff --git a/data/core/images/terrain/off-map/border-editor.png b/data/core/images/terrain/off-map/border-editor.png new file mode 100644 index 00000000000..e154f5753e6 Binary files /dev/null and b/data/core/images/terrain/off-map/border-editor.png differ diff --git a/data/core/images/terrain/off-map/border-n-ne-se-s.png b/data/core/images/terrain/off-map/border-n-ne-se-s.png index d504a665164..f47e09980eb 100644 Binary files a/data/core/images/terrain/off-map/border-n-ne-se-s.png and b/data/core/images/terrain/off-map/border-n-ne-se-s.png differ diff --git a/data/core/images/terrain/off-map/border-n-ne-se.png b/data/core/images/terrain/off-map/border-n-ne-se.png index dcf9cf7b895..49d7e1cf130 100644 Binary files a/data/core/images/terrain/off-map/border-n-ne-se.png and b/data/core/images/terrain/off-map/border-n-ne-se.png differ diff --git a/data/core/images/terrain/off-map/border-n-ne.png b/data/core/images/terrain/off-map/border-n-ne.png index 2ccc4bc3512..e419ecb26c5 100644 Binary files a/data/core/images/terrain/off-map/border-n-ne.png and b/data/core/images/terrain/off-map/border-n-ne.png differ diff --git a/data/core/images/terrain/off-map/border-n.png b/data/core/images/terrain/off-map/border-n.png index 96fc175036a..d639bd3e810 100644 Binary files a/data/core/images/terrain/off-map/border-n.png and b/data/core/images/terrain/off-map/border-n.png differ diff --git a/data/core/images/terrain/off-map/border-ne-se-s-sw-nw-n.png b/data/core/images/terrain/off-map/border-ne-se-s-sw-nw-n.png index 0dbbef43404..63cbc6750df 100644 Binary files a/data/core/images/terrain/off-map/border-ne-se-s-sw-nw-n.png and b/data/core/images/terrain/off-map/border-ne-se-s-sw-nw-n.png differ diff --git a/data/core/images/terrain/off-map/border-ne-se-s-sw.png b/data/core/images/terrain/off-map/border-ne-se-s-sw.png index 1728c42abc4..c793b0982c5 100644 Binary files a/data/core/images/terrain/off-map/border-ne-se-s-sw.png and b/data/core/images/terrain/off-map/border-ne-se-s-sw.png differ diff --git a/data/core/images/terrain/off-map/border-ne-se-s.png b/data/core/images/terrain/off-map/border-ne-se-s.png index a3ba040b310..f933b43c0ce 100644 Binary files a/data/core/images/terrain/off-map/border-ne-se-s.png and b/data/core/images/terrain/off-map/border-ne-se-s.png differ diff --git a/data/core/images/terrain/off-map/border-ne-se.png b/data/core/images/terrain/off-map/border-ne-se.png index 3bcbb24a714..788aa7bce8d 100644 Binary files a/data/core/images/terrain/off-map/border-ne-se.png and b/data/core/images/terrain/off-map/border-ne-se.png differ diff --git a/data/core/images/terrain/off-map/border-ne.png b/data/core/images/terrain/off-map/border-ne.png index 928478e2bf5..056816901cb 100644 Binary files a/data/core/images/terrain/off-map/border-ne.png and b/data/core/images/terrain/off-map/border-ne.png differ diff --git a/data/core/images/terrain/off-map/border-nw-n-ne-se.png b/data/core/images/terrain/off-map/border-nw-n-ne-se.png index f9f5179b16a..3dcc624ca8c 100644 Binary files a/data/core/images/terrain/off-map/border-nw-n-ne-se.png and b/data/core/images/terrain/off-map/border-nw-n-ne-se.png differ diff --git a/data/core/images/terrain/off-map/border-nw-n-ne.png b/data/core/images/terrain/off-map/border-nw-n-ne.png index 0b2447c3778..6680e7c1269 100644 Binary files a/data/core/images/terrain/off-map/border-nw-n-ne.png and b/data/core/images/terrain/off-map/border-nw-n-ne.png differ diff --git a/data/core/images/terrain/off-map/border-nw-n.png b/data/core/images/terrain/off-map/border-nw-n.png index e00658b5325..27f6451f906 100644 Binary files a/data/core/images/terrain/off-map/border-nw-n.png and b/data/core/images/terrain/off-map/border-nw-n.png differ diff --git a/data/core/images/terrain/off-map/border-nw.png b/data/core/images/terrain/off-map/border-nw.png index 50aa57c5c4a..2a5c140a6f4 100644 Binary files a/data/core/images/terrain/off-map/border-nw.png and b/data/core/images/terrain/off-map/border-nw.png differ diff --git a/data/core/images/terrain/off-map/border-s-sw-nw-n.png b/data/core/images/terrain/off-map/border-s-sw-nw-n.png index e743aadc915..ff5c9bd7cd7 100644 Binary files a/data/core/images/terrain/off-map/border-s-sw-nw-n.png and b/data/core/images/terrain/off-map/border-s-sw-nw-n.png differ diff --git a/data/core/images/terrain/off-map/border-s-sw-nw.png b/data/core/images/terrain/off-map/border-s-sw-nw.png index 7959ffea7c1..ba7cd04232d 100644 Binary files a/data/core/images/terrain/off-map/border-s-sw-nw.png and b/data/core/images/terrain/off-map/border-s-sw-nw.png differ diff --git a/data/core/images/terrain/off-map/border-s-sw.png b/data/core/images/terrain/off-map/border-s-sw.png index e0355364b6e..cb8d7b8a0c0 100644 Binary files a/data/core/images/terrain/off-map/border-s-sw.png and b/data/core/images/terrain/off-map/border-s-sw.png differ diff --git a/data/core/images/terrain/off-map/border-s.png b/data/core/images/terrain/off-map/border-s.png index dbc71ade3bf..49de95a3286 100644 Binary files a/data/core/images/terrain/off-map/border-s.png and b/data/core/images/terrain/off-map/border-s.png differ diff --git a/data/core/images/terrain/off-map/border-se-s-sw-nw.png b/data/core/images/terrain/off-map/border-se-s-sw-nw.png index 9b88fdb2f4b..2d77bc2b588 100644 Binary files a/data/core/images/terrain/off-map/border-se-s-sw-nw.png and b/data/core/images/terrain/off-map/border-se-s-sw-nw.png differ diff --git a/data/core/images/terrain/off-map/border-se-s-sw.png b/data/core/images/terrain/off-map/border-se-s-sw.png index e1af8d8d702..439a8ca323e 100644 Binary files a/data/core/images/terrain/off-map/border-se-s-sw.png and b/data/core/images/terrain/off-map/border-se-s-sw.png differ diff --git a/data/core/images/terrain/off-map/border-se-s.png b/data/core/images/terrain/off-map/border-se-s.png index 556417b50f7..594f6cc8f45 100644 Binary files a/data/core/images/terrain/off-map/border-se-s.png and b/data/core/images/terrain/off-map/border-se-s.png differ diff --git a/data/core/images/terrain/off-map/border-se.png b/data/core/images/terrain/off-map/border-se.png index cfdb4493fc9..64692656bbd 100644 Binary files a/data/core/images/terrain/off-map/border-se.png and b/data/core/images/terrain/off-map/border-se.png differ diff --git a/data/core/images/terrain/off-map/border-sw-nw-n-ne.png b/data/core/images/terrain/off-map/border-sw-nw-n-ne.png index aae80ad971e..6dc189243e8 100644 Binary files a/data/core/images/terrain/off-map/border-sw-nw-n-ne.png and b/data/core/images/terrain/off-map/border-sw-nw-n-ne.png differ diff --git a/data/core/images/terrain/off-map/border-sw-nw-n.png b/data/core/images/terrain/off-map/border-sw-nw-n.png index fd5fae9a4cd..5def5340287 100644 Binary files a/data/core/images/terrain/off-map/border-sw-nw-n.png and b/data/core/images/terrain/off-map/border-sw-nw-n.png differ diff --git a/data/core/images/terrain/off-map/border-sw-nw.png b/data/core/images/terrain/off-map/border-sw-nw.png index 70c61f281d1..68a01474748 100644 Binary files a/data/core/images/terrain/off-map/border-sw-nw.png and b/data/core/images/terrain/off-map/border-sw-nw.png differ diff --git a/data/core/images/terrain/off-map/border-sw.png b/data/core/images/terrain/off-map/border-sw.png index a03e524ba89..7c7f7e301b1 100644 Binary files a/data/core/images/terrain/off-map/border-sw.png and b/data/core/images/terrain/off-map/border-sw.png differ diff --git a/data/core/images/terrain/off-map/border.png b/data/core/images/terrain/off-map/border.png index af1b0dea9ec..39c1d654dbe 100644 Binary files a/data/core/images/terrain/off-map/border.png and b/data/core/images/terrain/off-map/border.png differ diff --git a/data/core/terrain-graphics.cfg b/data/core/terrain-graphics.cfg index 9c6ea27fd0d..102bc3716b1 100644 --- a/data/core/terrain-graphics.cfg +++ b/data/core/terrain-graphics.cfg @@ -17,34 +17,6 @@ # NOTE the terrain _off^_usr gets its definition from the code since it's # themable - - # These are temporary rules for developing and testing a new fake map edge - # terrain - [terrain_graphics] - map=" - , 2 - 2 , 2 - , 1 - 2 , 2 - , 2" - [tile] - pos=1 - type=*^_fme - set_no_flag=fakemapedge - [/tile] - [tile] - pos=2 - type=*^_fme - [/tile] - - [image] - layer=1000 - name=off-map/border.png - center=90,144 - [/image] - [/terrain_graphics] - {NEW:TRANSITION (!,*^_fme) (*^_fme) 1000 off-map/border} - # Editor overlays - for overlays that should only be visible in the editor {EDITOR_OVERLAY *^Xo impassable-editor} {EDITOR_OVERLAY *^Qov unwalkable-editor} diff --git a/data/core/terrain-graphics/borders.cfg b/data/core/terrain-graphics/borders.cfg new file mode 100644 index 00000000000..cee77cebdae --- /dev/null +++ b/data/core/terrain-graphics/borders.cfg @@ -0,0 +1,369 @@ +# This file contains rules responsible for drawing both the standard map border +# as well as the fake map border terrain. +# +# Note that this relies on the _border and _board flags set by the engine. + +[terrain_graphics] + [tile] + x,y=0,0 + type=*^_fme + set_flag=_border + [/tile] +[/terrain_graphics] + +[terrain_graphics] + map=" +, 2 +1 , 2 +, 3 +2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-@R0.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=2 + has_flag=_border + [/tile] + [tile] + pos=3 + no_flag=_border + [/tile] + + rotations=corner_top_left_even,skip,skip,corner_bottom_right_even,skip,skip +[/terrain_graphics] +[terrain_graphics] + map=" +2 +, 3 +1 , 2 +, 2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-@R0.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=2 + has_flag=_border + [/tile] + [tile] + pos=3 + no_flag=_border + [/tile] + + rotations=corner_bottom_left_even,skip,skip,corner_top_right_even,skip,skip +[/terrain_graphics] + +[terrain_graphics] + map=" +1 , 2 +, 4 , 2 +5 , 3 +, 3 +2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-corner_top_left_odd.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=2 + has_flag=_border + [/tile] + [tile] + pos=3 + no_flag=_border + [/tile] + [tile] + pos=4 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-se-s-sw.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=5 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-ne-se.png~NO_TOD_SHIFT() + [/image] + [/tile] +[/terrain_graphics] +[terrain_graphics] + map=" +, 2 , 1 +2 , 4 +, 3 , 5 +. , 3 +, . , 2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-corner_top_right_odd.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=2 + has_flag=_border + [/tile] + [tile] + pos=3 + no_flag=_border + [/tile] + [tile] + pos=4 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-se-s-sw.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=5 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-sw-nw.png~NO_TOD_SHIFT() + [/image] + [/tile] +[/terrain_graphics] +[terrain_graphics] + map=" +2 +, 3 +4 , 3 +, 5 , 2 +1 , 2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-corner_bottom_left_odd.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=2 + has_flag=_border + [/tile] + [tile] + pos=3 + no_flag=_border + [/tile] + [tile] + pos=4 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-ne-se.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=5 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-nw-n-ne.png~NO_TOD_SHIFT() + [/image] + [/tile] +[/terrain_graphics] +[terrain_graphics] + map=" +, . , 2 +. , 3 +, 3 , 4 +2 , 5 +, 2 , 1" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-corner_bottom_right_odd.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=2 + has_flag=_border + [/tile] + [tile] + pos=3 + no_flag=_border + [/tile] + [tile] + pos=4 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-sw-nw.png~NO_TOD_SHIFT() + [/image] + [/tile] + [tile] + pos=5 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border-nw-n-ne.png~NO_TOD_SHIFT() + [/image] + [/tile] +[/terrain_graphics] + +[terrain_graphics] + map=" +, 2 +2 , 2 +, 1 +2 , 2 +, 2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + name=off-map/border-ne-se-s-sw-nw-n.png~NO_TOD_SHIFT() + layer=1000 + [/image] + [/tile] + [tile] + pos=2 + no_flag=_border + has_flag=_board + [/tile] +[/terrain_graphics] +[terrain_graphics] + map=" +, 2 +. , 2 +, 1 +. , 2 +, 2" + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + name=off-map/border-@R0-@R1-@R2-@R3.png~NO_TOD_SHIFT() + layer=1000 + [/image] + [/tile] + [tile] + pos=2 + no_flag=_border + has_flag=_board + [/tile] + + rotations=n,ne,se,s,sw,nw +[/terrain_graphics] +[terrain_graphics] + map=" +, 2 +. , 2 +, 1 +. , 2 +, ." + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + name=off-map/border-@R0-@R1-@R2.png~NO_TOD_SHIFT() + layer=1000 + [/image] + [/tile] + [tile] + pos=2 + no_flag=_border + has_flag=_board + [/tile] + + rotations=n,ne,se,s,sw,nw +[/terrain_graphics] +[terrain_graphics] + map=" +, 2 +. , 2 +, 1 +. , . +, ." + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + name=off-map/border-@R0-@R1.png~NO_TOD_SHIFT() + layer=1000 + [/image] + [/tile] + [tile] + pos=2 + no_flag=_border + has_flag=_board + [/tile] + + rotations=n,ne,se,s,sw,nw +[/terrain_graphics] +[terrain_graphics] + map=" +, 2 +. , . +, 1 +. , . +, ." + [tile] + pos=1 + has_flag=_border + set_no_flag=map_border_drawn + [image] + name=off-map/border-@R0.png~NO_TOD_SHIFT() + layer=1000 + [/image] + [/tile] + [tile] + pos=2 + no_flag=_border + has_flag=_board + [/tile] + + rotations=n,ne,se,s,sw,nw +[/terrain_graphics] + +[terrain_graphics] + [tile] + x,y=0,0 + has_flag=_border + set_no_flag=map_border_drawn + [image] + layer=1000 + name=off-map/border.png~NO_TOD_SHIFT() + [/image] + [/tile] +[/terrain_graphics] diff --git a/data/core/terrain.cfg b/data/core/terrain.cfg index 7b006dae6fb..a48bcb544cb 100644 --- a/data/core/terrain.cfg +++ b/data/core/terrain.cfg @@ -2401,10 +2401,10 @@ For those who go by land or sea, a bridge is the best of both worlds — for gam [terrain_type] symbol_image=off-map/symbol - editor_image=off-map/border-ne-se-s-sw-nw-n + editor_image=off-map/border-editor id=off_map2 - name= _ "Void" - editor_name= _ "Experimental Fake Map Edge" + name="" + editor_name= _ "Fake Map Border" string=^_fme # wmllint: ignore editor_group=special, obstacle hide_help=yes diff --git a/src/display.cpp b/src/display.cpp index adca2577e42..6f98b728468 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1168,7 +1168,8 @@ std::vector display::get_terrain_images(const map_location &loc, // not the location, since the transitions are rendered // over the offmap-terrain and these need a ToD coloring. surface surf; - const bool off_map = image.get_filename() == off_map_name; + const bool off_map = (image.get_filename() == off_map_name || image.get_modifications().find("NO_TOD_SHIFT()") != std::string::npos); + if(off_map) { surf = image::get_image(image, off_map ? image::SCALED_TO_HEX : image_type); } else if(lt.empty()) { @@ -2533,9 +2534,9 @@ void display::draw_invalidated() { draw_hex(loc); drawn_hexes_+=1; // If the tile is at the border, we start to blend it - if(!on_map) { + /*if(!on_map) { draw_border(loc, xpos, ypos); - } + }*/ } invalidated_hexes_ += invalidated_.size(); diff --git a/src/image_modifications.cpp b/src/image_modifications.cpp index 246fa080b3c..74fbe5f0d79 100644 --- a/src/image_modifications.cpp +++ b/src/image_modifications.cpp @@ -1239,6 +1239,12 @@ REGISTER_MOD_PARSER(NOP, ) return nullptr; } +// Only used to tag terrain images which should not be color-shifted by ToD +REGISTER_MOD_PARSER(NO_TOD_SHIFT, ) +{ + return nullptr; +} + // Fake image function used by GUI2 portraits until // Mordante gets rid of it. *tsk* *tsk* REGISTER_MOD_PARSER(RIGHT, )