Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#2874) unification of put_one_tile_iso
Home

[Freeciv-Dev] Re: (PR#2874) unification of put_one_tile_iso

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2874) unification of put_one_tile_iso
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 21 Jan 2003 18:38:05 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Mike Kaufman via RT wrote:
> I don't like the function naming here. instead of mapview_*, use gui_*

Namespace is an issue...

First of all, most of the new GUI functions introduced up until this 
point have been temporary.  For instance I introduced put_one_tile_iso() 
in the last patch and remove it in this patch.  This is a side effect of 
a step-by-step migration toward the target (rather than one massive patch).

Up until this point, the function names have also been inconsistent.  I 
think now is the time to start making them consistent - and thus, to 
start thinking about what they should be.

gui_* isn't so good, because it does not differentiate the mapview from 
the cityview.  For instance this patch introduces mapview_put_tile_iso() 
and mapview_put_black_tile().  There could also easily be a 
cityview_put_tile_iso() and cityview_put_black_tile() functions.  These 
would take an additional parameter, a struct city_dialog *.  Note that 
most of the core drawing functions work for both the cityview (city 
dialog) and mapview (map canvas).

Ultimately only a few simple GUI drawing functions will be needed.  The 
simplest of them include:

   mapview_put_sprite(struct Sprite *sprite,
                      int canvas_x, int canvas_y,
                      int sprite_x, int sprite_y,
                      int width, int height);
   mapview_put_sprite_full(struct Sprite *sprite,
                           int canvas_x, int canvas_y);
   cityview_put_sprite_full(struct city_dialog *pdialog,
                            struct Sprite *sprite,
                            int canvas_x, int canvas_y);

and there are more complex ones that add fog, etc.  In gui-gtk these 
will all be wrappers for pixmap_put_*** functions.

But the question is: what should they be named?

jason




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