Complete.Org: Mailing Lists: Archives: freeciv-dev: January 1999:
[Freeciv-Dev] Suggestion for diagonal rail connection...
Home

[Freeciv-Dev] Suggestion for diagonal rail connection...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Suggestion for diagonal rail connection...
From: rizos@xxxxxxxx
Date: Tue, 19 Jan 1999 17:12:49 -0600 (CST)

On addition that i suggest to make in the display of diagonal roads/rails
is to _not_draw_ a diagonal rail between two adjacent diagonal railsquares 
when one of their two common neighbour squares is also a rail square.
I.e., a diagonal rail would be drawn here:

 Plain   Rail
       /
  Rail  Plain

but not here:

  Rail   Rail

  Rail   Plain

Since rail gives infinite movement, diagonal rail connection is redundant
in the last case...

The change needed is simple (lines 1306-1309 in client/mapview.c - 
version of 99-01-17); the code should look like:

    rail_semi_tileno+=((tspecial_north_east&S_RAILROAD)
                       &&(!(tspecial_north&S_RAILROAD))
                       &&(!(tspecial_east&S_RAILROAD))) ? (rail_semi_count++, 
1) : 0;
    rail_semi_tileno+=((tspecial_south_east&S_RAILROAD)
                       &&(!(tspecial_south&S_RAILROAD))
                       &&(!(tspecial_east&S_RAILROAD))) ? (rail_semi_count++, 
2) : 0;
    rail_semi_tileno+=((tspecial_south_west&S_RAILROAD)
                       &&(!(tspecial_south&S_RAILROAD))
                       &&(!(tspecial_west&S_RAILROAD))) ? (rail_semi_count++, 
4) : 0;
    rail_semi_tileno+=((tspecial_north_west&S_RAILROAD) 
                       &&(!(tspecial_north&S_RAILROAD))
                       &&(!(tspecial_west&S_RAILROAD))) ? (rail_semi_count++, 
8) : 0;

Regards,
--rizos


[Prev in Thread] Current Thread [Next in Thread]