diff -Nur -Xfreeciv/diff_ignore rawciv/client/climisc.c freeciv/client/climisc.c --- rawciv/client/climisc.c Wed Oct 31 16:55:07 2001 +++ freeciv/client/climisc.c Thu Dec 6 16:45:33 2001 @@ -465,6 +465,16 @@ return index; } +/************************************************************************ + This is used as a wrapper to reduce civworld code size. + tile->known is used for different things in the server and client. + civworld needs to use both. This allows the use of the stock tilespec.c -mck +*************************************************************************/ +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 Wed Oct 31 16:55:07 2001 +++ freeciv/client/climisc.h Thu Dec 6 17:22:35 2001 @@ -13,8 +13,11 @@ #ifndef FC__CLIMISC_H #define FC__CLIMISC_H +#include "shared.h" /* MAX_LEN_NAME */ + struct city; struct Clause; +struct player; typedef int cid; typedef int wid; @@ -37,6 +40,7 @@ int client_warming_sprite(void); int client_cooling_sprite(void); +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 Thu Dec 6 17:15:24 2001 @@ -23,6 +23,7 @@ #include "chatline_g.h" #include "citydlg_g.h" +#include "climisc.h" #include "dialogs_g.h" #include "gui_main_g.h" #include "mapctrl_g.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 Thu Dec 6 16:48:04 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 Nov 16 16:16:39 2001 +++ freeciv/client/tilespec.c Thu Dec 6 16:50:01 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 Sun Dec 2 15:46:22 2001 +++ freeciv/common/map.c Thu Dec 6 16:52:33 2001 @@ -1217,22 +1217,12 @@ return MAP_TILE(x, y)->city; } - /*************************************************************** ... ***************************************************************/ void map_set_city(int x, int y, struct city *pcity) { MAP_TILE(x, y)->city = pcity; -} - - -/*************************************************************** -Only for use on the client side -***************************************************************/ -enum known_type tile_is_known(int x, int y) -{ - return (enum known_type) (MAP_TILE(x, y)->known); } /*************************************************************** diff -Nur -Xfreeciv/diff_ignore rawciv/common/map.h freeciv/common/map.h --- rawciv/common/map.h Sun Dec 2 15:46:22 2001 +++ freeciv/common/map.h Thu Dec 6 16:50:52 2001 @@ -272,7 +272,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);