Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] city_map_size fix and idea
Home

[Freeciv-Dev] Re: [PATCH] city_map_size fix and idea

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Jason Dorje Short <jshort@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Fri, 24 Aug 2001 01:30:50 +0200

On Wed, 22 Aug 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Wed, Aug 22, 2001 at 01:14:36AM -0400, Jason Dorje Short wrote:
>> Jason Dorje Short wrote:
> 
> [Best of all, we may wish to get rid of the idea of local city
> coordinates alltogether and replace them with just a number.  As the
> above sentence shows, the whole idea of local city map coordinates
> is rather confusing anyway.]  -------
> 
> The idea of replacing is nice but this just make the code looking
> more complex and unpleasant.

I don't really think so.  Juggling about two different sets of
coordinates certainly is complex and confusing.

IMHO the best thing to do would be to use global map coordinates
everywhere and do transform them to a table lookup position
(a.k.a. local city coordinates) at some lower level.

>> -      if (map_get_tile(pcity->x+x-2, pcity->y+y-2)->worked) {
>> +      if (map_get_tile(pcity->x+x-CITY_MAP_SIZE/2, 
>> pcity->y+y-CITY_MAP_SIZE/2)->worked) {
> 
> The new is line is really not beautiful.

Correctness first; you're the one who said that...

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
OMNIVERSAL AWARENESS??  Oh, YEH!!  First you need 4 GALLONS of JELL-O
 and a BIG WRENCH!!...  I think you drop th'WRENCH in the JELL-O as if
 it was a FLAVOR, or an INGREDIENT...  ...or...I...um...  WHERE'S the
 WASHING MACHINES?


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