[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]
Ross W. Wetmore writes:
>
> Since these are all gone from the corecleanups, I have no problems with
> their removal. Since they are mostly misplaced (un)normalize_map_pos()
> (the canvas doesn't have any adjustable capability), this is the default
> algorithm.
>
> In some cases they reflect the wrap (for x) or clip( for y) specific
> functions needed to handle the standard map. But as the GUI is rewritten,
> these should all get done generically, and any current fix will likely go
> away. With a modest amount of sanity testing to insure the intermediate
> world is not unusable, anything is suitable.
>
> Note, get_canvas_xy() rescales to pixel coordinates, which these don't
> do, right?
>
map_canvas_adjust_[xy] was used before we had isometric view to
calculate the pixel coordinates to draw something.
The result had to be scaled to the pixel coordinates. There was stuff
like
canvas_x=NORMAL_TILE_WIDTH*map_canvas_adjust_x(map_x)
When isometric mode was introduced, this was replaced by
get_canvas_xy(). I have changed most of the gui-win32 code (It was not
in cvs yet). But I've forgotten to update put_nuke_mushroom_pixmaps.
Nobody noticed that.
Greetings
Andreas Kemnade
|
|