[Freeciv-Dev] Re: (PR#17163) [patch]Don't draw nation borders at coastli
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=17163 >
Zitat von Jason Dorje Short <jdorje@xxxxxxxxx>:
> I think to start with we should do it as a client option (options
> dialog, graphics tab). If we find that everyone likes having it the new
> way, we can remove the option.
I have added this now -- defaulting to enable my change (i.e. no borders on
coast).
Find it attached.
-andreas
Index: options.h
===================================================================
--- options.h (Revision 11963)
+++ options.h (Arbeitskopie)
@@ -159,6 +159,7 @@
extern bool draw_focus_unit;
extern bool draw_fog_of_war;
extern bool draw_borders;
+extern bool draw_borders_on_coast;
extern bool draw_full_citybar;
extern bool draw_unit_shields;
Index: tilespec.c
===================================================================
--- tilespec.c (Revision 11963)
+++ tilespec.c (Arbeitskopie)
@@ -3822,7 +3822,16 @@
struct player *owner0 = tile_get_owner(pedge->tile[0]);
struct player *owner1 = tile_get_owner(pedge->tile[1]);
- if (owner0 != owner1) {
+ /* Find out if this part of the border is _not_ along a coast.
+ * In that case it could be omitted. If draw_borders_on_coast is
+ * set _always_ say "not on coast" so no omissions then */
+ Continent_id continent0 = tile_get_continent(pedge->tile[0]);
+ Continent_id continent1 = tile_get_continent(pedge->tile[1]);
+ int not_coast = (! XOR((continent0 < 0), (continent1 < 0)))
+ || draw_borders_on_coast;
+
+ /* coastline borders are omitted here: */
+ if ((owner0 != owner1) && not_coast) {
if (owner0) {
ADD_SPRITE_SIMPLE(t->sprites.grid.player_borders
[owner0->player_no][pedge->type][0]);
Index: options.c
===================================================================
--- options.c (Revision 11963)
+++ options.c (Arbeitskopie)
@@ -77,6 +77,7 @@
bool popup_new_cities = TRUE;
bool keyboardless_goto = TRUE;
bool show_task_icons = TRUE;
+bool draw_borders_on_coast = FALSE;
/* This option is currently set by the client - not by the user. */
bool update_city_text_in_refresh_tile = TRUE;
@@ -173,6 +174,11 @@
"Disabling this option will display only the city's "
"name and optionally, production."),
COC_GRAPHICS, mapview_redraw_callback),
+ GEN_BOOL_OPTION_CB(draw_borders_on_coast, N_("Draw borders on coastline"),
+ N_("Setting this option will draw complete national
borders."
+ "Disabling this option will omit them on coastlines
which"
+ "form a natural border."),
+ COC_GRAPHICS, mapview_redraw_callback),
GEN_BOOL_OPTION_CB(reqtree_show_icons,
N_("Show icons in the technology tree"),
N_("Setting this option will display icons "
|
|