Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7301) Unified and cached overview
Home

[Freeciv-Dev] (PR#7301) Unified and cached overview

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7301) Unified and cached overview
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 24 Jan 2004 01:09:06 -0800
Reply-to: rt@xxxxxxxxxxx

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


The patch does two things:

First it moves a lot of overview related code to mapview common. This
is possible since we have with struct canvas_store efficiently a nice
abstraction of a canvas. This is enough to remove almost all overview
drawing code from the various guis.

The second part is to cache the overview so that if only the position
of the main map view is changed the overview doesn't have to be
redrawn completely like it is done in the current code.

Both changes result in a lot of code removal:

 control.c             |    1 
 gui-gtk-2.0/mapview.c |   33 ------------------
 gui-gtk/mapview.c     |   91 ++++++++++++++------------------------------------
 gui-mui/mapview.c     |   17 ---------
 gui-stub/mapview.c    |   16 --------
 gui-win32/mapview.c   |   39 ---------------------
 gui-xaw/mapview.c     |   88 ++++++++++++------------------------------------
 include/mapview_g.h   |    7 +--
 mapview_common.c      |   61 +++++++++++++++++++++------------
 mapview_common.h      |    5 +-
 packhand.c            |    2 -
 11 files changed, 95 insertions(+), 265 deletions(-)

Since after my last freetype installation pango doesn't want to work
anymore I was only able to change the gtk1 and xaw client. The changes
to the other clients however are very easy.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "There are three ways to get something done. Do it yourself, hire someone
  to do it for you or forbid your kids to do it."

Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.124
diff -u -u -r1.124 control.c
--- client/control.c    2004/01/20 21:52:06     1.124
+++ client/control.c    2004/01/24 08:58:23
@@ -1142,7 +1142,6 @@
   draw_fog_of_war ^= 1;
   update_map_canvas_visible();
   refresh_overview_canvas();
-  refresh_overview_viewrect();
 }
 
 /**************************************************************************
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.72
diff -u -u -r1.72 mapview_common.c
--- client/mapview_common.c     2004/01/16 02:08:50     1.72
+++ client/mapview_common.c     2004/01/24 08:58:26
@@ -336,7 +336,6 @@
     center_tile_overviewcanvas(map_center_x, map_center_y);
     update_map_canvas_visible();
     update_map_canvas_scrollbars();
-    refresh_overview_viewrect();
     if (hover_state == HOVER_GOTO || hover_state == HOVER_PATROL) {
       create_line_at_mouse_pos();
     }
@@ -1513,6 +1512,25 @@
   }
 }
 
+static void refresh_overview_viewrect(void)
+{
+  int i;
+  int x[4], y[4];
+  struct canvas_store *dest = get_overview_canvas();
+
+  get_mapview_corners(x, y);
+
+  for (i = 0; i < 4; i++) {
+    int src_x = x[i];
+    int src_y = y[i];
+    int dest_x = x[(i + 1) % 4];
+    int dest_y = y[(i + 1) % 4];
+
+    gui_put_line(dest, COLOR_STD_WHITE, LINE_NORMAL, src_x, src_y,
+                dest_x - src_x, dest_y - src_y);
+  }
+}
+
 /**************************************************************************
   Center the overview around the mapview.
 **************************************************************************/
@@ -1534,6 +1552,8 @@
   } else {
     map_overview_y0 = 0;
   }
+  overview_origin_changed(map_overview_x0, map_overview_y0);
+  refresh_overview_viewrect();
 }
 
 /**************************************************************************
@@ -1639,32 +1659,31 @@
 }
 
 /**************************************************************************
-  Find the "base" (unwrapped) overview coordinates for a given map
-  position.  This may be used by the GUI code to draw to the minimap's
-  backing store.
+  Redraw the entire backing store for the overview minimap.
 **************************************************************************/
