[Freeciv-Dev] Re: get_canvas_xy unification (PR#1054)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> Andreas Kemnade wrote:
> > jdorje@xxxxxxxxxxxxxxxxxxxxx writes:
> > > The attached patch makes a new common function, base_get_canvas_xy,
> > > which is called by get_canvas_xy for each GUI platform.
> > >
> > > There are several advantages to this: it reduces overall code,
> > > consolidates places where changes will have to be made in the GUI, and
> > > provides isometric-view capabilities to this function for all GUI's.
> > >
> > > get_canvas_xy is kept around because the variables needed by
> > > base_get_canvas_xy are not common. But they should be. I would propose
> > > a naming system that is a cross between the win32 and gtk current
> > > systems: map_view_x0/map_view_y0 for the top-left window corner,
> > > map_win_width/map_win_height for the canvas width and height. Currently
> > > map_canvas_store_twidth/map_canvas_store_theight are used for the canvas
> > > width in tiles; these are misnamed but I'm not sure what would be better
> > > (map_win_twidth/map_win_theight, perhaps?). This patch is a big step
> > > toward an eventual total unification.
> > >
> > > Platforms tested: gtk
> > > Untested: xaw (I'll test shortly), win32, mui
> > Works on win32.
> How about the attached patch instead? It also unifies get_map_xy and
The win32 client still works.