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: Thue <thue@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: the directional system
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Sep 2001 12:21:10 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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
   * 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
 - 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
 - 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.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Last year, out in California, at a PC users group, there was a demo of
  smart speech recognition software. Before the demonstrator could begin
  his demo, a voice called out from the audience: "Format c, return. Yes,
  return." Damned short demo, it was.


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