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

[Freeciv-Dev] (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: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3424) New flush code soplited in 2 parts
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Thu, 13 Feb 2003 16:50:59 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Hi

Next step to new buffer code in SDLClient.

This is secound version of New Flush code.

add_to_flush( x , y, w , h ) - save redrawed arrea in rect array.
flush_rects(void) - flush stored rects in one call.
add_all_to_flush(void) - save entire screen to flush and block adding 
new rect to array untill flush_rects() funct is call.

For All Clients ( exept SDLClient ) this give the same current 
functionality becouse
add_to_flush( x , y, w , h ) function call flush_mapcanvas(x , y, w , 
h) and
flush_rects(void) , add_all_to_flush(void) are empty.

In future Client Maintainers can make own flush code based on this 
functions.

But current SDLClient can use additonnal flush extensions.

this code was split on two sub-patches :
1) add new API functions and set basic functionality of this code.
2) change all call of refresh_tile_mapcanvas(map_x, mao_y, TRUE) to
     refresh_tile_mapcanvas(map_x, map_y, FALSE).

Secound wouldn't have any influenceon other clients becouse :
TRUE -> call flush_mapcanvas(x , y, w , h).
FALSE -> call add_to_flush( x , y, w , h ).

Rafal
diff -u -r freeciv/client/climisc.c fc3/client/climisc.c
--- freeciv/client/climisc.c    Thu Feb 13 16:48:19 2003
+++ fc3/client/climisc.c        Thu Feb 13 23:00:59 2003
@@ -368,6 +367,7 @@
   OUT:
     ;                          /* do nothing */
   }
