Index: common/map.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/map.c,v retrieving revision 1.96 diff -u -r1.96 map.c --- common/map.c 2001/10/11 12:37:04 1.96 +++ common/map.c 2001/10/14 00:25:33 @@ -1308,13 +1308,6 @@ return 1; } -int is_real_tile(int x, int y) -{ - int x1 = x, y1 = y; - - return normalize_map_pos(&x1, &y1); -} - /************************************************************************** Returns TRUE iff the map position is normal. "Normal" here means that it is both a real/valid coordinate set and that the coordinates are in @@ -1338,7 +1331,7 @@ while (*x >= map.xsize) *x -= map.xsize; - return (0 <= *y && *y < map.ysize); + return is_real_tile(*x, *y); } /************************************************************************** Index: common/map.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/map.h,v retrieving revision 1.96 diff -u -r1.96 map.h --- common/map.h 2001/10/09 16:26:46 1.96 +++ common/map.h 2001/10/14 00:25:33 @@ -230,7 +230,6 @@ void tile_init(struct tile *ptile); enum known_type tile_is_known(int x, int y); int check_coords(int *x, int *y); -int is_real_tile(int x, int y); int is_normal_map_pos(int x, int y); int normalize_map_pos(int *x, int *y); void nearest_real_pos(int *x, int *y); @@ -430,6 +429,9 @@ #define whole_map_iterate_end \ } + +#define is_real_tile(x,y) \ + (0 <= (y) && (y) < map.ysize) /* used to compute neighboring tiles: