Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#4530) rewrite rails/roads code
Home

[Freeciv-Dev] (PR#4530) rewrite rails/roads code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4530) rewrite rails/roads code
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Jul 2003 12:36:34 -0700
Reply-to: rt@xxxxxxxxxxxxxx

The attached patch is a major cleanup to the road/rail drawing code.  It
separates the logic (when to draw roads/rails in which direction) from
the drawing code (which differs between tileset roadstyles).  Overall
the code becomes much shorter (~50 lines, 1200 bytes are cut out), and
several bugs are fixed.

draw_diagonal_roads now works completely.  Also when draw_cities is off,
isolated roads/rails will correctly be drawn on city tiles.

When it comes time to implement roadstyle 2 (civ3 style of roads), it
will be easier because the logic and drawing are separated.

This supercedes PR#2603.

jason

Attachment: roads_rails.diff
Description: roads_rails.diff


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#4530) rewrite rails/roads code, Jason Short <=