+  flush_rects();
 }
 
 /**************************************************************************
diff -u -r freeciv/client/control.c fc3/client/control.c
--- freeciv/client/control.c    Thu Feb 13 16:48:19 2003
+++ fc3/client/control.c        Thu Feb 13 23:25:09 2003
@@ -915,6 +914,7 @@
 
   draw_map_grid^=1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -928,6 +928,7 @@
 
   draw_city_names ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
  
  /**************************************************************************
@@ -941,6 +942,7 @@
 
   draw_city_growth = !draw_city_growth;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -954,6 +956,7 @@
 
   draw_city_productions ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -967,6 +970,7 @@
 
   draw_terrain ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -980,6 +984,7 @@
 
   draw_coastline ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -993,6 +998,7 @@
 
   draw_roads_rails ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1006,6 +1012,7 @@
 
   draw_irrigation ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1019,6 +1026,7 @@
 
   draw_mines ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1032,6 +1040,7 @@
 
   draw_fortress_airbase ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1045,6 +1054,7 @@
 
   draw_specials ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1058,6 +1068,7 @@
 
   draw_pollution ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1071,6 +1082,7 @@
 
   draw_cities ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1084,6 +1096,7 @@
 
   draw_units ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1097,6 +1110,7 @@
 
   draw_focus_unit ^= 1;
   update_map_canvas_visible();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1112,6 +1126,7 @@
   update_map_canvas_visible();
   refresh_overview_canvas();
   refresh_overview_viewrect();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -1121,8 +1136,10 @@
 {
   struct unit *punit;
   
-  if((punit=get_unit_in_focus()))
+  if((punit=get_unit_in_focus())) {
     center_tile_mapcanvas(punit->x, punit->y);
+    flush_rects();
+  }
 }
 
 /**************************************************************************
diff -u -r freeciv/client/gui-gtk/mapview.c fc3/client/gui-gtk/mapview.c
--- freeciv/client/gui-gtk/mapview.c    Sun Feb  9 10:22:27 2003
+++ fc3/client/gui-gtk/mapview.c        Fri Feb 14 00:07:25 2003
@@ -905,6 +907,34 @@
   gdk_draw_pixmap(map_canvas->window, civ_gc, map_canvas_store,
                  canvas_x, canvas_y, canvas_x, canvas_y,
                  pixel_width, pixel_height);
+
+}
+
+/**************************************************************************
+  Save Flush area used by "end" flush.
+**************************************************************************/
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height )
+{
+  flush_mapcanvas(canvas_x, canvas_y,
+                    pixel_width, pixel_height);
+}
+
+/**************************************************************************
+  Sellect entire screen area to "end" flush and block "save" new areas.
+**************************************************************************/
+void add_all_to_flush(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
+  Make "end" Flush "saved" parts/areas of the buffer(s) to the screen.
+  Function is called in handle_procesing_finished and handle_thaw_hint
+**************************************************************************/
+void flush_rects(void)
+{
+  /* Port ME */
 }
 
 /**************************************************************************
diff -u -r freeciv/client/gui-gtk-2.0/mapview.c fc3/client/gui-gtk-2.0/mapview.c
--- freeciv/client/gui-gtk-2.0/mapview.c        Sun Feb  9 10:22:27 2003
+++ fc3/client/gui-gtk-2.0/mapview.c    Thu Feb 13 23:54:17 2003
@@ -937,6 +939,33 @@
 }
 
 /**************************************************************************
+  Save Flush area used by "end" flush.
+**************************************************************************/
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height )
+{
+  flush_mapcanvas(canvas_x, canvas_y,
+                    pixel_width, pixel_height);
+}
+
+/**************************************************************************
+  Sellect entire screen area to "end" flush and block "save" new areas.
+**************************************************************************/
+void add_all_to_flush(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
+  Make "end" Flush "saved" parts/areas of the buffer(s) to the screen.
+  Function is called in handle_procesing_finished and handle_thaw_hint
+**************************************************************************/
+void flush_rects(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
  Update display of descriptions associated with cities on the main map.
 **************************************************************************/
 void update_city_descriptions(void)
diff -u -r freeciv/client/gui-sdl/mapview.c fc3/client/gui-sdl/mapview.c
--- freeciv/client/gui-sdl/mapview.c    Thu Feb 13 16:48:21 2003
+++ fc3/client/gui-sdl/mapview.c        Fri Feb 14 00:25:57 2003
@@ -252,6 +327,31 @@
   return iRet;
 }
 
+/**************************************************************************
+  Save Flush area used by "end" flush.
+**************************************************************************/
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height )
+{
+  add_refresh_region( canvas_x , canvas_y , pixel_width , pixel_height );
+}
+
+/**************************************************************************
+  Sellect entire screen area to "end" flush and block "save" new areas.
+**************************************************************************/
+void add_all_to_flush(void)
+{
+  Main.rects_count = RECT_LIMIT;
+}
+
+/**************************************************************************
+  Make "end" Flush "saved" parts/areas of the buffer(s) to the screen.
+  Function is called in handle_procesing_finished and handle_thaw_hint
+**************************************************************************/
+void flush_rects(void)
+{
+    refresh_rects();
+}
 
 /**************************************************************************
   Finds the pixel coordinates of a tile. Save setting of the results in
diff -u -r freeciv/client/gui-stub/mapview.c fc3/client/gui-stub/mapview.c
--- freeciv/client/gui-stub/mapview.c   Sun Feb  9 10:22:27 2003
+++ fc3/client/gui-stub/mapview.c       Thu Feb 13 23:51:00 2003
@@ -224,6 +224,31 @@
   /* PORTME */
 }
 
+/**************************************************************************
+  Save Flush area used by "end" flush.
+**************************************************************************/
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height )
+{
+  /* Port ME */
+}
+
+/**************************************************************************
+  Sellect entire screen area to "end" flush and block "save" new areas.
+**************************************************************************/
+void add_all_to_flush(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
+  Make "end" Flush "saved" parts/areas of the buffer(s) to the screen.
+  Function is called in handle_procesing_finished and handle_thaw_hint
+**************************************************************************/
+void flush_rects(void)
+{
+  /* Port ME */
+}
 
 /**************************************************************************
   Update (refresh) the locations of the mapview scrollbars (if it uses
diff -u -r freeciv/client/gui-win32/mapview.c fc3/client/gui-win32/mapview.c
--- freeciv/client/gui-win32/mapview.c  Sun Feb  9 10:22:27 2003
+++ fc3/client/gui-win32/mapview.c      Thu Feb 13 23:58:12 2003
@@ -674,6 +674,33 @@
 }
 
 /**************************************************************************
+  Save Flush area used by "end" flush.
+**************************************************************************/
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height )
+{
+  flush_mapcanvas(canvas_x, canvas_y,
+                    pixel_width, pixel_height);
+}
+
+/**************************************************************************
+  Sellect entire screen area to "end" flush and block "save" new areas.
+**************************************************************************/
+void add_all_to_flush(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
+  Make "end" Flush "saved" parts/areas of the buffer(s) to the screen.
+  Function is called in handle_procesing_finished and handle_thaw_hint
+**************************************************************************/
+void flush_rects(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
 
 **************************************************************************/
 void update_map_canvas_scrollbars_size(void)
diff -u -r freeciv/client/gui-xaw/mapview.c fc3/client/gui-xaw/mapview.c
--- freeciv/client/gui-xaw/mapview.c    Sun Feb  9 10:22:27 2003
+++ fc3/client/gui-xaw/mapview.c        Thu Feb 13 23:58:12 2003
@@ -671,6 +673,33 @@
 }
 
 /**************************************************************************
+  Save Flush area used by "end" flush.
+**************************************************************************/
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height )
+{
+  flush_mapcanvas(canvas_x, canvas_y,
+                    pixel_width, pixel_height);
+}
+
+/**************************************************************************
+  Sellect entire screen area to "end" flush and block "save" new areas.
+**************************************************************************/
+void add_all_to_flush(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
+  Make "end" Flush "saved" parts/areas of the buffer(s) to the screen.
+  Function is called in handle_procesing_finished and handle_thaw_hint
+**************************************************************************/
+void flush_rects(void)
+{
+  /* Port ME */
+}
+
+/**************************************************************************
 ...
 **************************************************************************/
 void update_map_canvas_scrollbars(void)
diff -u -r freeciv/client/include/mapview_g.h fc3/client/include/mapview_g.h
--- freeciv/client/include/mapview_g.h  Sun Feb  9 10:22:27 2003
+++ fc3/client/include/mapview_g.h      Thu Feb 13 22:43:04 2003
@@ -51,7 +52,11 @@
                    int width, int height);
 void flush_mapcanvas(int canvas_x, int canvas_y,
                     int pixel_width, int pixel_height);
-
+void add_to_flush( int canvas_x , int canvas_y ,
+                    int pixel_width , int pixel_height );
+void add_all_to_flush(void);
+void flush_rects(void);
+                   
 void update_map_canvas_scrollbars(void);
 
 void put_cross_overlay_tile(int x,int y);
