[Freeciv-Dev] Re: remove map_canvas_adjust_[xy] (PR#1129)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke writes:
> On Thu, Dec 13, 2001 at 01:46:46AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> > The functions map_canvas_adjust_x and map_canvas_adjust_y are
> > GUI-specific functions listed in the interface specification (i.e.
> > include in gui-stub), but not used anywhere outside of the GUI-specific
> > code.
> >
> > The functions are supposed to wrap X and Y coordinates, and then
> > translate them to fit within the GUI window. This means they are the
> > functional equivalent of Ross's unnormalize_map_pos or my
> > find_representative_map_pos, plus a subtraction of the window origin
> > (I'm sure Ross would point out that they mix concepts badly :-). The
> > major problem is that the interface uses different functions for X and Y
> > coordinates, and will therefore be worthless under any map that doesn't
> > wrap along the X and Y axes.
> >
> > Furthermore, these functions are used very little. gui-gtk and gui-xaw
> > don't even define them. gui-beos has the stub functions in place, but
> > no more. gui-mui does _not_ have the functions defined, but tries to
> > use them anyway in some #defined-out code. gui-win32 does define the
> > functions, and uses them in one place.
> >
> > I therefore see no problem with simply removing them. This will take
> > things one step further toward iso-rectangular maps. In this patch I
> > therefore remove the stub functions from gui-stub and gui-beos, change
> > the pretend usage in gui-mui, remove the functions from gui-win32 and
> > replace their usage with simply get_canvas_xy. This last is the only
> > questionable part of the patch AFAICT, but it looks to me like
> > get_canvas_xy is the more appropriate function to use here anyway. It
> > definitely needs testing, though (since I can't even compile win32...).
>
> Andreas? Ross?
Removed from gui-win32. put_nuke_mushroom works now in both isometric
and non-isometric mode.
Greetings
Andreas Kemnade
|
|