Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3783) support for pixel_border bigger that 1
Home

[Freeciv-Dev] Re: (PR#3783) support for pixel_border bigger that 1

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3783) support for pixel_border bigger that 1
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Mar 2003 10:11:50 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 2003-03-24 at 12:58, Rafa³ Bursig wrote:

> Some time ago I try 128x64 tileset theme. Simple way to get such 
> grapchics is resize exist tilesets x 2 but problem is that pixel 
> borders are resize too. I haven to edit those graphics or add support 
> for that bigger pixel border. ( I prefered secound )
> 
> method is easy :
> is_pixel_border = 0 - no pixel border
> is_pixel_border = 1 - pixel border exist ( 1 pixel )
> is_pixel_border = 2 - pixel border exist ( 2 pixels )

Changing this value from a boolean to an integer is quite reasonable. 
But we also need to rename it if we do this, while keeping
backward-compatibility at the same time.  This becomes a bit ugly, but I
think the loading code could be something like

  if (secfile_lookup_bool_default(file, FALSE,
                                  "%s.is_pixel_border", ...) {
    pixel_border = 1;
  } else {
    pixel_border = secfile_lookup_int_default(file, 0,
                     "%s.pixel_border", ...);
  }

Which would keep backward-compatibility while changing the variable name
to match the new meaning.

jason




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