Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8507) generalized tile boundaries
Home

[Freeciv-Dev] Re: (PR#8507) generalized tile boundaries

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8507) generalized tile boundaries
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Wed, 14 Apr 2004 12:23:07 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8507 >

On Tue, 13 Apr 2004, Jason Short wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8507 >
>
> Currently there are a lot of places that draw boundary lines:
>
>    - The map grid.
>    - Borders.
>    - Coastlines.
>    - City selection rectangles.
>    - Unavailable city tiles.
>
> Each of these hard-codes not just the locations of the tile borders but
> also how many borders there are.  It is not easily extensible - for
> instance to use a hex tileset you have to add lots of new code all over
> the place.
>
> My proposal is that a function is created to return the positions of
> each tile boundary:
>
> static bool get_tile_boundaries(enum direction8 dir,
>                               int inset, int width,
>                                  enum draw_type draw,
>                               int *start_x, int *start_y,
>                               int *end_x, int *end_y)

Hmmm, why not simply returns a list of the vertexes of the bounding
convex polygon on a tile, for all directions?

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa






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