Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: the directional system
Home

[Freeciv-Dev] Re: the directional system

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: the directional system
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Sep 2001 19:47:13 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Sep 10, 2001 at 12:43:03PM +0200, Raimar Falke wrote:
> On Mon, Sep 10, 2001 at 06:33:48AM -0400, Jason Dorje Short wrote:
> > Raimar Falke wrote:
> > > 
> > > On Sun, Sep 09, 2001 at 07:53:13PM +0200, Thue wrote:
> > > > On Sunday 09 September 2001 18:59, Raimar Falke wrote:
> > > > > This must be the point Ross is referring to. So the comment in
> > > > > hires/terrain1.spec ";roads - we follow the the numbering of the
> > > > > DIR_D[XY] arrays" is wrong?!
> > > >
> > > > Yes, looks like it should be DIR_D[XY]2 arrays.
> > > >
> > > > > > (Or you could change the rest of freeciv to use DIR_DX2 as
> > > > > > suggested, which may just require changing DIR_REVERSE)
> > > > >
> > > > > This is the plan Justin and Ross currently follow.
> > > > >
> > > > > Changing the spec file looks like the easiest solution to me.
> > > > >
> > > > >     Raimar
> > > >
> > > > Both look like acceptable solutions to me, with pros and cons; I don't
> > > > feel strongly that one is clearly superior. For my sake you can just
> > > > pick one :).
> > > 
> > > Problem: Freeciv's primary direction system (DIR_DX) is used in most
> > > code places. Freeciv is or will be after a few patches independent in
> > > this respect of the direction system used.
> > > 
> > > Non-isometric tilesets are layouted in INDEX_NSEW. The isometric
> > > tileset is layouted in DIR_DX2.
> > > 
> > > Solutions:
> > >  - unify the systems
> > 
> > I definitely think we want to unify the systems.
> > 
> > >    * to DIR_DX: the isometric tileset (loading) has to be changed
> > >      (specfile changing, mapping at some point)
> > >    * to DIR_DX2: a some of code has to be checked if it works with
> > >      DIR_DX2 (this is a good thing). However we tie a lot of code to
> > >      the DIR_DX2 system and so loose flexibility
> > 
> > But, we should unify them to something that is schema-independent. 
> > Neither of these solutions have that.
> > 
> > >  - one big system and one small system: move all the DIR_DX2 stuff
> > >  into fill_tile_sprite_array_iso() or at least into tilespec.c
> > 
> > Ross likes to point out that the GUI schema can be independent of the
> > rest of the code, but IMO it's much simpler just to have one system.
> > 
> > >  - get rid of this problem: change the way the road and rail graphics
> > >  are handled. Instead of indexes use symbolic names. Change
> > >  11, 1, "r.road0"
> > >  11, 2, "r.road1"
> > > to
> > >  11, 1, "r.road_n"
> > >  11, 2, "r.road_ne"
> > > and
> > >       struct Sprite *dir[8];
> > > to
> > >       struct { struct Sprite *n,*nw,*ne,....;} iso;
> > > 
> > > in struct named_sprites.{road,rail}. This may include some extra work
> > > but leave us with less problems in the long run.
> > 
> > This is a far better solution.  It makes things easier to write and
> > understand.  It may be wise to allow either "n" or "north" to be used
> > interchangably for the symbolic name.
> 
> Who makes the patch?

I made it. Objections?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "- Amiga Y2K fixes (a bit late, wouldn't you say?)"
    -- Linus Torvalds about linux 2.4.0 at 4 Jan 2001

Attachment: dir_dx2.diff
Description: Text document


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