[Freeciv-Dev] Re: unification of tile_visible_mapcanvas
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
bursig@xxxxxxxxx wrote:
Hi again :)
I repeat my ask this time about tile_visible_mapcanvas(...).
Leave it on gui side. I don't use get_canvas_xy and freeciv common position
system.
There is no real "freeciv common position system". The
recently-introduced get_mapview_dimensions is a first step toward such a
system, though. All you have to do is implement that function and all
of these features should work.
This concern : center_tile_mapcanvas(int col, int row),
get_center_tile_mapcanvas(int *pCol, int *pRow),
tile_visible_mapcanvas(int col, int row),
tile_visible_and_not_on_border_mapcanvas(int col, int row),
etc.
This just isn't good :-(.
The general issue is that if gui-SDL differs from all of the other
clients, it will be much harder to maintain it.
Specifically, gen-topologies will require significant changes in the
GUI. To support iso-rectangular maps (like what Civ2 uses) requires
changes in a whole host of places. If you implement custom code for
each of these functions, that makes it _much_ harder to make the
necessary changes.
Another example is that it takes a lot more work for you to write custom
code to do the same things the common code does. For instance, your
get_mcell_xy is the equivalent of get_map_xy - but it hard-codes a 64x32
isometric tileset. All you get in return is a slight speed boost. This
is not a good tradeoff.
If you get a chance, you should jump onto IRC - #freeciv on
irc.openprojects.net - to discuss these issues and how they may be
resolved for the SDL client.
jason
|
|