[Freeciv-Dev] Re: [Patch] MAPSTEP
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, Sep 23, 2001 at 02:31:28PM +0100, Gregory Berkolaiko wrote:
[...]
>
> The reason is that as the next step I plan to implement a
>
> #define GENERAL_DIR8_MAPSTEP(x,y,dir) \
> ((x=(dir==NORTHWEST||dir==WEST||dir==SOUTHWEST)?\
> -1:\
> (dir==NORTH||dir==SOUTH)?\
> 0:\
> (dir==NORTHEAST||dir==EAST||dir==SOUTHEAST)?1:3/0),
> same for y
> )
>
> #if USE_VERTICAL_DIRECTIONS
> #define _MAPSTEP _MAPSTEP with DIR_DX
> #endif
>
> #if USE_OTHER_DIRECTION_SYSTEM
> #define _MAPSTEP GENERAL_DIR8_MAPSTEP
> #endif
>
> So we can and should remove the DIR_DX array.
I am sure we can, but should we?
Instead you can convert DIR_D[XY] to be a function/macro and thus make it
more general while maintaining the current level of readability of the
code.
Best,
G.
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
- [Freeciv-Dev] Re: [Patch] MAPSTEP, (continued)
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Gregory Berkolaiko, 2001/09/23
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Raimar Falke, 2001/09/23
- [Freeciv-Dev] Re: [Patch] MAPSTEP,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Ross W. Wetmore, 2001/09/24
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Ross W. Wetmore, 2001/09/24
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Ross W. Wetmore, 2001/09/25
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Gregory Berkolaiko, 2001/09/24
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [Patch] MAPSTEP, Ross W. Wetmore, 2001/09/25
[Freeciv-Dev] Re: [Patch] MAPSTEP, Ross W. Wetmore, 2001/09/22
|
|