diff -u -r freeciv/client/mapview_common.c fc3/client/mapview_common.c
--- freeciv/client/mapview_common.c     Sun Feb  9 10:22:27 2003
+++ fc3/client/mapview_common.c Fri Feb 14 00:02:32 2003
@@ -40,7 +40,7 @@
   }
 
   if (tile_visible_mapcanvas(x, y)) {
-    update_map_canvas(x, y, 1, 1, FALSE);
+    update_map_canvas(x, y, 1, 1, write_to_screen);
 
     if (write_to_screen && (draw_city_names || draw_city_productions)) {
       /* FIXME: update_map_canvas() will overwrite the city descriptions.
@@ -86,15 +86,6 @@
        }
       }
     }
-
-    if (write_to_screen) {
-      int canvas_start_x, canvas_start_y;
-
-      get_canvas_xy(x, y, &canvas_start_x, &canvas_start_y);
-      canvas_start_y += NORMAL_TILE_HEIGHT - UNIT_TILE_HEIGHT;
-      flush_mapcanvas(canvas_start_x, canvas_start_y,
-                     UNIT_TILE_WIDTH, UNIT_TILE_HEIGHT);
-    }
   }
   overview_update_tile(x, y);
 }
@@ -528,6 +520,7 @@
 void update_map_canvas(int x, int y, int width, int height, 
                       bool write_to_screen)
 {
+  int canvas_start_x, canvas_start_y;
   freelog(LOG_DEBUG,
          "update_map_canvas(pos=(%d,%d), size=(%d,%d), write_to_screen=%d)",
          x, y, width, height, write_to_screen);
@@ -602,21 +595,19 @@
 
 
     /* Lastly draw our changes to the screen. */
-    if (write_to_screen) {
-      int canvas_start_x, canvas_start_y;
-
-      /* top left corner */
-      get_canvas_xy(x, y, &canvas_start_x, &canvas_start_y);
+   /* top left corner */
+   get_canvas_xy(x, y, &canvas_start_x, &canvas_start_y);
 
-      /* top left corner in isometric view */
-      canvas_start_x -= height * NORMAL_TILE_WIDTH / 2;
+   /* top left corner in isometric view */
+   canvas_start_x -= height * NORMAL_TILE_WIDTH / 2;
 
-      /* because of where get_canvas_xy() sets canvas_x */
-      canvas_start_x += NORMAL_TILE_WIDTH / 2;
+   /* because of where get_canvas_xy() sets canvas_x */
+   canvas_start_x += NORMAL_TILE_WIDTH / 2;
 
-      /* And because units fill a little extra */
-      canvas_start_y -= NORMAL_TILE_HEIGHT / 2;
+   /* And because units fill a little extra */
+   canvas_start_y -= NORMAL_TILE_HEIGHT / 2;
 
+   if (write_to_screen) {
       /* Here we draw a rectangle that includes the updated tiles.  This
        * method can fail if the area wraps off one side of the screen and
        * back to the other (although this will not be a problem for
@@ -625,7 +616,12 @@
                      (height + width) * NORMAL_TILE_WIDTH / 2,
                      (height + width) * NORMAL_TILE_HEIGHT / 2
                      + NORMAL_TILE_HEIGHT / 2);
-    }
+   } else {
+      add_to_flush(canvas_start_x, canvas_start_y,
+                     (height + width) * NORMAL_TILE_WIDTH / 2,
+                     (height + width) * NORMAL_TILE_HEIGHT / 2
+                     + NORMAL_TILE_HEIGHT / 2);
+   }
 
   } else {
     /* not isometric */
@@ -641,15 +637,18 @@
       }
     }
 
+    get_canvas_xy(x, y, &canvas_start_x, &canvas_start_y);
     if (write_to_screen) {
-      int canvas_x, canvas_y;
-
+     
       /* Here we draw a rectangle that includes the updated tiles.  This
        * method can fail if the area wraps off one side of the screen and
        * back to the other (although this will not be a problem for
-       * update_map_canvas_visible(). */
-      get_canvas_xy(x, y, &canvas_x, &canvas_y);
-      flush_mapcanvas(canvas_x, canvas_y,
+       * update_map_canvas_visible(). */ 
+      flush_mapcanvas(canvas_start_x, canvas_start_y,
+                     width * NORMAL_TILE_WIDTH,
+                     height * NORMAL_TILE_HEIGHT);
+    } else {
+      add_to_flush(canvas_start_x, canvas_start_y,
                      width * NORMAL_TILE_WIDTH,
                      height * NORMAL_TILE_HEIGHT);
     }
@@ -663,12 +662,14 @@
 {
   int map_view_x0, map_view_y0, map_win_width, map_win_height;
   int map_tile_width, map_tile_height;
-
+  
   get_mapview_dimensions(&map_view_x0, &map_view_y0,
                         &map_win_width, &map_win_height);
   map_tile_width = (map_win_width - 1) / NORMAL_TILE_WIDTH + 1;
   map_tile_height = (map_win_height - 1) / NORMAL_TILE_HEIGHT + 1;
 
+  add_all_to_flush();
+  
   if (is_isometric) {
     /* just find a big rectangle that includes the whole visible area. The
        invisible tiles will not be drawn. */
@@ -676,15 +677,15 @@
 
     width = height = map_tile_width + map_tile_height;
     update_map_canvas(map_view_x0, map_view_y0 - map_tile_width, width,
-                     height, FALSE);
+                     height, FALSE);
   } else {
     update_map_canvas(map_view_x0, map_view_y0, map_tile_width,
                      map_tile_height, FALSE);
   }
 
+  clear_city_descriptions();
   show_city_descriptions();
-
-  flush_mapcanvas(0, 0, map_win_width, map_win_height);
+  
 }
 
 /**************************************************************************
diff -u -r freeciv/client/messagewin_common.c fc3/client/messagewin_common.c
--- freeciv/client/messagewin_common.c  Fri Dec 20 15:35:05 2002
+++ fc3/client/messagewin_common.c      Thu Feb 13 23:25:09 2003
@@ -206,6 +208,10 @@
        * that's OK. */
       popup_city_dialog(pcity, FALSE);
     }
+    
+    if (center_when_popup_city || pcity) {
+      flush_rects();
+    }
   }
 }
 
