Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#12593) Graphic errors in the FTWL client
Home

[Freeciv-Dev] Re: (PR#12593) Graphic errors in the FTWL client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12593) Graphic errors in the FTWL client
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Mar 2005 15:07:49 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12593 >

Jason Short wrote:

> Index: utility/ftwl/common_types.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/utility/ftwl/common_types.c,v
> retrieving revision 1.3
> diff -u -r1.3 common_types.c
> --- utility/ftwl/common_types.c       22 Jan 2005 19:45:45 -0000      1.3
> +++ utility/ftwl/common_types.c       23 Mar 2005 23:00:07 -0000
> @@ -328,19 +328,43 @@
>  }
>  
>  /*************************************************************************
> +  Normalize a rectangle by checking for a negative width or height.
> +*************************************************************************/
> +static void ct_normalize_rect(struct ct_rect *rect)
> +{
> +  if (rect->width < 0) {
> +    rect->x += rect->width;
> +    rect->width = -rect->width;
> +  }
> +  if (rect->height < 0) {
> +    rect->y += rect->height;
> +    rect->height = -rect->height;
> +  }
> +}

Hm, I think this is buggy.  It should be

   rect->x += (rect->width + 1);

because of the way width works (and same for height).  However this 
never happens in the current code.

-jason





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