-void map_to_base_overview_pos(int *base_overview_x, int *base_overview_y,
-                             int map_x, int map_y)
+void refresh_overview_canvas(void)
 {
-  /* Base overview positions are just like native positions, but scaled to
-   * the overview tile dimensions. */
-  map_to_native_pos(base_overview_x, base_overview_y, map_x, map_y);
-  *base_overview_x *= OVERVIEW_TILE_WIDTH;
-  *base_overview_y *= OVERVIEW_TILE_HEIGHT;
+  whole_map_iterate(x, y) {
+    overview_update_tile(x, y);
+  } whole_map_iterate_end;
+  overview_origin_changed(map_overview_x0, map_overview_y0);
+  refresh_overview_viewrect();
 }
 
 /**************************************************************************
-  Redraw the entire backing store for the overview minimap.
+...
 **************************************************************************/
-void base_refresh_overview_canvas(struct canvas_store *pbacking_store)
+void overview_update_tile(int map_x, int map_y)
 {
-  whole_map_iterate(x, y) {
-    int gui_x, gui_y;
+  int base_x, base_y;
 
-    map_to_base_overview_pos(&gui_x, &gui_y, x, y);
-
-    gui_put_rectangle(pbacking_store, overview_tile_color(x, y),
-                     gui_x, gui_y,
-                     OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
-  } whole_map_iterate_end;
+  /* Base overview positions are just like native positions, but scaled to
+   * the overview tile dimensions. */
+  map_to_native_pos(&base_x, &base_y, map_x, map_y);
+  base_x *= OVERVIEW_TILE_WIDTH;
+  base_y *= OVERVIEW_TILE_HEIGHT;
+
+  gui_put_rectangle(get_overview_canvas_store(),
+                   overview_tile_color(map_x, map_y), base_x, base_y,
+                   OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
 }
Index: client/mapview_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.h,v
retrieving revision 1.39
diff -u -u -r1.39 mapview_common.h
--- client/mapview_common.h     2003/09/30 19:01:22     1.39
+++ client/mapview_common.h     2004/01/24 08:58:26
@@ -189,10 +189,9 @@
                         int map_x, int map_y);
 void overview_to_map_pos(int *map_x, int *map_y,
                         int overview_x, int overview_y);
-void map_to_base_overview_pos(int *base_overview_x, int *base_overview_y,
-                             int map_x, int map_y);
 
-void base_refresh_overview_canvas(struct canvas_store *pbacking_store);
+void refresh_overview_canvas(void);
+void overview_update_tile(int x, int y);
 
 void get_mapview_corners(int overview_x_array[4], int overview_y_array[4]);
 
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.345
diff -u -u -r1.345 packhand.c
--- client/packhand.c   2004/01/20 21:52:07     1.345
+++ client/packhand.c   2004/01/24 08:58:29
@@ -328,7 +328,6 @@
 
   if (get_client_state() == CLIENT_GAME_RUNNING_STATE) {
     refresh_overview_canvas();
-    refresh_overview_viewrect();
     player_set_unit_focus_status(game.player_ptr);
 
     update_info_label();       /* get initial population right */
@@ -344,7 +343,6 @@
 
   if (get_client_state() == CLIENT_GAME_OVER_STATE) {
     refresh_overview_canvas();
-    refresh_overview_viewrect();
 
     update_info_label();
     update_unit_focus();
Index: client/gui-gtk/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapview.c,v
retrieving revision 1.187
diff -u -u -r1.187 mapview.c
--- client/gui-gtk/mapview.c    2004/01/11 17:45:03     1.187
+++ client/gui-gtk/mapview.c    2004/01/24 08:58:30
@@ -416,83 +416,46 @@
     return TRUE;
   }
   
-  refresh_overview_viewrect();
+  refresh_overview_canvas();
   return TRUE;
 }
 
 /**************************************************************************
 ...
 **************************************************************************/
-static void set_overview_tile_foreground_color(int x, int y)
+void overview_origin_changed(int origin_x, int origin_y)
 {
-  gdk_gc_set_foreground(fill_bg_gc,
-                       colors_standard[overview_tile_color(x, y)]);
+  int x = origin_x * OVERVIEW_TILE_WIDTH;
+  int y = origin_y * OVERVIEW_TILE_HEIGHT;
+  int w = overview_canvas_store_width;
+  int h = overview_canvas_store_height;
+  int ix = w - x;
+  int iy = h - y;
+
+  gdk_draw_pixmap(overview_canvas->window, fill_bg_gc, overview_canvas_store,
+                 0, 0, ix, iy, x, y);
+  gdk_draw_pixmap(overview_canvas->window, fill_bg_gc, overview_canvas_store,
+                 0, y, ix, 0, x, iy);
+  gdk_draw_pixmap(overview_canvas->window, fill_bg_gc, overview_canvas_store,
+                 x, 0, 0, iy, ix, y);
+  gdk_draw_pixmap(overview_canvas->window, fill_bg_gc, overview_canvas_store,
+                 x, y, 0, 0, ix, iy);
 }
 
-/**************************************************************************
-...
-**************************************************************************/
-void refresh_overview_canvas(void)
-{
-  struct canvas_store store = {overview_canvas_store};
+static struct canvas_store my_store;
 
-  base_refresh_overview_canvas(&store);
-}
-
-
-/**************************************************************************
-...
-**************************************************************************/
-void overview_update_tile(int x, int y)
+struct canvas_store *get_overview_canvas_store(void)
 {
-  int overview_x, overview_y, base_x, base_y;
-
-  map_to_overview_pos(&overview_x, &overview_y, x, y);
-  map_to_base_overview_pos(&base_x, &base_y, x, y);
-  
-  set_overview_tile_foreground_color(x, y);
-  gdk_draw_rectangle(overview_canvas_store, fill_bg_gc, TRUE,
-                    base_x, base_y,
-                    OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);  
-  gdk_draw_rectangle(overview_canvas->window, fill_bg_gc, TRUE,
-                    overview_x, overview_y,
-                    OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
+  my_store.pixmap = overview_canvas_store;
+  my_store.pixcomm = NULL;
+  return &my_store;
 }
 
-/**************************************************************************
-...
-**************************************************************************/
-void refresh_overview_viewrect(void)
+struct canvas_store *get_overview_canvas(void)
 {
-  int x0 = OVERVIEW_TILE_WIDTH * map_overview_x0;
-  int x1 = OVERVIEW_TILE_WIDTH * (map.xsize - map_overview_x0);
-  int y0 = OVERVIEW_TILE_HEIGHT * map_overview_y0;
-  int y1 = OVERVIEW_TILE_HEIGHT * (map.ysize - map_overview_y0);
-  int gui_x[4], gui_y[4], i;
-
-  /* (map_overview_x0, map_overview_y0) splits the map into four
-   * rectangles.  Draw each of these rectangles to the screen, in turn. */
-  gdk_draw_pixmap(overview_canvas->window, civ_gc, overview_canvas_store,
-                 x0, y0, 0, 0, x1, y1);
-  gdk_draw_pixmap(overview_canvas->window, civ_gc, overview_canvas_store,
-                 0, y0, x1, 0, x0, y1);
-  gdk_draw_pixmap(overview_canvas->window, civ_gc, overview_canvas_store,
-                 x0, 0, 0, y1, x1, y0);
-  gdk_draw_pixmap(overview_canvas->window, civ_gc, overview_canvas_store,
-                 0, 0, x1, y1, x0, y0);
-
-  /* Now draw the mapview window rectangle onto the overview. */
-  gdk_gc_set_foreground(civ_gc, colors_standard[COLOR_STD_WHITE]);
-  get_mapview_corners(gui_x, gui_y);
-  for (i = 0; i < 4; i++) {
-    int src_x = gui_x[i];
-    int src_y = gui_y[i];
-    int dest_x = gui_x[(i + 1) % 4];
-    int dest_y = gui_y[(i + 1) % 4];
-
-    gdk_draw_line(overview_canvas->window, civ_gc,
-                 src_x, src_y, dest_x, dest_y);
-  }
+  my_store.pixmap = overview_canvas->window;
+  my_store.pixcomm = NULL;
+  return &my_store;
 }
 
 /**************************************************************************
@@ -572,8 +535,6 @@
        update_map_canvas_visible();
 
        update_map_canvas_scrollbars();
-
-       refresh_overview_viewrect();
       }
       else {
        gdk_draw_pixmap( map_canvas->window, civ_gc, map_canvas_store,
Index: client/gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.85
diff -u -u -r1.85 mapview.c
--- client/gui-gtk-2.0/mapview.c        2004/01/11 17:45:03     1.85
+++ client/gui-gtk-2.0/mapview.c        2004/01/24 08:58:31
@@ -463,7 +463,7 @@
     return TRUE;
   }
   
-  refresh_overview_viewrect();
+  refresh_overview();
   return TRUE;
 }
 
@@ -474,37 +474,6 @@
 {
   gdk_gc_set_foreground(fill_bg_gc,
                        colors_standard[overview_tile_color(x, y)]);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
-void refresh_overview_canvas(void)
-{
-  struct canvas_store store = {overview_canvas_store};
-
-  base_refresh_overview_canvas(&store);
-}
-
-
-/**************************************************************************
-...
-**************************************************************************/
-void overview_update_tile(int x, int y)
-{
-  int overview_x, overview_y, base_x, base_y;
-
-  map_to_overview_pos(&overview_x, &overview_y, x, y);
-  map_to_base_overview_pos(&base_x, &base_y, x, y);
-
-  set_overview_tile_foreground_color(x, y);
-  gdk_draw_rectangle(overview_canvas_store, fill_bg_gc, TRUE,
-                    base_x, base_y,
-                    OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
-  
-  gdk_draw_rectangle(overview_canvas->window, fill_bg_gc, TRUE,
-                    overview_x, overview_y,
-                    OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
 }
 
 /**************************************************************************
Index: client/gui-mui/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/mapview.c,v
retrieving revision 1.63
diff -u -u -r1.63 mapview.c
--- client/gui-mui/mapview.c    2003/11/14 12:26:57     1.63
+++ client/gui-mui/mapview.c    2004/01/24 08:58:31
@@ -378,23 +378,6 @@
 /**************************************************************************
 ...
 **************************************************************************/
-void refresh_overview_canvas(void)
-{
-  DoMethod(main_overview_area, MUIM_Overview_Refresh);
-}
-
-
-/**************************************************************************
-...
-**************************************************************************/
-void overview_update_tile(int x, int y)
-{
-  DoMethod(main_overview_area, MUIM_Overview_RefreshSingle, x, y);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
 void refresh_overview_viewrect(void)
 {
   DoMethod(main_overview_area, MUIM_Overview_Refresh);
Index: client/gui-stub/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-stub/mapview.c,v
retrieving revision 1.35
diff -u -u -r1.35 mapview.c
--- client/gui-stub/mapview.c   2003/11/14 12:26:57     1.35
+++ client/gui-stub/mapview.c   2004/01/24 08:58:31
@@ -126,14 +126,6 @@
 }
 
 /**************************************************************************
-  Update the tile for the given map position on the overview.
-**************************************************************************/
-void overview_update_tile(int map_x, int map_y)
-{
-  /* PORTME */
-}
-
-/**************************************************************************
   Draw a description for the given city.  (canvas_x, canvas_y) is the
   canvas position of the city itself.
 **************************************************************************/
@@ -302,14 +294,6 @@
   Draw a nuke mushroom cloud at the given tile.
 **************************************************************************/
 void put_nuke_mushroom_pixmaps(int map_x, int map_y)
-{
-  /* PORTME */
-}
-
-/**************************************************************************
-  Refresh (update) the entire map overview.
-**************************************************************************/
-void refresh_overview_canvas(void)
 {
   /* PORTME */
 }
Index: client/gui-win32/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/mapview.c,v
retrieving revision 1.85
diff -u -u -r1.85 mapview.c
--- client/gui-win32/mapview.c  2003/12/19 10:39:58     1.85
+++ client/gui-win32/mapview.c  2004/01/24 08:58:33
@@ -415,34 +415,6 @@
 }
 
 /**************************************************************************
-
-**************************************************************************/
-void
-overview_update_tile(int x, int y)
-{
-  HDC hdc;
-  RECT rc;
-  int overview_x, overview_y, base_x, base_y;
-
-  map_to_overview_pos(&overview_x, &overview_y, x, y);
-  map_to_base_overview_pos(&base_x, &base_y, x, y);
- 
-  rc.left = base_x;
-  rc.right = rc.left + OVERVIEW_TILE_WIDTH;
-  rc.top = base_y;
-  rc.bottom = rc.top + OVERVIEW_TILE_HEIGHT;
-  FillRect(overviewstoredc,&rc,brush_std[overview_tile_color(x, y)]);
-
-  hdc=GetDC(root_window);
-  rc.left = overview_x + overview_win_x;
-  rc.top = overview_y + overview_win_y;
-  rc.right = rc.left + OVERVIEW_TILE_WIDTH;
-  rc.bottom = rc.top + OVERVIEW_TILE_HEIGHT;
-  FillRect(hdc,&rc,brush_std[overview_tile_color(x,y)]);
-  ReleaseDC(root_window,hdc);
-}
-
-/**************************************************************************
   Flush the given part of the canvas buffer (if there is one) to the
   screen.
 **************************************************************************/
@@ -836,17 +808,6 @@
     Sleep(1000); 
     update_map_canvas(x-1, y-1, 3, 3, TRUE);
   }
-}
-
-/**************************************************************************
-
-**************************************************************************/
-void
-refresh_overview_canvas(void)
-{
-  struct canvas_store store = {overviewstoredc};
-
-  base_refresh_overview_canvas(&store);
 }
 
 /**************************************************************************
Index: client/gui-xaw/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapview.c,v
retrieving revision 1.151
diff -u -u -r1.151 mapview.c
--- client/gui-xaw/mapview.c    2003/11/19 17:30:51     1.151
+++ client/gui-xaw/mapview.c    2004/01/24 08:58:37
@@ -380,84 +380,43 @@
 
   XtVaGetValues(w, XtNheight, &height, XtNwidth, &width, NULL);
   
-  refresh_overview_viewrect();
+  refresh_overview_canvas();
 }
 
-
-/**************************************************************************
-...
-**************************************************************************/
-static void set_overview_tile_foreground_color(int x, int y)
-{
-  XSetForeground(display, fill_bg_gc,
-                colors_standard[overview_tile_color(x, y)]);
-}
-
-
 /**************************************************************************
 ...
 **************************************************************************/
-void refresh_overview_canvas(void)
+void overview_origin_changed(int origin_x, int origin_y)
 {
-  struct canvas_store store = {overview_canvas_store};
+  int x = origin_x * OVERVIEW_TILE_WIDTH;
+  int y = origin_y * OVERVIEW_TILE_HEIGHT;
+  int w = overview_canvas_store_width;
+  int h = overview_canvas_store_height;
+  int ix = w - x;
+  int iy = h - y;
 
-  base_refresh_overview_canvas(&store);
+  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
+           civ_gc, 0, 0, x, y, ix, iy);
+  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
+           civ_gc, 0, y, x, iy, ix, 0);
+  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
+           civ_gc, x, 0, ix, y, 0, iy);
+  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
+           civ_gc, x, y, ix, iy, 0, 0);
 }
 
+static struct canvas_store my_store;
 
-/**************************************************************************
-...
-**************************************************************************/
-void overview_update_tile(int x, int y)
+struct canvas_store *get_overview_canvas_store(void)
 {
-  int overview_x, overview_y, base_x, base_y;
-
-  map_to_overview_pos(&overview_x, &overview_y, x, y);
-  map_to_base_overview_pos(&base_x, &base_y, x, y);
-
-  set_overview_tile_foreground_color(x, y);
-  XFillRectangle(display, overview_canvas_store, fill_bg_gc,
-                base_x, base_y,
-                OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
-  XFillRectangle(display, XtWindow(overview_canvas), fill_bg_gc, 
-                overview_x, overview_y,
-                OVERVIEW_TILE_WIDTH, OVERVIEW_TILE_HEIGHT);
+  my_store.pixmap = overview_canvas_store;
+  return &my_store;
 }
 
-/**************************************************************************
-...
-**************************************************************************/
-void refresh_overview_viewrect(void)
+struct canvas_store *get_overview_canvas(void)
 {
-  int x0 = OVERVIEW_TILE_WIDTH * map_overview_x0;
-  int x1 = OVERVIEW_TILE_WIDTH * (map.xsize - map_overview_x0);
-  int y0 = OVERVIEW_TILE_HEIGHT * map_overview_y0;
-  int y1 = OVERVIEW_TILE_HEIGHT * (map.ysize - map_overview_y0);
-  int gui_x[4], gui_y[4], i;
-
-  /* (map_overview_x0, map_overview_y0) splits the map into four
-   * rectangles.  Draw each of these rectangles to the screen, in turn. */
-  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
-           civ_gc, x0, y0, x1, y1, 0, 0);
-  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
-           civ_gc, 0, y0, x0, y1, x1, 0);
-  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
-           civ_gc, x0, 0, x1, y0, 0, y1);
-  XCopyArea(display, overview_canvas_store, XtWindow(overview_canvas),
-           civ_gc, 0, 0, x0, y0, x1, y1);
-
-  /* Now draw the mapview window rectangle onto the overview. */
-  XSetForeground(display, civ_gc, colors_standard[COLOR_STD_WHITE]);
-  get_mapview_corners(gui_x, gui_y);
-  for (i = 0; i < 4; i++) {
-    int src_x = gui_x[i];
-    int src_y = gui_y[i];
-    int dest_x = gui_x[(i + 1) % 4];
-    int dest_y = gui_y[(i + 1) % 4];
-
-    XDrawLine(display, XtWindow(overview_canvas), civ_gc,
-             src_x, src_y, dest_x, dest_y);
-  }
+  my_store.pixmap = XtWindow(overview_canvas);
+  return &my_store;
 }
 
 