@@ -219,6 +225,7 @@
   if (messages[message_index].location_ok) {
     center_tile_mapcanvas(messages[message_index].x,
                          messages[message_index].y);
+    flush_rects();
   }
 }
 
diff -u -r freeciv/client/packhand.c fc3/client/packhand.c
--- freeciv/client/packhand.c   Thu Feb 13 16:48:19 2003
+++ fc3/client/packhand.c       Thu Feb 13 23:00:28 2003
@@ -2478,6 +2479,7 @@
   }
 
   agents_processing_finished();
+  flush_rects();
 }
 
 /**************************************************************************
@@ -2548,4 +2550,5 @@
   reports_thaw();
 
   agents_thaw_hint();
+  flush_rects();
 }
diff -u -r freeciv/client/tilespec.c fc3/client/tilespec.c
--- freeciv/client/tilespec.c   Wed Feb  5 17:41:29 2003
+++ fc3/client/tilespec.c       Thu Feb 13 23:25:10 2003
@@ -361,6 +361,7 @@
   }
   tileset_changed();
   center_tile_mapcanvas(center_x, center_y);
+  flush_rects();
 }
 
 /**************************************************************************
diff -u -r ../store/freeciv/client/climisc.c fc3/client/climisc.c
--- ../store/freeciv/client/climisc.c   Thu Feb 13 16:48:19 2003
+++ fc3/client/climisc.c        Fri Feb 14 01:16:28 2003
@@ -111,7 +111,7 @@
            get_nation_name(city_owner(pcity)->nation), pcity->x, pcity->y);
   }
 
-  refresh_tile_mapcanvas(x, y, TRUE);
+  refresh_tile_mapcanvas(x, y, FALSE);
 }
 
 /**************************************************************************
@@ -135,14 +135,14 @@
     city_remove_improvement(pcity, i);
   } built_impr_iterate_end;
 
   if (effect_update) {
     /* nothing yet */
   }
 
   popdown_city_dialog(pcity);
   game_remove_city(pcity);
   city_report_dialog_update();
