Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6442) gen5 wrapping
Home

[Freeciv-Dev] Re: (PR#6442) gen5 wrapping

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6442) gen5 wrapping
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Tue, 14 Oct 2003 19:49:38 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Much cleaner with almost no chance now for unintended side effects.

Karen actually set it up that way so the fix would be as painless as
possible. It actually keeps her code pretty much intact even to the
consistent rationale she used in naming and such being left alone
(plus all the other good programming benefits mentionned previously).

This one should be checked in ASAP.

Cheers,
RossW
=====

Jason Short wrote:
> Jason Short wrote:
> 
>>This simple patch replaces two gen5 wrapping constants with queried 
>>topology values.
> 
> 
> Here's an alternative form that makes Ross happy, at the cost of being 
> less readible.
> 
> jason
> 
> ------------------------------------------------------------------------
> 
> Index: server/mapgen.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/server/mapgen.c,v
> retrieving revision 1.118
> diff -u -r1.118 mapgen.c
> --- server/mapgen.c   2003/10/03 11:29:31     1.118
> +++ server/mapgen.c   2003/10/13 21:45:19
> @@ -2099,8 +2099,8 @@
>  **************************************************************************/
>  static void mapgenerator5(void)
>  {
> -  const bool xnowrap = FALSE;        /* could come from topology */
> -  const bool ynowrap = TRUE; /* could come from topology */
> +  const bool xnowrap = !topo_has_flag(TF_WRAPX);
> +  const bool ynowrap = !topo_has_flag(TF_WRAPY);
>  
>    /* 
>     * How many blocks should the x and y directions be divided into




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