@@ -522,7 +481,6 @@
       update_map_canvas_visible();
 
       update_map_canvas_scrollbars();
-      refresh_overview_viewrect();
     } else {
       XCopyArea(display, map_canvas_store, XtWindow(map_canvas),
                civ_gc,
Index: client/include/mapview_g.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/include/mapview_g.h,v
retrieving revision 1.41
diff -u -u -r1.41 mapview_g.h
--- client/include/mapview_g.h  2003/11/14 12:26:58     1.41
+++ client/include/mapview_g.h  2004/01/24 08:58:37
@@ -29,7 +29,9 @@
 void set_indicator_icons(int bulb, int sol, int flake, int gov);
 
 void set_overview_dimensions(int x, int y);
-void overview_update_tile(int x, int y);
+void overview_origin_changed(int origin_x,int origin_y);
+struct canvas_store *get_overview_canvas(void);
+struct canvas_store *get_overview_canvas_store(void);
 
 void show_city_desc(struct city *pcity, int canvas_x, int canvas_y);
 void prepare_show_city_descriptions(void);
@@ -72,9 +74,6 @@
 void decrease_unit_hp_smooth(struct unit *punit0, int hp0, 
                             struct unit *punit1, int hp1);
 void put_nuke_mushroom_pixmaps(int x, int y);
-
-void refresh_overview_canvas(void);
-void refresh_overview_viewrect(void);
 
 void draw_segment(int src_x, int src_y, int dir);
 void draw_selection_rectangle(int canvas_x, int canvas_y, int w, int h);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7301) Unified and cached overview, Raimar Falke <=