-  refresh_tile_mapcanvas(x, y, TRUE);
+  refresh_tile_mapcanvas(x, y, FALSE);
 }
 
 /**************************************************************************
diff -u -r ../store/freeciv/client/control.c fc3/client/control.c
--- ../store/freeciv/client/control.c   Thu Feb 13 16:48:19 2003
+++ fc3/client/control.c        Thu Feb 13 23:25:09 2003
@@ -110,7 +109,7 @@
     auto_center_on_focus_unit();
 
     punit->focus_status=FOCUS_AVAIL;
-    refresh_tile_mapcanvas(punit->x, punit->y, TRUE);
+    refresh_tile_mapcanvas(punit->x, punit->y, FALSE);
 
     if (punit->activity != ACTIVITY_IDLE || punit->ai.control)  {
       punit->activity = ACTIVITY_IDLE;
@@ -123,7 +122,7 @@
   if (punit_old_focus
       && (!punit || !same_pos(punit_old_focus->x, punit_old_focus->y,
                                   punit->x, punit->y))) {
-    refresh_tile_mapcanvas(punit_old_focus->x, punit_old_focus->y, TRUE);
+    refresh_tile_mapcanvas(punit_old_focus->x, punit_old_focus->y, FALSE);
   }
 
   update_unit_info_label(punit);
@@ -141,7 +140,7 @@
   punit_focus=punit;
 
   if(punit) {
-    refresh_tile_mapcanvas(punit->x, punit->y, TRUE);
+    refresh_tile_mapcanvas(punit->x, punit->y, FALSE);
     punit->focus_status=FOCUS_AVAIL;
   }
 }
@@ -214,7 +213,7 @@
    * because above we change punit_focus directly.
    */
   if(punit_old_focus && punit_old_focus!=punit_focus)
-    refresh_tile_mapcanvas(punit_old_focus->x, punit_old_focus->y, TRUE);
+    refresh_tile_mapcanvas(punit_old_focus->x, punit_old_focus->y, FALSE);
 
   set_unit_focus(punit_focus);
 
@@ -1183,7 +1200,7 @@
       dx=1;
     if(smooth_move_units)
       move_unit_map_canvas(punit, x, y, dx, pinfo->y - punit->y);
-    refresh_tile_mapcanvas(x, y, TRUE);
+    refresh_tile_mapcanvas(x, y, FALSE);
   }
     
   punit->x=pinfo->x;
@@ -1202,12 +1219,12 @@
     } unit_list_iterate_end;
   out:
     if (refresh) {
-      refresh_tile_mapcanvas(x, y, TRUE);
+      refresh_tile_mapcanvas(x, y, FALSE);
     }
   } square_iterate_end;
   
   if(!pinfo->carried && tile_get_known(punit->x,punit->y) == TILE_KNOWN)
-    refresh_tile_mapcanvas(punit->x, punit->y, TRUE);
+    refresh_tile_mapcanvas(punit->x, punit->y, FALSE);
 
   if(get_unit_in_focus()==punit) update_menus();
 }
diff -u -r ../store/freeciv/client/mapview_common.c fc3/client/mapview_common.c
--- ../store/freeciv/client/mapview_common.c    Sun Feb  9 10:22:27 2003
+++ fc3/client/mapview_common.c Fri Feb 14 00:02:32 2003
@@ -764,8 +765,8 @@
                      src_y == dest_y ? 1 : 2,
                      TRUE);
   } else {
-    refresh_tile_mapcanvas(src_x, src_y, TRUE);
-    refresh_tile_mapcanvas(dest_x, dest_y, TRUE);
+    refresh_tile_mapcanvas(src_x, src_y, FALSE);
+    refresh_tile_mapcanvas(dest_x, dest_y, FALSE);
 
     if (NORMAL_TILE_WIDTH % 2 == 0 || NORMAL_TILE_HEIGHT % 2 == 0) {
       if (dir == DIR8_NORTHEAST) {
@@ -774,12 +775,12 @@
        if (!MAPSTEP(dest_x, dest_y, src_x, src_y, DIR8_EAST)) {
          assert(0);
        }
-       refresh_tile_mapcanvas(dest_x, dest_y, TRUE);
+       refresh_tile_mapcanvas(dest_x, dest_y, FALSE);
       } else if (dir == DIR8_SOUTHWEST) {      /* the same */
        if (!MAPSTEP(dest_x, dest_y, src_x, src_y, DIR8_SOUTH)) {
          assert(0);
        }
-       refresh_tile_mapcanvas(dest_x, dest_y, TRUE);
+       refresh_tile_mapcanvas(dest_x, dest_y, FALSE);
       }
     }
   }
