[Freeciv-Dev] Re: (PR#3017) unification of put_one_tile
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
> On Fri, Feb 07, 2003 at 04:10:10AM -0800, Jason Short via RT wrote:
>
>>put_one_tile() is the core drawing routine for non-iso mode. This
>>function moves it into mapview_common.
>>
>>This makes it a rather large patch, but this is difficult to avoid. It
>>doesn't seem like the function should be broken up (to move it in
>>pieces), and it is fairly long (100+ lines).
>>
>>Three new GUI functions are added: gui_put_sprite_full,
>>gui_put_rectangle, and gui_put_line. These should be pretty
>>self-explanatory.
>>
>>The implementation for gui-sdl is incomplete (gui-sdl does not use
>>non-iso mode so there is no code to base it on). There is a bug in the
>>win32 client: gui_put_rectangle doesn't work (nor does the same code
>>work in current CVS; try turning off terrain). gui-gtk, gui-gtk-2.0,
>>and gui-xaw clients have been tested and work.
>>
>>The only ugly part of this patch is in the drawing of goto lines. here
>>instead of the local gui function put_line I just call draw_segment.
>>This results in a bit of extra drawing, but is otherwise okay. Note
>>that the current goto-line-drawing system is already (slightly) broken:
>>it doesn't work for animation (i.e., single_tile_pixmap). Another patch
>>will be able to fix this.
>
>
> The semantic of put_one_tile(NULL,..) isn't documented.
Good point; that's bad.
> I don't like
> it. Why can't we explicitly pass the mapcanvas_store?
The caller doesn't have any pointers to mapcanvas_store. This variable
is GUI-only, and may not even be a pointer. We could add a canvas_t
*mapcanvas_store to mapview_common.h, but I don't think that would gain
us much in the short term. In the long term I think a better solution
is possible.
jason
|
|