Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#3424) New flush code soplited in 2 parts
Home

[Freeciv-Dev] Re: (PR#3424) New flush code soplited in 2 parts

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3424) New flush code soplited in 2 parts
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 15 Feb 2003 03:22:20 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sat, Feb 15, 2003 at 02:32:35AM -0800, Rafa³ Bursig wrote:
> > Naming: all three function should have the same prefix
> > Coding-Style: read the guide.
> >  +void add_to_flush( int canvas_x , int canvas_y ,
> >                     ^            ^  remove these
> >                     1             2
> 
> 1) I still prefer name "add_to_flush" than "flush_add_to".

What do you think about:

flush_add_region
flush_add_all_as_region
flush_all_regions

> 2) no... becouse this is "vital" name. This say you that you must put 
> here screen position not map position.

This is about the spaces and not the arguments.

> This code don't care what do you flush : map tiles, city description or 
> gui widgets it simply make screen area flush.

I know.

> > Purpose: why do you remove the final flush_mapcanvas in
> > update_map_canvas_visible only to add a call to flush_rects after the
> > call of update_map_canvas_visible in control.c? Won't adding "bool
> > write_to_screen" to update_map_canvas_visible be better here?
> > 
> 
> Becouse flush_rects() is call in 
> client/packhand/handle_processing_finished(void) and
> client/packhand/handle_thaw_hint(void).
> AND THIS I MAIN VITAL CALLs OF FLSH_RECTS().

I know.

> you get flush of update_map_canvas_visible after last package come but 
> problem is with all client inside redraw actions without net access and 
> that is reason I put flush_rects() into control.c and in some other 
> places.

I know.

> If you put flush_rects() at end of update_map_canvas_visible then flush 
> is made after redraw map and redraw city descriptions but sdl client 
> have additional widget layer which is redrawed with other net packages.

I know. I proposed to change
  void update_map_canvas_visible(void)
to
  void update_map_canvas_visible(bool write_to_screen)

And add
  if(write_to_screen) {
    // call flush function
  }
at the end of it.

> if you focus to next unit then :
> - recenter map or redraw old and new unit ( you want flush here )
> - redraw unit info window ,order_butons, etc.
> - flush at end foncus to next unit net connection.
> 
> In this way you for moment (depend on CPU and net lag) see new unit on 
> map and desciption of old unit.

> Other client are secure of this becous they current don't use this 
> method and make flush dirrect in update_map_canvas_visible. 
> (add_to_flush( x , y, w , h ) == flush_mapcanvas(x , y, w , h))

I know.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Of course, someone who knows more about this will correct me if I'm
  wrong, and someone who knows less will correct me if I'm right."
    -- David Palmer (palmer@xxxxxxxxxxxxxxxxxx)




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