Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9761) replace enum tile_terrain_type with Terrain_type
Home

[Freeciv-Dev] (PR#9761) replace enum tile_terrain_type with Terrain_type

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9761) replace enum tile_terrain_type with Terrain_type_id
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Aug 2004 19:18:23 -0700
Reply-to: rt@xxxxxxxxxxx

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


> This patch replaces users of the enum tile_terrain_type type with a
> Terrain_type_id typedef.  This corresponds to what is done in
> improvement.h with Improvement_type_id.  Eventually this enum can be
> removed and we can just have an integer value here.

This patch moves the Terrain_type_id typedef into fc_types.h as
requested by Greg.  This isn't actually helpful yet, since you need
terrain.h anyway to dereferenence it (since it's still an enum, not an
integer).  But if we turn it into an integer later it will already be in
the right place.

Also I converted a few more places: some new instances of the enum (just
added today) as well as packets.def which had been left out earlier.

jason

Index: ai/aiunit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v
retrieving revision 1.327
diff -u -r1.327 aiunit.c
--- ai/aiunit.c 13 Aug 2004 15:59:12 -0000      1.327
+++ ai/aiunit.c 24 Aug 2004 02:16:02 -0000
@@ -798,7 +798,7 @@
 bool find_beachhead(struct unit *punit, int dest_x, int dest_y, int *x, int *y)
 {
   int ok, best = 0;
-  enum tile_terrain_type t;
+  Terrain_type_id t;
 
   CHECK_UNIT(punit);
 
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.140
diff -u -r1.140 mapview_common.c
--- client/mapview_common.c     22 Aug 2004 01:43:12 -0000      1.140
+++ client/mapview_common.c     24 Aug 2004 02:16:03 -0000
@@ -1321,7 +1321,7 @@
                                int map_x, int map_y,
                                int canvas_x, int canvas_y)
 {
-  enum tile_terrain_type t1 = map_get_terrain(map_x, map_y), t2;
+  Terrain_type_id t1 = map_get_terrain(map_x, map_y), t2;
 
   if (!draw_coastline || draw_terrain || t1 == T_UNKNOWN) {
     return;
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.195
diff -u -r1.195 tilespec.c
--- client/tilespec.c   11 Aug 2004 18:25:38 -0000      1.195
+++ client/tilespec.c   24 Aug 2004 02:16:04 -0000
@@ -1587,7 +1587,7 @@
   Set tile_type sprite values; should only happen after
   tilespec_load_tiles().
 ***********************************************************************/
-void tilespec_setup_tile_type(enum tile_terrain_type terrain)
+void tilespec_setup_tile_type(Terrain_type_id terrain)
 {
   struct tile_type *tt = get_tile_type(terrain);
   struct terrain_drawing_data *draw;
@@ -1886,9 +1886,9 @@
     tspecial_near  : specials of all adjacent terrain
 **************************************************************************/
 static void build_tile_data(int map_x, int map_y,
-                           enum tile_terrain_type *ttype,
+                           Terrain_type_id *ttype,
                            enum tile_special_type *tspecial,
-                           enum tile_terrain_type *ttype_near,
+                           Terrain_type_id *ttype_near,
                            enum tile_special_type *tspecial_near)
 {
   enum direction8 dir;
@@ -2364,10 +2364,10 @@
 ****************************************************************************/
 static int fill_blending_sprite_array(struct drawn_sprite *sprs,
                                      int map_x, int map_y,
-                                     enum tile_terrain_type *ttype_near)
+                                     Terrain_type_id *ttype_near)
 {
   struct drawn_sprite *saved_sprs = sprs;
-  enum tile_terrain_type ttype = map_get_terrain(map_x, map_y);
+  Terrain_type_id ttype = map_get_terrain(map_x, map_y);
 
   if (is_isometric && sprites.terrain[ttype]->is_blended) {
     enum direction4 dir;
@@ -2383,7 +2383,7 @@
      */
     for (dir = 0; dir < 4; dir++) {
       int x1, y1;
-      enum tile_terrain_type other = ttype_near[DIR4_TO_DIR8[dir]];
+      Terrain_type_id other = ttype_near[DIR4_TO_DIR8[dir]];
 
       if (!MAPSTEP(x1, y1, map_x, map_y, DIR4_TO_DIR8[dir])
          || tile_get_known(x1, y1) == TILE_UNKNOWN
@@ -2406,12 +2406,12 @@
 ****************************************************************************/
 static int fill_terrain_sprite_array(struct drawn_sprite *sprs,
                                     int map_x, int map_y,
-                                    enum tile_terrain_type *ttype_near)
+                                    Terrain_type_id *ttype_near)
 {
   struct drawn_sprite *saved_sprs = sprs;
   struct Sprite *sprite;
   struct tile *ptile = map_get_tile(map_x, map_y);
-  enum tile_terrain_type ttype = ptile->terrain;
+  Terrain_type_id ttype = ptile->terrain;
   struct terrain_drawing_data *draw = sprites.terrain[ttype];
   int l, adjc_x, adjc_y, i, tileno;
 
@@ -2584,7 +2584,7 @@
                           bool *solid_bg, enum color_std *bg_color,
                           int map_x, int map_y, bool citymode)
 {
-  enum tile_terrain_type ttype, ttype_near[8];
+  Terrain_type_id ttype, ttype_near[8];
   enum tile_special_type tspecial, tspecial_near[8];
   int tileno, dir;
   struct tile *ptile = map_get_tile(map_x, map_y);
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.83
diff -u -r1.83 tilespec.h
--- client/tilespec.h   2 Aug 2004 16:23:18 -0000       1.83
+++ client/tilespec.h   24 Aug 2004 02:16:04 -0000
@@ -58,7 +58,7 @@
 void tilespec_setup_unit_type(int id);
 void tilespec_setup_impr_type(int id);
 void tilespec_setup_tech_type(int id);
-void tilespec_setup_tile_type(enum tile_terrain_type terrain);
+void tilespec_setup_tile_type(Terrain_type_id terrain);
 void tilespec_setup_government(int id);
 void tilespec_setup_nation_flag(int id);
 void tilespec_setup_city_tiles(int style);
Index: client/gui-gtk/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/menu.c,v
retrieving revision 1.86
diff -u -r1.86 menu.c
--- client/gui-gtk/menu.c       23 Aug 2004 19:49:57 -0000      1.86
+++ client/gui-gtk/menu.c       24 Aug 2004 02:16:04 -0000
@@ -1121,7 +1121,7 @@
       char *transfmt = _("Transf_orm to %s");
       char irrtext[128], mintext[128], transtext[128];
       char *roadtext;
-      enum tile_terrain_type  ttype;
+      Terrain_type_id  ttype;
       struct tile_type *      tinfo;
 
       sz_strlcpy(irrtext, _("Build _Irrigation"));
Index: client/gui-gtk-2.0/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/menu.c,v
retrieving revision 1.35
diff -u -r1.35 menu.c
--- client/gui-gtk-2.0/menu.c   21 Aug 2004 16:34:03 -0000      1.35
+++ client/gui-gtk-2.0/menu.c   24 Aug 2004 02:16:05 -0000
@@ -1197,7 +1197,7 @@
       const char *transfmt = _("Transf_orm to %s");
       char irrtext[128], mintext[128], transtext[128];
       const char *roadtext;
-      enum tile_terrain_type  ttype;
+      Terrain_type_id  ttype;
       struct tile_type *      tinfo;
 
       sz_strlcpy(irrtext, _("Build _Irrigation"));
Index: client/gui-mui/graphics.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/graphics.c,v
retrieving revision 1.33
diff -u -r1.33 graphics.c
--- client/gui-mui/graphics.c   11 May 2004 17:40:06 -0000      1.33
+++ client/gui-mui/graphics.c   24 Aug 2004 02:16:05 -0000
@@ -942,7 +942,7 @@
     }
 
     if (draw_coastline && !draw_terrain) {
-      enum tile_terrain_type t1 = map_get_terrain(x, y), t2;
+      Terrain_type_id t1 = map_get_terrain(x, y), t2;
       int x1 = x-1, y1 = y;
       SetAPen(rp,GetColorPen(COLOR_STD_OCEAN));
       if (normalize_map_pos(&x1, &y1)) {
@@ -1343,7 +1343,7 @@
   }
 
   if (draw_coastline && !draw_terrain) {
-    enum tile_terrain_type t1 = map_get_terrain(x, y), t2;
+    Terrain_type_id t1 = map_get_terrain(x, y), t2;
     int x1, y1;
     SetAPen(rp,GetColorPen(COLOR_STD_OCEAN));
     x1 = x; y1 = y-1;
Index: client/gui-mui/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/gui_main.c,v
retrieving revision 1.83
diff -u -r1.83 gui_main.c
--- client/gui-mui/gui_main.c   10 Jul 2004 18:48:18 -0000      1.83
+++ client/gui-mui/gui_main.c   24 Aug 2004 02:16:05 -0000
@@ -1227,7 +1227,7 @@
       static char irrtext[64];
       static char mintext[64];
       static char transtext[64];
-      enum tile_terrain_type ttype;
+      Terrain_type_id ttype;
       struct tile_type *tinfo;
 
       set(main_menu, MUIA_Window_Menustrip, NULL);
Index: client/gui-sdl/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/mapview.c,v
retrieving revision 1.70
diff -u -r1.70 mapview.c
--- client/gui-sdl/mapview.c    10 Jul 2004 18:48:18 -0000      1.70
+++ client/gui-sdl/mapview.c    24 Aug 2004 02:16:06 -0000
@@ -113,7 +113,7 @@
 static void init_borders_tiles(void);
 static void free_borders_tiles(void);
 static void fill_dither_buffers(SDL_Surface **pDitherBufs, int x, int y,
-                                       enum tile_terrain_type terrain);
+                                       Terrain_type_id terrain);
 
 
 static void draw_map_cell(SDL_Surface * pDest, Sint16 map_x, Sint16 map_y,
@@ -2079,12 +2079,12 @@
 /**************************************************************************
 ...
 **************************************************************************/
-static bool is_full_ocean(enum tile_terrain_type t, int x, int y)
+static bool is_full_ocean(Terrain_type_id t, int x, int y)
 {
   
   if (is_ocean(t))
   {
-    enum tile_terrain_type ter;
+    Terrain_type_id ter;
     adjc_iterate(x, y, x1, y1) {
       ter = map_get_terrain(x1, y1);
       if (!is_ocean(ter) && ter != T_UNKNOWN) {
@@ -2114,7 +2114,7 @@
   static struct city *pCity = NULL;
   static struct unit *pUnit = NULL, *pFocus = NULL;
   static enum tile_special_type special;
-  static enum tile_terrain_type terrain;
+  static Terrain_type_id terrain;
   static int count, i;
   static bool fog, full_ocean, solid_bg;
 
@@ -3206,9 +3206,9 @@
   ...
 **************************************************************************/
 static void fill_dither_buffers(SDL_Surface **pDitherBufs, int x, int y,
-                                       enum tile_terrain_type terrain)
+                                       Terrain_type_id terrain)
 {
-  enum tile_terrain_type __ter[8];
+  Terrain_type_id __ter[8];
   enum direction8 dir;
   int x1, y1;
   
@@ -3248,7 +3248,7 @@
 **************************************************************************/
 static void init_dither_tiles(void)
 {
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
   int i , w = NORMAL_TILE_WIDTH / 2, h = NORMAL_TILE_HEIGHT / 2;
   SDL_Rect src = { 0 , 0 , w , h };
   SDL_Surface *pTerrain_Surface, *pBuf = create_surf(NORMAL_TILE_WIDTH,
@@ -3325,7 +3325,7 @@
 **************************************************************************/
 static void free_dither_tiles(void)
 {
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
   int i;
     
   for (terrain = T_ARCTIC ; terrain < T_LAST ; terrain++)
@@ -3343,7 +3343,7 @@
 **************************************************************************/
 static void clear_dither_tiles(void)
 {
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
   int i;
   for (terrain = T_ARCTIC ; terrain < T_LAST ; terrain++)
   {
Index: client/gui-sdl/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/menu.c,v
retrieving revision 1.25
diff -u -r1.25 menu.c
--- client/gui-sdl/menu.c       1 Apr 2004 23:46:25 -0000       1.25
+++ client/gui-sdl/menu.c       24 Aug 2004 02:16:06 -0000
@@ -942,7 +942,7 @@
       struct city *pHomecity;
       int time;
       struct tile *pTile = map_get_tile(pUnit->x, pUnit->y);
-      enum tile_terrain_type terrain = pTile->terrain;
+      Terrain_type_id terrain = pTile->terrain;
       
       if (!counter) {
        local_show(ID_UNIT_ORDER_GOTO);
Index: client/gui-win32/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/menu.c,v
retrieving revision 1.21
diff -u -r1.21 menu.c
--- client/gui-win32/menu.c     17 Jun 2004 00:04:07 -0000      1.21
+++ client/gui-win32/menu.c     24 Aug 2004 02:16:06 -0000
@@ -923,7 +923,7 @@
        char *transfmt = _("Transform to %s");
        char irrtext[128], mintext[128], transtext[128];
        char *roadtext;
-       enum tile_terrain_type  ttype;
+       Terrain_type_id  ttype;
        struct tile_type *      tinfo;
        
        sz_strlcpy(irrtext, _("Build Irrigation"));
Index: client/gui-xaw/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/menu.c,v
retrieving revision 1.65
diff -u -r1.65 menu.c
--- client/gui-xaw/menu.c       23 Aug 2004 23:24:45 -0000      1.65
+++ client/gui-xaw/menu.c       24 Aug 2004 02:16:07 -0000
@@ -323,7 +323,7 @@
                         (game.player_ptr->spaceship.state!=SSHIP_NONE));
 
     if (punit && can_client_issue_orders()) {
-      enum tile_terrain_type  ttype;
+      Terrain_type_id  ttype;
       struct tile_type *      tinfo;
 
       ttype = map_get_tile(punit->x, punit->y)->terrain;
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.236
diff -u -r1.236 city.c
--- common/city.c       20 Aug 2004 20:13:17 -0000      1.236
+++ common/city.c       24 Aug 2004 02:16:07 -0000
@@ -370,7 +370,7 @@
 bool city_has_terr_spec_gate(const struct city *pcity, Impr_Type_id id)
 {
   struct impr_type *impr;
-  enum tile_terrain_type *terr_gate;
+  Terrain_type_id *terr_gate;
   enum tile_special_type *spec_gate;
 
   impr = get_improvement_type(id);
@@ -580,7 +580,7 @@
                                 int city_x, int city_y, bool is_celebrating)
 {
   enum tile_special_type spec_t = map_get_special(map_x, map_y);
-  enum tile_terrain_type tile_t = map_get_terrain(map_x, map_y);
+  Terrain_type_id tile_t = map_get_terrain(map_x, map_y);
   int s;
 
   if (contains_special(spec_t, S_SPECIAL_1)) {
@@ -685,7 +685,7 @@
                               int city_x, int city_y, bool is_celebrating)
 {
   enum tile_special_type spec_t = map_get_special(map_x, map_y);
-  enum tile_terrain_type tile_t = map_get_terrain(map_x, map_y);
+  Terrain_type_id tile_t = map_get_terrain(map_x, map_y);
   int t;
 
   if (contains_special(spec_t, S_SPECIAL_1)) {
@@ -798,7 +798,7 @@
                              int city_x, int city_y, bool is_celebrating)
 {
   const enum tile_special_type spec_t = map_get_special(map_x, map_y);
-  const enum tile_terrain_type tile_t = map_get_terrain(map_x, map_y);
+  const Terrain_type_id tile_t = map_get_terrain(map_x, map_y);
   struct tile_type *type = get_tile_type(tile_t);
   int f;
   const bool auto_water = (pcity && is_city_center(city_x, city_y)
@@ -918,7 +918,7 @@
 
   if (punit) {
     enum unit_move_type move_type = unit_type(punit)->move_type;
-    enum tile_terrain_type t = map_get_terrain(x, y);
+    Terrain_type_id t = map_get_terrain(x, y);
 
     /* We allow land units to build land cities and sea units to build
      * ocean cities. */
Index: common/combat.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/combat.c,v
retrieving revision 1.44
diff -u -r1.44 combat.c
--- common/combat.c     25 Jun 2004 23:43:01 -0000      1.44
+++ common/combat.c     24 Aug 2004 02:16:07 -0000
@@ -78,8 +78,8 @@
 bool can_unit_attack_unit_at_tile(struct unit *punit, struct unit *pdefender,
                                   int dest_x, int dest_y)
 {
-  enum tile_terrain_type fromtile;
-  enum tile_terrain_type totile;
+  Terrain_type_id fromtile;
+  Terrain_type_id totile;
   struct city *pcity = map_get_city(dest_x, dest_y);
 
   fromtile = map_get_terrain(punit->x, punit->y);
@@ -464,7 +464,7 @@
                              int x, int y, bool fortified, int veteran)
 {
   int defensepower = unit_types[def_type].defense_strength;
-  enum tile_terrain_type t = map_get_terrain(x, y);
+  Terrain_type_id t = map_get_terrain(x, y);
   int db;
 
   if (unit_types[def_type].move_type == LAND_MOVING && is_ocean(t)) {
Index: common/fc_types.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/fc_types.h,v
retrieving revision 1.1
diff -u -r1.1 fc_types.h
--- common/fc_types.h   13 Aug 2004 15:59:12 -0000      1.1
+++ common/fc_types.h   24 Aug 2004 02:16:07 -0000
@@ -19,5 +19,6 @@
  * definition in another file */
 
 typedef signed short Continent_id;
+typedef enum tile_terrain_type Terrain_type_id;
 
 #endif /* FC__FC_TYPES_H */
Index: common/improvement.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/improvement.h,v
retrieving revision 1.28
diff -u -r1.28 improvement.h
--- common/improvement.h        13 Aug 2004 15:59:12 -0000      1.28
+++ common/improvement.h        24 Aug 2004 02:16:07 -0000
@@ -19,7 +19,7 @@
 
 #include "shared.h"            /* MAX_LEN_NAME */
 #include "tech.h"              /* Tech_Type_id */
-#include "terrain.h"           /* enum tile_terrain_type etc */
+#include "terrain.h"           /* Terrain_type_id etc */
 #include "unittype.h"          /* Unit_Class_id, Unit_Type_id */
 #include "effects.h"
 
@@ -89,7 +89,7 @@
   Tech_Type_id cond_adv;          /* A_NONE = unconditional; A_LAST = never */
   enum effect_type cond_eff;      /* EFT_LAST = unconditional */
   Unit_Class_id aff_unit;         /* UCL_LAST = all */
-  enum tile_terrain_type aff_terr; /* T_UNKNOWN = all; T_LAST = none */
+  Terrain_type_id aff_terr; /* T_UNKNOWN = all; T_LAST = none */
   enum tile_special_type aff_spec; /* S_* bit mask of specials affected */
 };
 
@@ -105,7 +105,7 @@
   char graphic_alt[MAX_LEN_NAME];      /* city icon of improv. */
   Tech_Type_id tech_req;               /* A_LAST = never; A_NONE = always */
   Impr_Type_id bldg_req;               /* B_LAST = none required */
-  enum tile_terrain_type *terr_gate;   /* list; T_LAST terminated */
+  Terrain_type_id *terr_gate;  /* list; T_LAST terminated */
   enum tile_special_type *spec_gate;   /* list; S_NO_SPECIAL terminated */
   enum impr_range equiv_range;
   Impr_Type_id *equiv_dupl;            /* list; B_LAST terminated */
Index: common/map.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.c,v
retrieving revision 1.187
diff -u -r1.187 map.c
--- common/map.c        13 Aug 2004 15:59:12 -0000      1.187
+++ common/map.c        24 Aug 2004 02:16:08 -0000
@@ -627,7 +627,7 @@
 bool is_safe_ocean(int x, int y)
 {
   adjc_iterate(x, y, x1, y1) {
-    enum tile_terrain_type ter = map_get_terrain(x1, y1);
+    Terrain_type_id ter = map_get_terrain(x1, y1);
     if (!terrain_has_flag(ter, TER_UNSAFE_COAST) && ter != T_UNKNOWN) {
       return TRUE;
     }
@@ -915,7 +915,7 @@
 ***************************************************************/
 void map_irrigate_tile(int x, int y)
 {
-  enum tile_terrain_type now, result;
+  Terrain_type_id now, result;
   
   now = map_get_terrain(x, y);
   result = tile_types[now].irrigation_result;
@@ -945,7 +945,7 @@
 ***************************************************************/
 void map_mine_tile(int x, int y)
 {
-  enum tile_terrain_type now, result;
+  Terrain_type_id now, result;
   
   now = map_get_terrain(x, y);
   result = tile_types[now].mining_result;
@@ -969,7 +969,7 @@
 /***************************************************************
 ...
 ***************************************************************/
-void change_terrain(int x, int y, enum tile_terrain_type type)
+void change_terrain(int x, int y, Terrain_type_id type)
 {
   map_set_terrain(x, y, type);
   if (is_ocean(type)) {
@@ -998,7 +998,7 @@
 ***************************************************************/
 void map_transform_tile(int x, int y)
 {
-  enum tile_terrain_type now, result;
+  Terrain_type_id now, result;
   
   now = map_get_terrain(x, y);
   result = tile_types[now].transform_result;
@@ -1265,7 +1265,7 @@
 /***************************************************************
 ...
 ***************************************************************/
-enum tile_terrain_type map_get_terrain(int x, int y)
+Terrain_type_id map_get_terrain(int x, int y)
 {
   return MAP_TILE(x, y)->terrain;
 }
@@ -1273,7 +1273,7 @@
 /****************************************************************************
   Return the terrain type of the given tile (in native coordinates).
 ****************************************************************************/
-enum tile_terrain_type nat_get_terrain(int nat_x, int nat_y)
+Terrain_type_id nat_get_terrain(int nat_x, int nat_y)
 {
   return NAT_TILE(nat_x, nat_y)->terrain;
 }
@@ -1326,7 +1326,7 @@
 /***************************************************************
 ...
 ***************************************************************/
-void map_set_terrain(int x, int y, enum tile_terrain_type ter)
+void map_set_terrain(int x, int y, Terrain_type_id ter)
 {
   MAP_TILE(x, y)->terrain = ter;
 }
@@ -1334,7 +1334,7 @@
 /****************************************************************************
   Set the terrain of the given tile (in native coordinates).
 ****************************************************************************/
-void nat_set_terrain(int nat_x, int nat_y, enum tile_terrain_type ter)
+void nat_set_terrain(int nat_x, int nat_y, Terrain_type_id ter)
 {
   NAT_TILE(nat_x, nat_y)->terrain = ter;
 }
Index: common/map.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.h,v
retrieving revision 1.206
diff -u -r1.206 map.h
--- common/map.h        24 Aug 2004 01:59:43 -0000      1.206
+++ common/map.h        24 Aug 2004 02:16:09 -0000
@@ -37,7 +37,7 @@
 };
 
 struct tile {
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
   enum tile_special_type special;
   struct city *city;
   struct unit_list units;
@@ -105,15 +105,15 @@
   int road_trade_incr;
   int road_time;
 
-  enum tile_terrain_type irrigation_result;
+  Terrain_type_id irrigation_result;
   int irrigation_food_incr;
   int irrigation_time;
 
-  enum tile_terrain_type mining_result;
+  Terrain_type_id mining_result;
   int mining_shield_incr;
   int mining_time;
 
-  enum tile_terrain_type transform_result;
+  Terrain_type_id transform_result;
   int transform_time;
   int rail_time;
   int airbase_time;
@@ -121,8 +121,8 @@
   int clean_pollution_time;
   int clean_fallout_time;
 
-  enum tile_terrain_type warmer_wetter_result, warmer_drier_result;
-  enum tile_terrain_type cooler_wetter_result, cooler_drier_result;
+  Terrain_type_id warmer_wetter_result, warmer_drier_result;
+  Terrain_type_id cooler_wetter_result, cooler_drier_result;
 
   bv_terrain_flags flags;
 
@@ -349,11 +349,11 @@
 void map_set_owner(int x, int y, struct player *pplayer);
 struct city *map_get_city(int x, int y);
 void map_set_city(int x, int y, struct city *pcity);
-enum tile_terrain_type map_get_terrain(int x, int y);
-enum tile_terrain_type nat_get_terrain(int nat_x, int nat_y);
+Terrain_type_id map_get_terrain(int x, int y);
+Terrain_type_id nat_get_terrain(int nat_x, int nat_y);
 enum tile_special_type map_get_special(int x, int y);
-void map_set_terrain(int x, int y, enum tile_terrain_type ter);
-void nat_set_terrain(int nat_x, int nat_y, enum tile_terrain_type ter);
+void map_set_terrain(int x, int y, Terrain_type_id ter);
+void nat_set_terrain(int nat_x, int nat_y, Terrain_type_id ter);
 void map_set_special(int x, int y, enum tile_special_type spe);
 void map_clear_special(int x, int y, enum tile_special_type spe);
 void map_clear_all_specials(int x, int y);
@@ -403,7 +403,7 @@
 
 void map_irrigate_tile(int x, int y);
 void map_mine_tile(int x, int y);
-void change_terrain(int x, int y, enum tile_terrain_type type);
+void change_terrain(int x, int y, Terrain_type_id type);
 void map_transform_tile(int x, int y);
 
 int map_build_road_time(int x, int y);
Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.40
diff -u -r1.40 packets.def
--- common/packets.def  20 Aug 2004 20:13:17 -0000      1.40
+++ common/packets.def  24 Aug 2004 02:16:09 -0000
@@ -163,7 +163,7 @@
 type CLAUSE            = uint8(enum clause_type)
 type ACTIVITY          = uint8(enum unit_activity)
 type EVENT             = sint16(enum event_type)
-type TERRAIN           = uint8(enum tile_terrain_type)
+type TERRAIN           = uint8(Terrain_type_id)
 type SPECIAL           = uint16(enum tile_special_type)
 type SPECIALIST                = uint8(enum specialist_type)
 type DIPLOMAT_ACTION   = uint8(enum diplomat_actions)
Index: common/terrain.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.c,v
retrieving revision 1.9
diff -u -r1.9 terrain.c
--- common/terrain.c    9 Jul 2004 18:52:36 -0000       1.9
+++ common/terrain.c    24 Aug 2004 02:16:09 -0000
@@ -29,7 +29,7 @@
 /***************************************************************
 ...
 ***************************************************************/
-struct tile_type *get_tile_type(enum tile_terrain_type type)
+struct tile_type *get_tile_type(Terrain_type_id type)
 {
   return &tile_types[type];
 }
@@ -37,9 +37,9 @@
 /***************************************************************
 ...
 ***************************************************************/
-enum tile_terrain_type get_terrain_by_name(const char * name)
+Terrain_type_id get_terrain_by_name(const char * name)
 {
-  enum tile_terrain_type tt;
+  Terrain_type_id tt;
   for (tt = T_FIRST; tt < T_COUNT; tt++) {
     if (0 == strcmp (tile_types[tt].terrain_name, name)) {
       break;
@@ -51,7 +51,7 @@
 /***************************************************************
 ...
 ***************************************************************/
-const char *get_terrain_name(enum tile_terrain_type type)
+const char *get_terrain_name(Terrain_type_id type)
 {
   assert(type < T_COUNT);
   return tile_types[type].terrain_name;
@@ -90,7 +90,7 @@
 /****************************************************************************
   Return a random terrain that has the specified flag.
 ****************************************************************************/
-enum tile_terrain_type get_flag_terrain(enum terrain_flag_id flag)
+Terrain_type_id get_flag_terrain(enum terrain_flag_id flag)
 {
   bool has_flag[T_COUNT];
   int count = 0;
@@ -131,7 +131,7 @@
 /****************************************************************************
   Returns TRUE iff any adjacent tile contains the given terrain.
 ****************************************************************************/
-bool is_terrain_near_tile(int map_x, int map_y, enum tile_terrain_type t)
+bool is_terrain_near_tile(int map_x, int map_y, Terrain_type_id t)
 {
   adjc_iterate(map_x, map_y, adjc_x, adjc_y) {
     if (map_get_terrain(adjc_x, adjc_y) == t) {
@@ -145,7 +145,7 @@
 /****************************************************************************
   Return the number of adjacent tiles that have the given terrain.
 ****************************************************************************/
-int count_terrain_near_tile(int map_x, int map_y, enum tile_terrain_type t)
+int count_terrain_near_tile(int map_x, int map_y, Terrain_type_id t)
 {
   int count = 0;
 
@@ -161,7 +161,7 @@
 /****************************************************************************
   Return the number of cardinally adjacent tiles that have the given terrain.
 ****************************************************************************/
-int adjacent_terrain_tiles4(int map_x, int map_y, enum tile_terrain_type t)
+int adjacent_terrain_tiles4(int map_x, int map_y, Terrain_type_id t)
 {
   int num_adjacent = 0;
 
Index: common/terrain.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.h,v
retrieving revision 1.18
diff -u -r1.18 terrain.h
--- common/terrain.h    21 Aug 2004 23:14:43 -0000      1.18
+++ common/terrain.h    24 Aug 2004 02:16:09 -0000
@@ -15,6 +15,8 @@
 
 #include "shared.h"
 
+#include "fc_types.h"
+
 enum special_river_move {
   RMV_NORMAL=0, RMV_FAST_STRICT=1, RMV_FAST_RELAXED=2, RMV_FAST_ALWAYS=3
 };
@@ -96,18 +98,18 @@
 extern struct tile_type tile_types[T_LAST];
 
 /* General accessor functions. */
-struct tile_type *get_tile_type(enum tile_terrain_type type);
-enum tile_terrain_type get_terrain_by_name(const char * name);
-const char *get_terrain_name(enum tile_terrain_type type);
+struct tile_type *get_tile_type(Terrain_type_id type);
+Terrain_type_id get_terrain_by_name(const char * name);
+const char *get_terrain_name(Terrain_type_id type);
 enum terrain_flag_id terrain_flag_from_str(const char *s);
 #define terrain_has_flag(terr, flag) BV_ISSET(tile_types[(terr)].flags, flag)
-enum tile_terrain_type get_flag_terrain(enum terrain_flag_id flag);
+Terrain_type_id get_flag_terrain(enum terrain_flag_id flag);
 void tile_types_free(void);
 
 /* Functions to operate on a general terrain type. */
-bool is_terrain_near_tile(int map_x, int map_y, enum tile_terrain_type t);
-int count_terrain_near_tile(int map_x, int map_y, enum tile_terrain_type t);
-int adjacent_terrain_tiles4(int map_x, int map_y, enum tile_terrain_type t);
+bool is_terrain_near_tile(int map_x, int map_y, Terrain_type_id t);
+int count_terrain_near_tile(int map_x, int map_y, Terrain_type_id t);
+int adjacent_terrain_tiles4(int map_x, int map_y, Terrain_type_id t);
 
 /* Functions to operate on a terrain flag. */
 bool is_terrain_flag_near_tile(int x, int y, enum terrain_flag_id flag);
@@ -125,7 +127,7 @@
 /* This iterator iterates over all terrain types. */
 #define terrain_type_iterate(id)                                            \
 {                                                                           \
-  enum tile_terrain_type id;                                                \
+  Terrain_type_id id;                                                \
   for (id = T_FIRST; id < T_COUNT; id++) {
 
 #define terrain_type_iterate_end                                            \
Index: common/aicore/pf_tools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/pf_tools.c,v
retrieving revision 1.19
diff -u -r1.19 pf_tools.c
--- common/aicore/pf_tools.c    6 Aug 2004 13:43:12 -0000       1.19
+++ common/aicore/pf_tools.c    24 Aug 2004 02:16:09 -0000
@@ -120,7 +120,7 @@
                            int x1, int y1, struct pf_parameter *param)
 {
   struct tile *ptile = map_get_tile(x, y);
-  enum tile_terrain_type terrain1 = map_get_terrain(x1, y1);
+  Terrain_type_id terrain1 = map_get_terrain(x1, y1);
   int move_cost;
 
   if (is_ocean(terrain1)) {
@@ -218,7 +218,7 @@
                             int x1, int y1, struct pf_parameter *param)
 {
   struct tile *ptile = map_get_tile(x, y);
-  enum tile_terrain_type terrain1 = map_get_terrain(x1, y1);
+  Terrain_type_id terrain1 = map_get_terrain(x1, y1);
   int move_cost;
 
   if (is_ocean(terrain1)) {
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.269
diff -u -r1.269 citytools.c
--- server/citytools.c  6 Aug 2004 16:46:24 -0000       1.269
+++ server/citytools.c  24 Aug 2004 02:16:11 -0000
@@ -78,7 +78,7 @@
   /* Lower values mean higher priority. */
   float priority = (float)default_priority;
   int goodness;
-  enum tile_terrain_type type;
+  Terrain_type_id type;
 
   /* Increasing this value will increase the difference caused by
      (non-)matching terrain.  A matching terrain is mult_factor
Index: server/mapgen.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/mapgen.c,v
retrieving revision 1.144
diff -u -r1.144 mapgen.c
--- server/mapgen.c     19 Aug 2004 07:34:25 -0000      1.144
+++ server/mapgen.c     24 Aug 2004 02:16:11 -0000
@@ -234,7 +234,7 @@
 
 struct DataFilter {
   int T_min, T_max;
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
 };
 
 /****************************************************************************
@@ -258,7 +258,7 @@
 ****************************************************************************/
 static bool rand_map_pos_temperature(int *map_x, int *map_y,
                                     int T_min, int T_max,
-                                    enum tile_terrain_type terrain)
+                                    Terrain_type_id terrain)
 {
   struct DataFilter filter;
 
@@ -1000,7 +1000,7 @@
       if (make_river(x, y)) {
        whole_map_iterate(x1, y1) {
          if (TEST_BIT(rmap(x1, y1), RS_RIVER)) {
-           enum tile_terrain_type t = map_get_terrain(x1, y1);
+           Terrain_type_id t = map_get_terrain(x1, y1);
 
            if (!terrain_has_flag(t, TER_CAN_HAVE_RIVER)) {
              /* We have to change the terrain to put a river here. */
@@ -1173,7 +1173,7 @@
 **************************************************************************/
 static bool is_tiny_island(int x, int y) 
 {
-  enum tile_terrain_type t = map_get_terrain(x, y);
+  Terrain_type_id t = map_get_terrain(x, y);
 
   if (is_ocean(t) || t == T_ARCTIC) {
     /* The arctic check is needed for iso-maps: the poles may not have
@@ -1268,7 +1268,7 @@
 static int get_tile_value(int x, int y)
 {
   struct tile *ptile = map_get_tile(x, y);
-  enum tile_terrain_type old_terrain;
+  Terrain_type_id old_terrain;
   enum tile_special_type old_special;
   int value, irrig_bonus, mine_bonus;
 
@@ -1430,7 +1430,7 @@
 {
   struct start_filter_data *data = dataptr;
   int i;
-  enum tile_terrain_type t = map_get_terrain(x, y);
+  Terrain_type_id t = map_get_terrain(x, y);
 
   if (is_ocean(map_get_terrain(x, y))) {
     return FALSE;
@@ -1864,7 +1864,7 @@
 ****************************************************************************/
 static void add_specials(int prob)
 {
-  enum tile_terrain_type ttype;
+  Terrain_type_id ttype;
 
   whole_map_iterate(x, y)  {
     ttype = map_get_terrain(x, y);
@@ -1935,10 +1935,10 @@
 static void fill_island(int coast, long int *bucket,
                        int warm0_weight, int warm1_weight,
                        int cold0_weight, int cold1_weight,
-                       enum tile_terrain_type warm0,
-                       enum tile_terrain_type warm1,
-                       enum tile_terrain_type cold0,
-                       enum tile_terrain_type cold1,
+                       Terrain_type_id warm0,
+                       Terrain_type_id warm1,
+                       Terrain_type_id cold0,
+                       Terrain_type_id cold1,
                        const struct gen234_state *const pstate)
 {
   int x, y, i, k, capac;
Index: server/maphand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/maphand.c,v
retrieving revision 1.140
diff -u -r1.140 maphand.c
--- server/maphand.c    24 Aug 2004 01:59:43 -0000      1.140
+++ server/maphand.c    24 Aug 2004 02:16:12 -0000
@@ -73,7 +73,7 @@
 
   k = map_num_tiles();
   while(effect > 0 && (k--) > 0) {
-    enum tile_terrain_type old, new;
+    Terrain_type_id old, new;
 
     rand_map_pos(&x, &y);
     old = map_get_terrain(x, y);
@@ -114,7 +114,7 @@
 
   k = map_num_tiles();
   while(effect > 0 && (k--) > 0) {
-    enum tile_terrain_type old, new;
+    Terrain_type_id old, new;
 
     rand_map_pos(&x, &y);
     old = map_get_terrain(x, y);
@@ -1291,9 +1291,9 @@
   continent numbers.
 **************************************************************************/
 enum ocean_land_change check_terrain_ocean_land_change(int x, int y,
-                                                enum tile_terrain_type oldter)
+                                                Terrain_type_id oldter)
 {
-  enum tile_terrain_type newter = map_get_terrain(x, y);
+  Terrain_type_id newter = map_get_terrain(x, y);
 
   if (is_ocean(oldter) && !is_ocean(newter)) {
     /* ocean to land ... */
Index: server/maphand.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/maphand.h,v
retrieving revision 1.40
diff -u -r1.40 maphand.h
--- server/maphand.h    9 Aug 2004 05:24:35 -0000       1.40
+++ server/maphand.h    24 Aug 2004 02:16:12 -0000
@@ -36,7 +36,7 @@
 };
 
 struct player_tile {
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
   enum tile_special_type special;
   unsigned short seen;
   unsigned short own_seen;
@@ -96,5 +96,5 @@
 void map_calculate_borders(void);
 
 enum ocean_land_change check_terrain_ocean_land_change(int x, int y,
-                                              enum tile_terrain_type oldter);
+                                              Terrain_type_id oldter);
 #endif  /* FC__MAPHAND_H */
Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.188
diff -u -r1.188 ruleset.c
--- server/ruleset.c    24 Aug 2004 01:59:43 -0000      1.188
+++ server/ruleset.c    24 Aug 2004 02:16:12 -0000
@@ -69,8 +69,8 @@
                            const char *entry, const char *filename);
 static char *lookup_helptext(struct section_file *file, char *prefix);
 
-static enum tile_terrain_type lookup_terrain(char *name, 
-                                             enum tile_terrain_type tthis);
+static Terrain_type_id lookup_terrain(char *name, 
+                                             Terrain_type_id tthis);
 
 static void load_tech_names(struct section_file *file);
 static void load_unit_names(struct section_file *file);
@@ -478,10 +478,10 @@
 /**************************************************************************
   Look up a terrain name in the tile_types array and return its index.
 **************************************************************************/
-static enum tile_terrain_type lookup_terrain(char *name, 
-                                             enum tile_terrain_type tthis)
+static Terrain_type_id lookup_terrain(char *name, 
+                                             Terrain_type_id tthis)
 {
-  enum tile_terrain_type i;
+  Terrain_type_id i;
 
   if (*name == '\0' || (0 == strcmp(name, "none")) 
       || (0 == strcmp(name, "no"))) {
@@ -2176,7 +2176,7 @@
          } else {
            /* "handled" tracks whether we find a match (for error handling) */
            bool handled = FALSE;
-           enum tile_terrain_type type;
+           Terrain_type_id type;
        
            for (type = T_FIRST; type < T_COUNT && !handled; type++) {
               /*
Index: server/sanitycheck.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sanitycheck.c,v
retrieving revision 1.46
diff -u -r1.46 sanitycheck.c
--- server/sanitycheck.c        13 Aug 2004 15:59:13 -0000      1.46
+++ server/sanitycheck.c        24 Aug 2004 02:16:12 -0000
@@ -38,7 +38,7 @@
 static void check_specials(void)
 {
   whole_map_iterate(x, y) {
-    enum tile_terrain_type terrain = map_get_terrain(x, y);
+    Terrain_type_id terrain = map_get_terrain(x, y);
     enum tile_special_type special = map_get_special(x, y);
 
     if (contains_special(special, S_RAILROAD))
Index: server/savegame.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v
retrieving revision 1.177
diff -u -r1.177 savegame.c
--- server/savegame.c   24 Aug 2004 01:37:18 -0000      1.177
+++ server/savegame.c   24 Aug 2004 02:16:13 -0000
@@ -221,7 +221,7 @@
   Dereferences the terrain character.  See tile_types[].identifier
     example: char2terrain('a') => T_ARCTIC
 ****************************************************************************/
-static enum tile_terrain_type char2terrain(char ch)
+static Terrain_type_id char2terrain(char ch)
 {
   if (ch == UNKNOWN_TERRAIN_IDENTIFIER) {
     return T_UNKNOWN;
@@ -241,7 +241,7 @@
   References the terrain character.  See tile_types[].identifier
     example: terrain2char(T_ARCTIC) => 'a'
 ****************************************************************************/
-static char terrain2char(enum tile_terrain_type terr)
+static char terrain2char(Terrain_type_id terr)
 {
   if (terr == T_UNKNOWN) {
     return UNKNOWN_TERRAIN_IDENTIFIER;
Index: server/settlers.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/settlers.c,v
retrieving revision 1.196
diff -u -r1.196 settlers.c
--- server/settlers.c   17 Aug 2004 05:13:59 -0000      1.196
+++ server/settlers.c   24 Aug 2004 02:16:13 -0000
@@ -325,7 +325,7 @@
 **************************************************************************/
 static bool is_wet(struct player *pplayer, int map_x, int map_y)
 {
-  enum tile_terrain_type terrain;
+  Terrain_type_id terrain;
   enum tile_special_type special;
 
   /* FIXME: this should check a handicap. */
@@ -389,10 +389,10 @@
 {
   int goodness;
   struct tile *ptile = map_get_tile(map_x, map_y);
-  enum tile_terrain_type old_terrain = ptile->terrain;
+  Terrain_type_id old_terrain = ptile->terrain;
   enum tile_special_type old_special = ptile->special;
   struct tile_type *type = get_tile_type(old_terrain);
-  enum tile_terrain_type new_terrain = type->irrigation_result;
+  Terrain_type_id new_terrain = type->irrigation_result;
 
   if (old_terrain != new_terrain && new_terrain != T_LAST) {
     /* Irrigation would change the terrain type, clearing the mine
@@ -453,10 +453,10 @@
 {
   int goodness;
   struct tile *ptile = map_get_tile(map_x, map_y);
-  enum tile_terrain_type old_terrain = ptile->terrain;
+  Terrain_type_id old_terrain = ptile->terrain;
   enum tile_special_type old_special = ptile->special;
   struct tile_type *type = get_tile_type(old_terrain);
-  enum tile_terrain_type new_terrain = type->mining_result;
+  Terrain_type_id new_terrain = type->mining_result;
 
   if (old_terrain != new_terrain && new_terrain != T_LAST) {
     /* Mining would change the terrain type, clearing the irrigation
@@ -506,10 +506,10 @@
 {
   int goodness;
   struct tile *ptile = map_get_tile(map_x, map_y);
-  enum tile_terrain_type old_terrain = ptile->terrain;
+  Terrain_type_id old_terrain = ptile->terrain;
   enum tile_special_type old_special = ptile->special;
   struct tile_type *type = get_tile_type(old_terrain);
-  enum tile_terrain_type new_terrain = type->transform_result;
+  Terrain_type_id new_terrain = type->transform_result;
 
   if (old_terrain == new_terrain || new_terrain == T_LAST) {
     return -1;
@@ -1236,7 +1236,7 @@
                             city_x, city_y, map_x, map_y) {
 #ifndef NDEBUG
       struct tile *ptile = map_get_tile(map_x, map_y);
-      enum tile_terrain_type old_terrain = ptile->terrain;
+      Terrain_type_id old_terrain = ptile->terrain;
       enum tile_special_type old_special = ptile->special;
 #endif
 
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.298
diff -u -r1.298 unittools.c
--- server/unittools.c  13 Aug 2004 15:59:13 -0000      1.298
+++ server/unittools.c  24 Aug 2004 02:16:14 -0000
@@ -731,7 +731,7 @@
   if (activity==ACTIVITY_IRRIGATE) {
     if (total_activity (punit->x, punit->y, ACTIVITY_IRRIGATE) >=
         map_build_irrigation_time(punit->x, punit->y)) {
-      enum tile_terrain_type old = map_get_terrain(punit->x, punit->y);
+      Terrain_type_id old = map_get_terrain(punit->x, punit->y);
       map_irrigate_tile(punit->x, punit->y);
       solvency = check_terrain_ocean_land_change(punit->x, punit->y, old);
       unit_activity_done = TRUE;
@@ -758,7 +758,7 @@
   if (activity==ACTIVITY_MINE) {
     if (total_activity (punit->x, punit->y, ACTIVITY_MINE) >=
         map_build_mine_time(punit->x, punit->y)) {
-      enum tile_terrain_type old = map_get_terrain(punit->x, punit->y);
+      Terrain_type_id old = map_get_terrain(punit->x, punit->y);
       map_mine_tile(punit->x, punit->y);
       solvency = check_terrain_ocean_land_change(punit->x, punit->y, old);
       unit_activity_done = TRUE;
@@ -768,7 +768,7 @@
   if (activity==ACTIVITY_TRANSFORM) {
     if (total_activity (punit->x, punit->y, ACTIVITY_TRANSFORM) >=
         map_transform_time(punit->x, punit->y)) {
-      enum tile_terrain_type old = map_get_terrain(punit->x, punit->y);
+      Terrain_type_id old = map_get_terrain(punit->x, punit->y);
       map_transform_tile(punit->x, punit->y);
       solvency = check_terrain_ocean_land_change(punit->x, punit->y, old);
       unit_activity_done = TRUE;
@@ -2482,7 +2482,7 @@
     unit_list_iterate(map_get_tile(x, y)->units, penemy) {
       int range;
       enum unit_move_type move_type = unit_type(penemy)->move_type;
-      enum tile_terrain_type terrain = map_get_terrain(x, y);
+      Terrain_type_id terrain = map_get_terrain(x, y);
 
       if (map_has_special(x, y, S_FORTRESS)
          && unit_profits_of_watchtower(penemy))

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