diff -Nur -Xfreeciv/diff_ignore rawciv/client/climisc.c freeciv/client/climisc.c --- rawciv/client/climisc.c Fri Oct 26 15:57:17 2001 +++ freeciv/client/climisc.c Sat Oct 27 17:08:37 2001 @@ -507,6 +507,14 @@ } } +/*************************************************************** + this is used as a wrapper to reduce civworld code size. +***************************************************************/ +enum known_type tile_is_known(int x, int y) +{ + return (enum known_type) map_get_tile(x, y)->known; +} + /************************************************************************** Find something sensible to display. This is used to overwrite the intro gfx. diff -Nur -Xfreeciv/diff_ignore rawciv/client/climisc.h freeciv/client/climisc.h --- rawciv/client/climisc.h Fri Oct 26 15:57:18 2001 +++ freeciv/client/climisc.h Fri Oct 26 23:57:19 2001 @@ -39,6 +39,7 @@ enum color_std get_grid_color(int x1, int y1, int x2, int y2); +enum known_type tile_is_known(int x, int y); void center_on_something(void); int concat_tile_activity_text(char *buf, int buf_size, int x, int y); diff -Nur -Xfreeciv/diff_ignore rawciv/client/control.c freeciv/client/control.c --- rawciv/client/control.c Fri Oct 26 15:57:18 2001 +++ freeciv/client/control.c Fri Oct 26 23:53:56 2001 @@ -30,6 +30,7 @@ #include "menu_g.h" #include "civclient.h" +#include "climisc.h" #include "clinet.h" #include "goto.h" #include "options.h" diff -Nur -Xfreeciv/diff_ignore rawciv/client/gui-gtk/mapctrl.c freeciv/client/gui-gtk/mapctrl.c --- rawciv/client/gui-gtk/mapctrl.c Fri Oct 12 22:25:07 2001 +++ freeciv/client/gui-gtk/mapctrl.c Fri Oct 26 23:46:55 2001 @@ -108,7 +108,7 @@ struct unit *punit; struct tile *ptile=map_get_tile(xtile, ytile); - if(ptile->known>=TILE_KNOWN_FOGGED) { + if(tile_is_known(xtile, ytile) >= TILE_KNOWN_FOGGED) { p=gtk_window_new(GTK_WINDOW_POPUP); b=gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(p), b); diff -Nur -Xfreeciv/diff_ignore rawciv/client/tilespec.c freeciv/client/tilespec.c --- rawciv/client/tilespec.c Fri Oct 26 15:57:18 2001 +++ freeciv/client/tilespec.c Sat Oct 27 00:08:27 2001 @@ -43,6 +43,7 @@ #include "support.h" #include "unit.h" +#include "climisc.h" /* for tile_is_known() */ #include "control.h" /* for fill_xxx */ #include "graphics_g.h" #include "options.h" /* for fill_xxx */ diff -Nur -Xfreeciv/diff_ignore rawciv/common/map.c freeciv/common/map.c --- rawciv/common/map.c Sat Oct 20 22:51:53 2001 +++ freeciv/common/map.c Fri Oct 26 23:56:10 2001 @@ -1265,18 +1265,6 @@ MAP_TILE(x, y)->city = pcity; } - -/*************************************************************** -Only for use on the client side -***************************************************************/ -enum known_type tile_is_known(int x, int y) -{ - if (!normalize_map_pos(&x, &y)) - return TILE_UNKNOWN; - else - return (enum known_type) (MAP_TILE(x, y)->known); -} - /*************************************************************** Are (x1,y1) and (x2,y2) really the same when adjusted? This function might be necessary ALOT of places... diff -Nur -Xfreeciv/diff_ignore rawciv/common/map.h freeciv/common/map.h --- rawciv/common/map.h Sat Oct 20 22:51:53 2001 +++ freeciv/common/map.h Fri Oct 26 23:57:04 2001 @@ -271,7 +271,6 @@ 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 tile_init(struct tile *ptile); -enum known_type tile_is_known(int x, int y); int is_real_tile(int x, int y); int is_normal_map_pos(int x, int y); /*