Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: unification of tile_visible_mapcanvas
Home

[Freeciv-Dev] Re: unification of tile_visible_mapcanvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: unification of tile_visible_mapcanvas
From: Jason Dorje Short <vze49r5w@xxxxxxxxxxx>
Date: Wed, 20 Nov 2002 07:47:38 -0500
Reply-to: jdorje@xxxxxxxxxxxxxxxxxxxxx

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



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