diff -u -r ../store/freeciv/client/packhand.c fc3/client/packhand.c
--- ../store/freeciv/client/packhand.c  Thu Feb 13 16:48:19 2003
+++ fc3/client/packhand.c       Fri Feb 14 01:16:31 2003
@@ -229,8 +229,8 @@
        punit1->hp = hp1;
 
        set_units_in_combat(NULL, NULL);
-       refresh_tile_mapcanvas(punit0->x, punit0->y, TRUE);
-       refresh_tile_mapcanvas(punit1->x, punit1->y, TRUE);
+       refresh_tile_mapcanvas(punit0->x, punit0->y, FALSE);
+       refresh_tile_mapcanvas(punit1->x, punit1->y, FALSE);
       }
     }
   }
@@ -503,7 +503,7 @@
                      CITY_MAP_SIZE, CITY_MAP_SIZE, FALSE);
     queue_mapview_update(UPDATE_CITY_DESCRIPTIONS);
   } else {
-    refresh_tile_mapcanvas(pcity->x, pcity->y, TRUE);
+    refresh_tile_mapcanvas(pcity->x, pcity->y, FALSE);
   }
 
   if (city_workers_display==pcity)  {
@@ -914,7 +914,7 @@
 
       if(punit->owner==game.player_idx) 
         refresh_unit_city_dialogs(punit);
-      /*      refresh_tile_mapcanvas(punit->x, punit->y, TRUE);
+      /*      refresh_tile_mapcanvas(punit->x, punit->y, FALSE);
        *      update_unit_pix_label(punit);
        *      update_unit_focus();
        */
@@ -982,7 +982,7 @@
       else {
        do_move_unit(punit, packet); /* nice to see where a unit is going */
        client_remove_unit(punit);
-       refresh_tile_mapcanvas(packet->x, packet->y, TRUE);
+       refresh_tile_mapcanvas(packet->x, packet->y, FALSE);
         return;
       }
       if(pcity)  {
@@ -1052,7 +1052,7 @@
     /*fog of war*/
     if (!(tile_get_known(punit->x,punit->y) == TILE_KNOWN)) {
       client_remove_unit(punit);
-      refresh_tile_mapcanvas(dest_x, dest_y, TRUE);
+      refresh_tile_mapcanvas(dest_x, dest_y, FALSE);
     }
     agents_unit_changed(punit);
   }
@@ -1089,7 +1089,7 @@
   }
 
   if(repaint_unit)
-    refresh_tile_mapcanvas(punit->x, punit->y, TRUE);
+    refresh_tile_mapcanvas(punit->x, punit->y, FALSE);
 
   if (check_focus || get_unit_in_focus() == NULL)
     update_unit_focus(); 
@@ -1697,14 +1697,14 @@
 
     /* the tile itself */
     if (tile_changed || old_known!=ptile->known)
-      refresh_tile_mapcanvas(x, y, TRUE);
+      refresh_tile_mapcanvas(x, y, FALSE);
 
     /* if the terrain or the specials of the tile
        have changed it affects the adjacent tiles */
     if (tile_changed) {
       adjc_iterate(x, y, x1, y1) {
        if (tile_get_known(x1, y1) >= TILE_KNOWN_FOGGED)
-         refresh_tile_mapcanvas(x1, y1, TRUE);
+         refresh_tile_mapcanvas(x1, y1, FALSE);
       }
       adjc_iterate_end;
       return;
@@ -1715,7 +1715,7 @@
     if (old_known == TILE_UNKNOWN && packet->known >= TILE_KNOWN_FOGGED) {     
       cartesian_adjacent_iterate(x, y, x1, y1) {
        if (tile_get_known(x1, y1) >= TILE_KNOWN_FOGGED)
-         refresh_tile_mapcanvas(x1, y1, TRUE);
+         refresh_tile_mapcanvas(x1, y1, FALSE);
       }
       cartesian_adjacent_iterate_end;
     }

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