Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3423) Clear city description
Home

[Freeciv-Dev] (PR#3423) Clear city description

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3423) Clear city description
From: "Rafa≥ Bursig" <bursig@xxxxxxxxx>
Date: Thu, 13 Feb 2003 15:27:04 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Hi

This is first step to new buffer code of SDLClient.

This patch change client API and give all clients
clear_city_description function which will clear (in SDLClient case) 
city descripiton buffer before rewrite.

Rafal
diff -u -r ../store/freeciv/client/gui-gtk/mapview.c 
fc3/client/gui-gtk/mapview.c
--- ../store/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
@@ -916,6 +946,14 @@
 }
 
 /**************************************************************************
+  Clear city description Drawed on screen/buffer.
+**************************************************************************/
+void clear_city_descriptions(void)
+{
+  /* Port Me */
+}
+
+/**************************************************************************
 ...
 **************************************************************************/
 void show_city_desc(struct city *pcity, int canvas_x, int canvas_y)
diff -u -r ../store/freeciv/client/gui-gtk-2.0/mapview.c 
fc3/client/gui-gtk-2.0/mapview.c
--- ../store/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
@@ -945,6 +974,14 @@
 }
 
 /**************************************************************************
+  Clear city description Drawed on screen/buffer.
+**************************************************************************/
+void clear_city_descriptions(void)
+{
+  /* Port Me */
+}
+
+/**************************************************************************
 ...
 **************************************************************************/
 void show_city_desc(struct city *pcity, int canvas_x, int canvas_y)

@@ -965,10 +1097,17 @@
 **************************************************************************/
 void show_city_desc(struct city *pcity, int canvas_x, int canvas_y)
 {
-  put_city_desc_on_surface(Main.screen, pcity,
+  put_city_desc_on_surface(Main.screen, pcity,
                      canvas_x, canvas_y - NORMAL_TILE_HEIGHT / 6 );
 }
 
+/**************************************************************************
+  Clear city description Drawed on screen/buffer.
+**************************************************************************/
+void clear_city_descriptions(void)
+{
+  /* Port ME */
+}
 
 /* ===================================================================== */
 /* =============================== Mini Map ============================ */
diff -u -r ../store/freeciv/client/gui-stub/mapview.c 
fc3/client/gui-stub/mapview.c
--- ../store/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
@@ -243,6 +268,14 @@
 }
 
 /**************************************************************************
+  Clear city description Drawed on screen/buffer.
+**************************************************************************/
+void clear_city_descriptions(void)
+{
+  /* Port Me */
+}
+
+/**************************************************************************
   Draw a cross-hair overlay on a tile.
 **************************************************************************/
 void put_cross_overlay_tile(int map_x, int map_y)
diff -u -r ../store/freeciv/client/gui-win32/mapview.c 
fc3/client/gui-win32/mapview.c
--- ../store/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
@@ -703,6 +730,14 @@
 }
 
 /**************************************************************************
+  Clear city description Drawed on screen/buffer.
+**************************************************************************/
+void clear_city_descriptions(void)
+{
+  /* Port Me */
+}
+
+/**************************************************************************
 
 **************************************************************************/
 void show_city_desc(struct city *pcity, int canvas_x, int canvas_y)
diff -u -r ../store/freeciv/client/gui-xaw/mapview.c 
fc3/client/gui-xaw/mapview.c
--- ../store/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
@@ -693,6 +722,14 @@
 }
 
 /**************************************************************************
+  Clear city description Drawed on screen/buffer.
+**************************************************************************/
+void clear_city_descriptions(void)
+{
+  /* Port Me */
+}
+
+/**************************************************************************
 Draw at x = left of string, y = top of string.
 **************************************************************************/
 static void draw_shadowed_string(XFontStruct * font, GC font_gc,
diff -u -r ../store/freeciv/client/include/mapview_g.h 
fc3/client/include/mapview_g.h
--- ../store/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
@@ -37,6 +37,7 @@
 void center_tile_mapcanvas(int x, int y);
 
 void show_city_desc(struct city *pcity, int canvas_x, int canvas_y);
+void clear_city_descriptions(void);
 
 void put_one_tile(int map_x, int map_y, int canvas_x, int canvas_y);
 void gui_map_put_tile_iso(int map_x, int map_y,
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
@@ -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);
+  flush_mapcanvas(0, 0, map_win_width, map_win_height);  
 }
 
 /**************************************************************************

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