[Freeciv-Dev] Re: the directional system
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 08:50 AM 01/09/07 -0400, Jason Dorje Short wrote:
>Raimar Falke wrote:
[...]
>One other clarification: I've removed the DIR_D[XY]2 arrays, but I've
>changed the DIR_D[XY] arrays to use that directional system so really
>it's everything else that has changed. Trying to find magic code by
>searching for DIR_D[XY] usages is pretty futile; the use of DIR_D[XY]
>itself is quite safe but the problem is when the code tries to
>manipulate the directions directly. This often occurs several levels
>down (for instance in straightest_direction() and get_char() which don't
>use the arrays at all). So, it will be difficult to tell by inspecting
>the code that all "magic" has been removed.
This is worth repeating ... people need to understand, and so far I think
too few actually do.
Actually, there are two points here. Changing DIR_DX under the covers
can cause lots of problems, because you really don't look at each case
where it is used when you just change the semantics/data - the existing
code has not really been cleaned to use a standard approach where such
changes can be done. Also, there are lots of places that assume things
about directions and magic numbers or algorithms like 7-dir.
>jason
Cheers,
RossW
=====
[Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/07
[Freeciv-Dev] Re: the directional system, Ross W. Wetmore, 2001/09/07
- [Freeciv-Dev] Re: the directional system, Jason Dorje Short, 2001/09/08
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/09
- [Freeciv-Dev] Re: the directional system, Jason Dorje Short, 2001/09/09
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/09
- [Freeciv-Dev] Re: the directional system, Jason Dorje Short, 2001/09/09
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/09
|
|