Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7385) overview isn't updated
Home

[Freeciv-Dev] Re: (PR#7385) overview isn't updated

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7385) overview isn't updated
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Wed, 11 Feb 2004 11:30:59 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7385 >

On Tue, Feb 10, 2004 at 10:59:20PM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7385 >
> 
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7385 >
> > 
> > On Mon, Feb 09, 2004 at 02:08:27AM -0800, Raimar Falke wrote:
> > 
> >>Alternative suggestions:
> >> - a flag which is set every time the overview (backing store) is
> >> updated and cleared when the backing store is copied to the screen
> > 
> > 
> > Untested patch for this attached.
> 
> A workable concept. 

> But it won't work for recentering the map (no dirtying),

It already works for this:

static void center_tile_overviewcanvas(int map_x, int map_y)
{
...
  redraw_overview();
}

> and possibly not for expose events either (although these do seem to
> work).

void refresh_overview_canvas(void)
{
...
  redraw_overview();
}

> I'd do the interface a bit differently:
> 
>    dirty_overview() => sets dirty flag
>      (or queue_overview_redraw())
> 
>    flush_dirty_overview() => checks dirty flag, calls redraw
>      (or unqueue_overview_redraw())
> 
>    redraw_overview => doesn't check dirty flag
> 
> flush_dirty_overview() can be called from inside unqueue_mapview_updates().
> 
> In future the queue and dirty systems should be merged, though I'm not 
> quite sure how to do this.

I could do this but then the two cases above would be changed to:
  dirty_overview();
  flush_dirty_overview();
which seems rather silly.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "How about the new language C&? No, that's not 'c ampersand', 'c reference', 
  'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the 
  hell out of people who are unfamiliar with it, and it will, of course, 
  have no pointers."
    -- Xazziri in comp.lang.c++ about C#




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