DELTA 13292 0 550
SVN  ¶¾Q ‰x †1 ™ …†&¢ ‡2‹œ d’i€\ Œ5”@Ÿ Nà €N R„{ O‹@ ªq¡E³ ‹QÌ5 •Ø€ ‚uîN‚ 0ñB¼ Gó?€B ƒ8ôN  0ø+— ‚ùx  „"ü1¡ žB€u ‹&Ÿf V„{ ‰¬€C T„{€R Uà €\ W› ³ F– ºfdef SDL
#include "SDL.h"common.h"  /* client_kill_server()ivclient_state = C_S_INITIAL
 * TRUE between receiving PACKET_END_TURN and PACKET_BEGIN_TURN
 */
static bool server_busy This is called at program exitstatic void at_exit(void)
{
  client_kill_server(TRUE);
  my_shutdown_network(.
  /* register exit handler */ 
  atexit(at_exit);
C_S_PREPARING == civclient_state)
      && (C_S_PREPARING == newstate);
  enum client_states oldstate = civclient_state;

  if (C_S_OVER == newstateivC_S_PREPARING == civclient_state
	&& C_S_RUNNING == newstateivclient_state = newstate;

    if (C_S_RUNNING == civclient_stateC_S_PREPARING == civclient_stateC_S_INITIAL != oldstateC_S_PREPARING == civclient_stateclient_state(void)
{
  return civC_S_RUNNING != client_state()C_S_RUNNING == client_state()C_S_RUNNING == client_state()
	      || C_S_OVER == client_state())Sets if server is considered busy. Currently it is considered busy
  between turnst_server_busy(bool busy)
{
  if (busy != server_busy) {
    /* server_busy value will change */
    server_busy = busy;

    /* This may mean that we have to change from or to wait cursor */
    handle_mouse_cursor(NULL)Returns if server is considered busy at the moment
****/
bool is_server_busy(void)
{
  return server_busy;
}
ENDREP
DELTA 13473 510 34133
SVN  „Õ6„Ô4‚Fš ƒ* ‘ †iƒ6 •aŠ#€ƒ1 ƒW / ÃN¤
¤ š}çS e‚‚f€ ˆO‚‰€" ƒ,‚„^€R ‹W‚’» Ž ‚ž? ˆ=‚¬c ]‚µ$ ¯/‚Å¸ C¹@ ‚õ*€= g‚ù/€l -ƒŠ† Š
ƒ‹@« ‡ƒ•s» †	ƒRµ …ƒ¤€F ƒ2ƒ« …*ƒ®6¯ ƒ@ƒ´‘ ƒ·k€‚4 •+ƒºj€_ ƒÑ uƒÒ!¦ {ƒÓN€ƒ+ Vƒ×{ tƒÙS€V yƒÛhœ UÝ6 dƒÝr€_ Dƒà~³ `Å@  bƒâj¡ ‚=„„¯ ƒ3„ˆ€W ‚„Œ€q V„°~„ C¹@ ‡„‘€T UÝ6 ‡„™@ ¨„ a Œ8„È~city_owner(pcity)
      if (unit_owner(vunit) == pvictim) {
        /* vunit may die during transfer_unit().
         * unit_list_unlink() is still safe using vunit pointer, as
         * pointer is not used for dereferencing, only as value.
         * Not sure if it would be safe to unlink first and transfer only
         * after that. Not sure if it is correct to unlink at all in
         * some cases, depending which list 'units' points to. */map_claim_border(pcity->tile, ptaker = tile_get_base(ptile);
  struct city *pcity = create_city_virtual(pplayer, ptile, name);

  freelog(LOG_DEBUG, "Creating city %s", name);
  city_list_prepend(pplayer->cities, pcity);

  /* Claim the ground we stand on */
  map_claim_ownership(ptile, pplayer, ptile);
  map_claim_border(ptile, pplayer second packet from being
   * sent anyway. */
  send_tile_info(NULL, ptile, FALSEIf base acted as a watchtower, put vision back to normal */  This fills out a package from a player's vision_site.
vision_site *pdcity = map_get_player_city(ptile, pplayer);
  struct city *pcity = tile_city(ptile);

  packet->id = pdcity->identity;
  packet->owner = player_number(vision_owner(pdcity));
acket_city_info packet;
  struct packet_city_short_info sc_pack;
  struct player *powner = city_owner(pcity)pownerNULL != map_get_player_base(ptile, pplayer)S_S_RUNNING != server_state() && S_S_OVER != server_state()city(x,y); if pcity
is NULL, this function calls tileacket_city_info packet;
  struct packet_city_short_info sc_pack;
  struct player *powner = NULL;

  if (!pcity) {
    pcity = tile_city(ptile);
  }
  if (pcity) {
    powner = city_owner(pcity);
  }if (NULL != map_get_player_site(ptile, pviewer)city_owner(pcity) = 0; i < FEELING_LAST; i++) {
    packet->ppl_happy[i] = pcity->feel[CITIZEN_HAPPY][i];
    packet->ppl_content[i] = pcity->feel[CITIZEN_CONTENT][i];
    packet->ppl_unhappy[i] = pcity->feel[CITIZEN_UNHAPPY][i];
    packet->ppl_angry[i] = pcity->feel[CITIZEN_ANGRY][i];
  }
  /* The number of data in speciabv_imprs improvements;
  struct vision_site *pdcity = map_get_player_city(pcity->tile, pplayer);
  bool unhappy = city_unhappy(pcity)NULL == pdcity) {
    pdcity = create_vision_site_from_city(pcity);
    map_get_player_tile(pcity->tile, pplayer)->site = pdcity;
  } else if (pdcity->identity == pcity->id
	  && vision_owner(pdcity) == city_owner(pcity)
	  && pdcity->size == pcity->size
	  && 0 == strcmp(pdcity->name, pcity->name)
	  && pdcity->occupied == occupied
	  && pdcity->walls == walls
	  && pdcity->happy == happy
	  && pdcity->unhappy == unhappy
	pdcity->identityTILE_XY(pcity->tile), pplayer->name);
    pdcity->identity = pcity->id;   /* ?? */
  }improvements = improvements; = tile_city(ptile);
  struct player_tile *playtile = map_get_player_tile(ptile, pplayer);
  struct vision_site *pdcity = map_get_player_city(ptile, pplayer);

  if (pdcity) {
    if (!pcity || pcity->id != pdcity->identityentity);
      playtile->site = NULL;
      free(pdproduction_name_translation(pcityname = city_production_name_translation(pcity);/* TRANS: "<city> is building <production><source>." */
		_("%s is building %s%s."),
		_("The %s have started building The %s in %s."),
		  nation_plural_for_player(pplayer),
		  name,
		  pcity->name...
tile_owner(ptile) && tile_owner(ptile) != city_owner(pcity)) {
    return FALSE;
  }ENDREP
DELTA 14075 2719 68
SVN  ‚…‚ƒ`
 Š=  ÆŠA DÐ[Š Þ7 ¤1ài_S_RUNNINGENDREP
DELTA 13133 115101 6720
SVN  ‚–>‚Šn‚I¤V –x  ŠR–|€| „¢<© G¦x€‚ jª<€P ‚,­Œ r¯: i·A” ™UÉ_» Víy ‚päo— ‹qè€  Oí¬ @…@€ ù{Š @…@€  „#ù{€‚ Wÿ@ ‚ƒ#€g „†/€g ƒH‹$€u Rí 7€‚2 …y“wˆ ™v‰ ›$‰ œL€‚} …3 *‰ ‚,¥l“ ¨3€p †)ª?‰ †-°w’ M¿ €ƒ< ƒ»‰ 
¾C€ƒY xÂ~€‚, Æ€	 xÂ~€B ‚XÉQ‰ YÌ8€& rÉy XÓ  ‹Ïe œ$Û  ‚l÷H® „]úX§ ‚€%€‚` ‘6‚…city_built_iterate(pcity, pimprove) {
    effect_update = TRUE;
    city_remove_improvement(pcity, pimprove);
  } city_builtuniversal from,
		       struct universalVUT_UTYPE == from.kind
	       ? utype_name_translation(from.value.utype)
	       : improvement_name_translation(from.value.building),
	       VUT_UTYPE == to.kind
	       ? utype_name_translation(to.value.utype)
	       : improvement_name_translation(to.value.buildingare_universals_equal(&pcity->production, &from)
	&& can_city_build_now(pcity, toshaed vision shared vision"),
		return get_citizen_sprite(tileset, CITIZEN_UNHAPPY, 0, NULLhead_of_units_in_focus(universal target)
{
  return VUT_UTYPE == target.kind
         ? B_LAST + utype_number(target.value.utype)
         : improvement_number(target.value.building);**
  Encode a CID for the target unit type.
************/
cid cid_encode_unit(struct unit_type *punittype)
{
  struct universal target = {
    .kind = VUT_UTYPE,
    .value.utype = punittypebuilding.
************/
cid cid_encode_building(struct impr_type *pimprove)
{
  struct universal target = {
    .kind = VUT_IMPROVEMENT,
    .value.building = pimprove
  universal cid_decode(cid cid)
{
  struct universal target;

  if (cid >= B_LAST) {
    target.kind = VUT_UTYPE;
    target.value.utype = utype_by_number(cid - B_LAST);
  } else {
    target.kind = VUT_IMPROVEMENT;
    target.value.building = improvement_by_number(cid);
  }universal target)
{
  if (VUT_UTYPE == target.kind) {
    struct unit_type *tvtype = target.value.utypeuniversal target)
{
  if (VUT_UTYPE == target.kind) {
    struct unit_type *tvtype = target.value.utypeuniversal target)
{
  return VUT_IMPROVEMENT == target.kind
      && city_has_building(pcity, target.value.building);universal target)
{
  if (VUT_UTYPE == target.kind) {
    if (utype_has_flag(target.value.utype, F_CIVILIAN)) {
      return 2;
    } else {
      return 3;
    }
  } else {
    if (improvement_has_flag(target.value.building, IF_GOLD)) {
      return 1;
    } else if (is_great_wonder(target.value.buildingCIVILIANuniversaluniversalVUT_UTYPE == target.kind) {
      name = utype_values_translation(target.value.utype);
      cost = utype_build_shield_cost(target.value.utype);
    } else {
      name = city_improvement_name_translation(pcity, target.value.building);
      if (improvement_has_flag(target.value.building, IF_GOLD)) {
	cost = -1;
      } else {
	cost = impr_build_shield_cost(target.value.buildinguniversalimprovement_count()universal target = cid_decode(cid);

    if (!append_units && (append_wonders != is_wonder(target.value.buildinguniversaluniversal *targetsovement_iterate(pimprove) {
    if (can_player_build_improvement_now(game.player_ptr, pimprove)) {
      targets[cids_used].kind = VUT_IMPROVEMENT;
      targets[cids_used].value.building = pimprove;
      cids_used++;
    }
  } improvement_iterate_end;

  unit_type_iterate(punittype) {
    if (can_player_build_unit_now(game.player_ptr, punittype)) {
      targets[cids_used].kind = VUT_UTYPE;
      targets[cids_used].value.utype = punittypeuniversalovement_iterate(pimprove) {
    bool can_build = can_player_build_improvement_now(game.player_ptr, pimprove);
    bool can_eventually_build =
	can_player_build_improvement_later(game.player_ptr, pimprove);

    /* If there's a city, can the city build the improvement? */
    if (pcity) {
      can_build = can_build && can_city_build_improvement_now(pcity, pimprove);
      can_eventually_build = can_eventually_build &&
	  can_city_build_improvement_later(pcity, pimprovekind = VUT_IMPROVEMENT;
      targets[cids_used].value.building = pimprove;
      cids_used++;
    }
  } improvement_iterate_end;

  unit_type_iterate(punittype) {
    bool can_build = can_player_build_unit_now(game.player_ptr, punittype);
    bool can_eventually_build =
	can_player_build_unit_latercity_build_unit_now(pcity, punittype);
      can_eventually_build = can_eventually_build &&
	  can_city_build_unit_later(pcity, punittypekind = VUT_UTYPE;
      targets[cids_used].value.utype = punittypeuniversalcity_built_iterate(pcity, pimprove) {
    targets[cids_used].kind = VUT_IMPROVEMENT;
    targets[cids_used].value.building = pimprove;
    cids_used++;
  } city_builtC_S_RUNNING != client_state()unit_owner(punit) == city_owner(pcity_current);

  if (city_production_has_flag(pcity.building),
		pcity->name);
    return;
  }
  value = city_production_buy_gold_cost(pcity);

  if (city_owner(pcity)->economic.gold >= value) {
    city_buy_production(pcity);
  } else {
    create_event(NULL, E_BAD_COMMAND,
		 _("%s costs %d gold and you only have %d gold."),
		 city_production_name_translation(pcity),
		 value,
		 city_owner(pcity)ENDREP
DELTA 13464 1111 811
SVN  •F•B	  Šv  ŠLŠzENDREP
DELTA 7939 27687 4305
SVN  ÇRÒ@H †" €t ‚†R€_ …\ˆn€B Ž]0“ RÀ>„ A‘@ ˆsŸ*€D f©Z€ƒ ‚ ­4€} ‚	±€ ‚k³& 
¶7€T v¹$¥ A‘@ª RÀ> †vº  A‘@¸ RÀ>€q A‘@· ‡À> L €% A‘@€tfciconv.h"
#include "log.h"
#include "registry.h"

#include "chatline.h"
#include "colors_common.h"
#include "colorsonst char * const gui_character_encoding = "UTF-8";
const bool gui_use_transliteration = FALSE;double msec = real_timer_callback() * 1000;

  sw_add_timeout(msec, MAX_OPACITY);
  }...
while (i < argc) {
    if (is_option("--help", argv[i])) {
      fc_c_fprintf(stderr,
		   _("  -f, --fullscreen\t"
		     "Switch to full-screen at start\n"));
      }
      fc_fprintf(stderr, _("  -h, --help\t\tThis list\n"));
      fc_fprintf(stderr,
		 _("  -r, --res <res>\t"
		   "Use the given resolution [Default: %s]\n"),
		 DEFAULT_RESOLUTION);
      fc_fprintf(stderr,
		 _("  -t, --theme <name>\t"
		   "Use the given theme [Default: %s]\n"),
		_malloc("--res", argv, &i, argc))) {
      free(resolution);
      resolution = mystrdup(option);
      free(option);
    } else if ((option = get_option_malloc("--theme", argv, &i, argc))) {
      free(theme);
      theme = mystrdup(option);
      free
  if (!auto_connect) {
    freelog(LOG_ERROR, "Connection dialog not yet implemented. Start client "
                       "using the -a option.");
  }
STD_BACKGROUND));

  chat_create(); 
  chatline_create();
  
  tileset_load_tiles(tileset);
  timer_callback(NULL);
  sw_window_set_key_notify(root_window, my_key_handler, NULL);

  set_client_state(C_S_PREPARINGDo any necessary UI-specific cleanup
*********/
void ui_exit()
{
  /* PORTME */Called to monitor a GGZ socket.
*********/
void add_ggz_input(int sock)
{
  /* PORTME */Called on disconnection to remove monitoring on the GGZ socket.  Only
  call this if we're actually in GGZ mode.
*********/
void remove_ggz_input(void)
{
  /* PORTME */**
  Enqueue a callback to be called during an idle moment.  The 'callback'
  function should be called sometimes soon, and passed the 'data' pointer
  as its data.
***********/
void add_idle_callback(void (callback) (void *), void *data)
{
  sw_add_timeout(-1, callback, data);
}
ENDREP
DELTA 13899 1019 1325
SVN  †„n†…^‚b §_ Ÿ õx¨
‘ Šqž‘ šd©“ ¿Ã}‘ —\‚ƒ& Ž.‚›© <‚È( –‚«€m ‹=‚Â+‘ ž‚Ít¿ ‚§‚ì1‡ ­…“J Ä…ÀOC_S_PREPARING == client_state()unit_owner(pUnit)unit_owner(pUnit)tile_terrain(ptile)unit_owner(punit)tile_city(ptile)city_owner(pCity) == game.player_ptr)
  {_tile(ptile) && is_ground_unit(pFocus_Unit)) &&
      !(is_sailing_unit(pFocus_Unit) && (!is_ocean_tile(ptileunit_owner(pUnit)city_owner(pCity) == game.player_ptr) ||
	   (unit_owner(pUnit)int i;
ENDREP
DELTA 13489 0 3965
SVN  ‚š\‚™Zy‡ Àe › ŠÀ› Ë)‡ ƒ4ÛC Wß{€ †âO )éV– …hë ˜ ‹ñ€ „3ý4€ ‰7‚m ŒB— ‰FN’ “e—$ x«'¸ E  å¬z€k H‚’y€o †@‚”ERROR, "connection (%s) cutERROR, "connection (%s) cutVERBOSEenum server_events server_sniff_all_input(void)
{
  int i;
  int max_desc;
  fd_set readfs, writefs, exceptfs;
  struct timeval tvS_E_FORCE_END_OF_SNIFFt_server_state(S_S_OVER)ERROR,
		    "connection (%s) [hack-level] ping timeout ignored",
		    conn_description(pconn));
	  } else {
	    freelog(LOG_ERROR, "connection (%s) cutS_S_INITIAL != server_state() && game.info.timeout == -1) {
      (void) send_server_info_to_metaserver(META_REFRESH);
      return S_E_END_OF_TURN_TIMEOUTS_S_RUNNING == server_state()S_E_END_OF_TURN_TIMEOUTonnection (%s) cutS_S_RUNNING == server_state()S_E_END_OF_TURN_TIMEOUT;
  }
  return S_E_OTHERWISE;
}

()) {
  case S_S_INITIAL:
    my_snprintf(status, sizeof(status), "Pregame");
    break;
  case S_S_RUNNINGS_S_OVER:
    my_snprintf(status, sizeof(status), "Game over");
    break;
  case S_S_GENERATING_WAITING_UNUSEDENDREP
DELTA 12988 1966 1888
SVN  ½IÄ.s‡] ‰y Œ ‚‰j• ?‹g„ ”G)€ ¯)¡Sƒ ŒÐ| Bé@» Cå>€z Eé=º Cå>€ Fé= ÝY€‚+ „Lüt› „-‚ ˆ(†5Š Iå= ŠE>› ‚lšKœ  7hemes_commonheme_name[512] = "\0"FALSheme_name, N_("Theme"),
		 N_("By changing this option you change the active theme."),
		 COC_GRAPHICS,
		 get_themes_list, theme_reread_callbackfc_**********
  Return the first item of fc_options.
*********struct client_option *client_option_array_first(void)
{
  if (num_options > 0) {
    return fc_options;
  }
  return NULL;**********
  Return the last item of fc_options.
*********const struct client_option *client_option_array_last(void)
{
  if (num_options > 0) {
    return &fc_options[num_options - 1];
  }
  return NULL;fc_options == NULL);
  num_options = ARRAY_SIZE(common_options) + num_gui_options;
  fc_options = fc_calloc(num_options, sizeof(*fc_options));
  memcpy(fc_options, common_options, sizeof(common_options));
  memcpy(fc_options + ARRAY_SIZE(common_options), gui_options,
	 num_gui_options * sizeof(*fc_client_options_iterate(o) { client_options_iterate_end;
_S_RUNNINGclient_options_iterate(o) { client_options_iterate_end;ENDREP
DELTA 12637 3078 3756
SVN  ƒÌUƒÚie®j ”K • ©”I‘ „n½K€G ŽOÂ6€p S› ˜}Ò€s „ ÷z€‹m dƒ¢7© TÏ@€ˆ& `ƒ¢< ¶‹'— ‡ÁP ±%Èv ‰GüBŠ 	‚†€[ …|‚‡h¯ J‚_Š 9‚.Š †‚l€F ‡P‚–S„ šd‚ž6€* š‚¹€ &‚Ó4† ‚o‚ÔYŒ …-‚×\Ž Š<‚Ý ‡p‚è€t ‡o‚ðc€| O‚ÿ  ƒX‚úš ’|‚þ˜ ‚ƒ‘€G ¸pƒ“eGtkWidget *map_widgetgint cur_x, cur_ystatic gboolean mouse_scroll_mapcanvas(GtkWidget *w, GdkEventScroll *evThis client has no special command line options\n\n"));

  fc_fprintf(stderr, _("Report bugs at %s.\n"), BUG_URL(ev->state & GDK_SHIFT_MASK)) {
    switch (ev->keyval) {
    case GDK_Left:
      scroll_mapview(DIR8_WEST);
      return TRUE;

    case GDK_Right:
      scroll_mapview(DIR8_EAST);
      return TRUE;

    case GDK_Up:
      scroll_mapview(DIR8_NORTH);
      return TRUE;

    case GDK_Down:
      scroll_mapview(DIR8_SOUTH);
      return TRUE;

    case GDK_Home:
      key_center_capital();
      return TRUE;

    case GDK_Return:
    case GDK_KP_Enter:
      key_end_turn();
      return TRUE;

    case GDK_Page_Up:
      g_signal_emit_by_name(main_message_area, "move_cursor",
	                          GTK_MOVEMENT_PAGES, -1, FALSE);
      return TRUE;

    case GDK_Page_Down:
      g_signal_emit_by_name(main_message_area, "move_cursor",
	                          GTK_MOVEMENT_PAGES, 1, FALSE);
      return TRUE;

    default:
      break;
    }
  } else {
    switch (ev->keyval) {

    case GDK_apostrophe:
      /* FIXME: should find the correct window, even when detached, from any
       * other window; should scroll to the bottom automatically showing the
       * latest text from other players; MUST NOT make spurious text windows
       * at the bottom of other dialogs.
       */
      gtk_notebook_set_current_page(GTK_NOTEBOOK(bottom_notebook), 0);
      gtk_widget_grab_focus(inputline);
      return TRUE;

    default:
      break;
    };
  }

  /* Return here if observer */
  if (client_is_observer()) {
    return FALSE;
  }

  if (GTK_WIDGET_HAS_FOCUS(map_canvas)) {
    switch (ev->keyval) {
    case GDK_Up:
      key_unit_move(DIR8_NORTH);
      return TRUE;

    case GDK_Page_Up:
      key_unit_move(DIR8_NORTHEAST);
      return TRUE;

    case GDK_Right:
      key_unit_move(DIR8_EAST);
      return TRUE;

    case GDK_Page_Down:
      key_unit_move(DIR8_SOUTHEAST);
      return TRUE;

    case GDK_Down:
      key_unit_move(DIR8_SOUTH);
      return TRUE;

    case GDK_End:
      key_unit_move(DIR8_SOUTHWEST);
      return TRUE;
  
    case GDK_Left:
      key_unit_move(DIR8_WEST);
      return TRUE;

    case GDK_Home:		
      key_unit_move(DIR8_NORTHWEST);
      return TRUE;

    default:
      break;
    }
  }


  switch (ev->keyval) {
  case GDK_1:
    BATTLEGROUP_CASE(0);
    break;

  case GDK_2:
    BATTLEGROUP_CASE(1);
    break;

  case GDK_3:
    BATTLEGROUP_CASE(2);
    break;

  case GDK_4:
    BATTLEGROUP_CASE(3);
    break;

  case GDK_exclam:
    /* Shift + 1 */
    BATTLEGROUP_SHIFT_CASE(0);
    break;

  case GDK_at:
    /* Shift + 2 */
    BATTLEGROUP_SHIFT_CASE(1);
    break;

  case GDK_numbersign:
    /* Shift + 3 */
    BATTLEGROUP_SHIFT_CASE(2);
    break;

  case GDK_dollar:
    /* Shift + 4 */
    BATTLEGROUP_SHIFT_CASE(3);
    break;

  case GDK_KP_Up:
  case GDK_8:
  case GDK_KP_8:
    key_unit_move(DIR8_NORTH);
    break;

  case GDK_KP_Page_Up:
  case GDK_9:
  case GDK_KP_9:
    key_unit_move(DIR8_NORTHEAST);
    break;

  case GDK_KP_Right:
  case GDK_6:
  case GDK_KP_6:
    key_unit_move(DIR8_EAST);
    break;

  case GDK_KP_Page_Down:
  case GDK_KP_3:
    key_unit_move(DIR8_SOUTHEAST);
    break;

  case GDK_KP_Down:
  case GDK_KP_2:
    key_unit_move(DIR8_SOUTH);
    break;

  case GDK_KP_End:
  case GDK_KP_1:
    key_unit_move(DIR8_SOUTHWEST);
    break;

  case GDK_KP_Left:
  case GDK_KP_4:
    key_unit_move(DIR8_WEST);
    break;

  case GDK_KP_Home:		
  case GDK_7:
  case GDK_KP_7:
    key_unit_move(DIR8_NORTHWEST);
    break;

  case GDK_5:
  case GDK_KP_5: 
  case GDK_KP_Begin:
    key_recall_previous_focus_unit(); 
    break;

  case GDK_Escape:
    key_cancel_action();
    break;

  case GDK_t:
    key_city_workers(w, ev);
    break;

  default:
    return FALSEMouse/touchpad scrolling over the mapviewgboolean mouse_scroll_mapcanvas(GtkWidget *w, GdkEventScroll *ev)
{
  int scroll_x, scroll_y, xstep, ystep;
  struct tile *ptile = NULL;

  if (!can_client_change_view()) {
    return FALSE;
  }

  get_mapview_scroll_pos(&scroll_x, &scroll_y);
  get_mapview_scroll_step(&xstep, &ystep);

  switch (ev->direction) {
    case GDK_SCROLL_UP:
      scroll_y -= ystep*2;
      break;
    case GDK_SCROLL_DOWN:
      scroll_y += ystep*2;
      break;
    case GDK_SCROLL_RIGHT:
      scroll_x += xstep*2;
      break;
    case GDK_SCROLL_LEFT:
      scroll_x -= xstep*2;
      break;
    default:
      return FALSE;
  };

  set_mapview_scroll_pos(scroll_x, scroll_y);

  // Emulating mouse move now
  if (!GTK_WIDGET_HAS_FOCUS(map_canvas)) {
    gtk_widget_grab_focus(map_canvas);
  }

  update_line(cur_x, cur_y);
  update_rect_at_mouse_pos();

  if (keyboardless_goto_button_down && hover_state == HOVER_NONE) {
    maybe_activate_keyboardless_goto(cur_x, cur_y);
  }

  ptile = canvas_pos_to_tile(cur_x, cur_y);
  handle_mouse_cursor(ptile);
  hover_tile = ptile;
head_of_units_in_focus(map_widgetmap_widget, label);

  frame = gtk_frame_new(NULL);
  gtk_table_attach(GTK_TABLE(map_widget
                                   |GDK_SCROLLmap_widgetmap_widgetmap_canvas, "scroll_event",
                   G_CALLBACK(mouse_scroll(_("the locale has already been set in init_nls() and the Win32-specific
   * locale logic in gtk_init() causes problems with zh_CN (see PR#39475) */
  gtk_disable_setlocale(init(tileset);
  tileset_load_tiles(tileset);

  /* keep the icon of the executable on Windows (see PR#36491) */
#ifndef WIN32_NATIVE#endif_S_PREPARINGplayer_count()C_S_RUNNING != client_state()nation_name_for_player(pplayer);
	leader = pplayer->name;
      }
      team = pplayer->team ? team_name_translationlayer_index(pplayer)], NULL);
      gtk_tree_store_set(conn_model, &it[player_index(pplayer)],
			 0, player_number(pplayer)layer_index(pconn->player)game_find_unit_by_numbergame_find_unit_by_number(unit_ids[i]);
  if (punit && unit_owner(punit)ENDREP
DELTA 12484 5457 136
SVN  ‰uŠm9 ‡  €9 ‚4‡Aenum server_events {
  S_E_END_OF_TURN_TIMEOUT,
  S_E_OTHERWISE,
  S_E_FORCE_END_OF_SNIFF,
};

enum server_events server_sniff_all_input(void);

int server_open_socket(void);
void flushENDREP
DELTA 1865 13751 104
SVN  f‰.‰.€‰./********************************************************************** 
 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
***********************************************************************/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "game.h"

#include "civclient.h"
#include "control.h"

#include "gotodlg.h"

/**************************************************************************
  Popup a dialog to have the focus unit goto to a city.
**************************************************************************/
void popup_goto_dialog(void)
{
  if (C_S_RUNNING != client_state()) {
    return;
  }
  if (get_num_units_in_focus() == 0) {
    return;
  }
  /* PORTME */
}
ENDREP
DELTA 13024 124393 135
SVN  ¾½uZ ºB €T Nœ~† K£? @¼G0 == frozen_level && C_S_RUNNING == client_state()) {
    call_handle_methods();
  }HelperENDREP
DELTA 13526 7532 2200
SVN  „â&„á
CŽH Š] › ÕgŠY –JâO †ùH ƒF€‡ SÆv ƒy„5‰ ]‚÷ €R ]‚÷  ‚<„£‹ …k„¥l€ƒ{ „g„´C€ ‚h„ÀY O„Ð= ‚=„Ä O„Ð= ‚I„Ç O„Ð= ‚:„Ê8 O„Ð= U„ÍB€M E„Â|‚ n„Ð=€‚ E„Â|‚ O„Ð=€‚W E„Â|‚ O„Ð=€‚ E„Â|‚ O„Ð=ƒ ‘„Ñ#include "connectdlg_commonC_S_RUNNING == client_state()C_S_RUNNING != client_state()s();
  save_gamesend_save_game(NULL);
    back_callback(NULL);
  }
  return -1;
}

static int exitCloseButton
  /* close button */
  pCloseButton = create_themeicon(pTheme->Small_CANCEL_Icon, pWindow->dst,
                                  WF_WIDGET_HAS_INFO_LABEL | WF_RESTORE_BACKGROUND);
  pCloseButton->string16 = create_str16_from_char(_("Close Dialog (Esc)"), adj_font(12));
  pCloseButton->action = back_callback;
  set_wstate(pCloseButton, FC_WS_NORMAL);
  pCloseButton->key = SDLK_ESCAPE;
  
  add_to_gui_list(ID_OPTIONS_BACK_BUTTON, pCloseButton);

  pOption_Dlg->pBeginCoreOptionsWidgetList = pCloseButton
  widget_set_position(pCloseButton,
                      area.x + area.w - pCloseButton->size.w - 1,
                      pWindow->size.y + adj_size(2));
  3692C_S_RUNNING == client_state()) {
    set_wstate(pTmp_GUI, FC_WS_NORMAL);
  }
15/* create save game widget */
  pTmp_GUI = create_icon_button_from_chars(NULL, 
                                pWindow->dst, _("Save Game"), adj_font(12), 0);
  pTmp_GUI->action = save_game_callback;
  
  if (C_S_RUNNING == client_state()) {
    set_wstate(pTmp_GUI, FC_WS_NORMAL);
  }
20SAVE_GAME_BUTTON, pTmp_GUI);

  /* create leave game widget */
  pTmp_GUI = create_icon_button_from_chars(NULL, 
                                pWindow->dst, _("Leave Game"), adj_font(12), 0);
  pTmp_GUI->action = disconnect_callback;
  pTmp_GUI->key = SDLK_q;
    
  if(aconnection.established) {
    set_wstate(pTmp_GUI, FC_WS_NORMAL);
  }
23DISC_BUTTON, pTmp_GUI);

  /* create quit widget */
  pTmp_GUI = create_icon_button_from_chars(NULL, 
                                pWindow->dst, _("Quit"), adj_font(12), 0);
  pTmp_GUI->action = exit_callback;
  pTmp_GUI->key = SDLK_q;
    
  set_wstate(pTmp_GUI, FC_WS_NORMAL);
26EXIENDREP
DELTA 13387 0 339
SVN  †  †  ‰ Í  ‹hÍ; ™Ù?µ ‚¡2ó· ‘„”n °R„¦ ¾=„Öy€: S«? †^…—GŸ ”{…žC¸ žA…³u€ ‰…ÓV¸ ŽV…Ý€O S†“~ ‚5…í €N Œ:…ð,€ )…ÓV ‰P…ÿ/¸ ‰p†‰6€O Œ†“~¹S_S_RUNNING == server_state()S_S_INITIAL != server_state()game.info.is_new_game || S_S_INITIAL != server_state(!game.info.is_new_game || S_S_INITIAL != server_state()S_S_RUNNING != server_state()tile_city(ptile)S_S_RUNNING, triggers a popdown_races_dialog() call
     * in client/packhand.c#handle_game_info() 
     */
    if (S_S_RUNNING == server_state()) {
      send_game_info(NULL);
    }
  }(S_S_INITIAL == server_state())game.info.is_new_game && (S_S_INITIAL == server_state())S_S_RUNNING == server_state()) {
    send_packet_freeze_hint(pconn);
    send_all_info(pconn->self);
    send_game_state(pconn->self, C_S_RUNNINGgame.info.is_new_game && (S_S_INITIAL == server_state())S_S_RUNNING == server_state()) {
    send_game_state(pconn->self, C_S_PREPARINGS_S_RUNNING == server_state()) {
	  send_game_state(aconn->self, C_S_PREPARINGS_S_RUNNING == server_state()) {
    send_packet_freeze_hint(pconn);
    send_all_info(pconn->self);
    send_game_state(pconn->self, C_S_RUNNINGgame.info.is_new_game && (S_S_INITIAL == server_state())S_S_RUNNING == server_state()) {
    send_game_state(pconn->self, C_S_PREPARING{
      toggle_ai_player_direct(NULL, pplayer);
    }
   †  ƒƒƒƒC@z —`9 ·C˜7 ª(Ð ú^˜ …3ü …!g˜ Ž‡!ˆ x•K± Ù
—f ’qñS_S_INITIAL != server_state()S_S_INITIAL != server_state()S_S_RUNNING == server_state()t_server_state(S_S_OVER)S_S_RUNNING == server_state()()) {
  case S_S_INITIALS_S_OVERS_S_RUNNING:
  case S_S_GENERATING_WAITING_UNUSEDS_S_INITIAL == server_state()ENDREP
DELTA 13857 607 17655
SVN  „êL„é8J‚? Ò$ — ¦8ÒI çdù0 åFáC ŒƒÇ8 ‰ƒÓk _ƒÝ „aƒí+€@ ’_ƒòB ÝC„…P ‡
„ãBhead_of_units_in_focus(C_S_RUNNING == client_state()C_S_RUNNING == client_state()C_S_RUNNING == client_state()C_S_RUNNING == client_state()C_S_RUNNING != client_state()C_S_RUNNING != client_state()tile_city(ptile)) != NULL) &&
                (city_owner(pCity)C_S_RUNNING == client_state()C_S_RUNNING == client_state()ENDREP
DELTA 14102 175 3570
SVN  ƒ¦qƒ¦N: µ0  Dµ/ `‚Å" à@‚Æ1C_S_RUNNING <= client_state()C_S_RUNNING <= client_state()ENDREP
DELTA 13368 6469 1254
SVN  ÈJÈB ¨s Œ ŸC©_S_PREPARINGENDREP
DELTA 13957 0 8322
SVN  ‚²c‚²0ƒ. —  œ;—? …-´) a—? ‰'ºf ›3Ä<€‚ žnáv ±P‚C_S_RUNNING == client_state()C_S_RUNNING == client_state()C_S_RUNNING == client_state()C_S_RUNNING == client_state()#ifdef SMALL_SCREEN
  SDL_Rect area = {0, 0, 0, 0};
#else
  SDL_Rect area = {0, 3, 0, 0};
#endif
  SDL_String16 *pText;

  if (get_client_page() != PAGE_GAME) {
    return;
  }
  
#ifdef SMALL_SCREEN
  pText = create_string16(NULL, 0, 8);
#else
  pText = create_string16(NULL, 0, 10);
C_S_RUNNING != client_state()ENDREP
DELTA 8639 6769 698
SVN  ˆÃaSµE …g €ˆ G €1 G  a†9€C G €‚8 G € G €‚( G €g G €L G €N G €r G €‚ G €‚ G €=<X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Label.h>
#include <X11/Xaw/SimpleMenu.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/List.h>

#include "game.h"

#include "fcintl.h"
#include "support.h"

#include "civclient.h"
#include "connectdlg_g.h"
#include "dialogs_g.h"

#include "chatline.h" /* for send_chat() */
#include "gui_main.h"
#include "gui_stuff.h" /* for xaw_set_relative_position() */

#include "pages.h"

static enum client_pages old_page;

static Widget start_page_shell;
static Widget start_page_form;
static Widget start_page_label;
static Widget start_page_players_list;
static Widget start_page_cancel_command;
static Widget start_page_nation_command;
static Widget start_page_start_command;
void start_page_cancel_callback(Widget w, XtPointer client_data,
				XtPointer call_data);
void start_page_nation_callback(Widget w, XtPointer client_data,
				XtPointer call_data);
void start_page_start_callback(Widget w, XtPointer client_data,
			       XtPointer call_data);


*****
  Returns current client page
***************************************************************************/
enum client_pages get_client_page(void)
{
  return old_page;
}

  if (page == PAGE_GAME) {
    if (old_page == PAGE_START) {
      popdown_start_page();
    }
  } else {
    if (page == PAGE_START) {
      popup_start_page();
    }
  }

  old_page = page;
}

******
  Set the list of available rulesets.  The default ruleset should be
  "default", and if the user changes this then set_ruleset() should be
  called.
****************************************************************************/
void gui_set_rulesets(int num_rulesets, char **rulesets)
{
  /* PORTME */
}

****
                                  START PAGE
**************************************************************************/

****
  Popup start page.
**************************************************************************/
void popup_start_page(void)
{
  if (!start_page_shell) {
    create_start_page();
  }

  xaw_set_relative_position(toplevel, start_page_shell, 5, 25);
  XtPopup(start_page_shell, XtGrabNone);
}

****
  Close start page.
**************************************************************************/
void popdown_start_page(void)
{
  if (start_page_shell) {
    XtDestroyWidget(start_page_shell);
    start_page_shell = 0;
  }
}

****
  Create start page.
**************************************************************************/
void create_start_page(void)
{
  start_page_shell =
    I_IN(I_T(XtCreatePopupShell("startpage",
				topLevelShellWidgetClass,
				toplevel, NULL, 0)));

  start_page_form = XtVaCreateManagedWidget("startpageform",
				       formWidgetClass,
				       start_page_shell, NULL);

  start_page_label = I_L(XtVaCreateManagedWidget("startpagelabel",
					labelWidgetClass,
					start_page_form, NULL));

  start_page_players_list =
    XtVaCreateManagedWidget("startpageplayerslist",
			    listWidgetClass,
			    start_page_form,
			    NULL);

  start_page_cancel_command =
    I_L(XtVaCreateManagedWidget("startpagecancelcommand",
				commandWidgetClass,
				start_page_form, NULL));

  start_page_nation_command =
    I_L(XtVaCreateManagedWidget("startpagenationcommand",
				commandWidgetClass,
				start_page_form,
				NULL));

  start_page_start_command =
    I_L(XtVaCreateManagedWidget("startpagestartcommand",
				commandWidgetClass,
				start_page_form,
				NULL));

/*
  XtAddCallback(start_page_players_list, XtNcallback,
		start_page_players_list_callback,
		NULL);
*/
  XtAddCallback(start_page_cancel_command, XtNcallback,
		start_page_cancel_callback,
		NULL);

  XtAddCallback(start_page_nation_command, XtNcallback,
		start_page_nation_callback,
		NULL);

  XtAddCallback(start_page_start_command, XtNcallback,
		start_page_start_callback,
		NULL);

  update_start_page();

  XtRealizeWidget(start_page_shell);
  
  XSetWMProtocols(display, XtWindow(start_page_shell),
		  &wm_delete_window, 1);
  XtOverrideTranslations(start_page_shell,
    XtParseTranslationTable("<Message>WM_PROTOCOLS: msg-close-start-page()"));
}

****
  Update start page players list.
**************************************************************************/
void update_start_page(void)
{
  if (!start_page_shell) {
    return;
  }
  if (C_S_RUNNING != client_state()) {
    bool is_ready;
    const char *name, *nation, *leader;
    static char *namelist_ptrs[MAX_NUM_PLAYERS];
    static char namelist_text[MAX_NUM_PLAYERS][256];
    int j;
    Dimension width;

    j = 0;
    players_iterate(pplayer) {
      if (pplayer->ai.control) {
	name = _("<AI>");
      } else {
	name = pplayer->username;
      }
      is_ready = pplayer->ai.control ? TRUE: pplayer->is_ready;
      if (pplayer->nation == NO_NATION_SELECTED) {
	nation = _("Random");
	leader = "";
      } else {
	nation = nation_name_for_player(pplayer);
	leader = pplayer->name;
      }

      my_snprintf(namelist_text[j], sizeof(namelist_text[j]),
		  "%-16s %-5s %-16s %-16s %4d",
		  name,
		  is_ready ? " Yes " : " No  ",
		  leader,
		  nation,
		  player_number(pplayer));

      namelist_ptrs[j]=namelist_text[j];
      j++;
    } players_iterate_end;
    conn_list_iterate(game.est_connections, pconn) {
      if (pconn->player && !pconn->observer) {
	continue; /* Already listed above. */
      }
      name = pconn->username;
      nation = "";
      leader = "";

      my_snprintf(namelist_text[j], sizeof(namelist_text[j]),
		  "%-16s %-5s %-16s %-16s %4d",
		  name,
		  " No   ",
		  leader,
		  nation,
		  -1);

      namelist_ptrs[j]=namelist_text[j];
      j++;
    } conn_list_iterate_end;
    XawListChange(start_page_players_list, namelist_ptrs, j, 0, True);

    XtVaGetValues(start_page_players_list, XtNwidth, &width, NULL);
    XtVaSetValues(start_page_label, XtNwidth, width, NULL); 
  }
}

****
  Callback for start page "Cancel" button
**************************************************************************/
void start_page_cancel_callback(Widget w, XtPointer client_data,
				XtPointer call_data)
{
  popdown_start_page();
}

****
  Called when "Pick Nation" is clicked.
**************************************************************************/
void start_page_nation_callback(Widget w, XtPointer client_data,
				XtPointer call_data)
{
  if (game.player_ptr) {
    popup_races_dialog(game.player_ptr);
  }
}

****
  Callback for start page "Start" button
**************************************************************************/
void start_page_start_callback(Widget w, XtPointer client_data,
			       XtPointer call_data)
{
  /* popdown_start_page(); */
  send_chat("/start");
}

****
  Callback for start page window (x) button
**************************************************************************/
void start_page_msg_close(Widget w)
{
  popdown_start_page();
}
ENDREP
DELTA 14114 0 1003
SVN  …½…¼q7 ¶w š ¶"·# ƒÏ!ítC_S_OVER != client_state()C_S_RUNNING != client_state()ENDREP
DELTA 13927 20105 7755
SVN  ƒðVƒðT<o ±  •0±" dÆpœ àÈq „L‚©œ Ž
‚­y· Ÿ<‚¼;Œ »‚Û~ Ù7ƒ—S_S_RUNNING != server_state()S_S_RUNNING <= server_state()S_S_RUNNING > server_state()S_S_RUNNING != server_state()S_S_RUNNING > server_state()game.info.is_new_game || (S_S_INITIAL != server_state()_city(tile1)S_S_INITIAL != server_state()ENDREP
DELTA 14034 0 7319
SVN  †  †  E„+ â$ “ #â#† ¡}ñE“ ‰h‚“A† ´(‚(€‚q G  š`ƒÒ‡ ÁTƒí }…®[€  ì	…¯U#ifdef OWNER_SOURCE#endif#ifdef OWNER_SOURCE#endif
    /* Claim ownership of fortress? */
    if (tile_has_base_flag_for_unit(punit->tile, unit_type(punit),
                                    BF_CLAIM_TERRITORY)
     && (!tile_owner(punit->tile)
      || pplayers_at_war(tile_owner(punit->tile), plr))) {
      map_claim_ownership(punit->tile, plr, punit->tile);
      map_claim_border(punit->tile, plr);
    }
  }
}

VERBOSEA
    /* After all the set_worker_city() are done. */
    map_claim_ownership(ptile, plr, ptile);
    map_claim_border(ptile, plr†  ƒÒƒ×B[‡A€„" €}   ·S€|½ 	¸M¡ çÅx‹  ‚­$µ ƒs‚®Z¡ ˆO‚²nŸ »)‚»_± ´Q ’r‚ø­ ªdƒ‹9‹ ‘"ƒ¶+¸ ŠƒÈ    * See the loading code for more explanation. */
    int revolution;

    if (plr->revolution_finishes < 0) {
      /* No revolution. */
      revolution = 0;
    } else if (plr->revolution_finishes <= game.info.turn) {
      revolution = 1; /* Approximation. */
    } else {
      revolution = plr->revolution_finishes - game.info.turn;
    }
    secfile_insert_int(file, revolution, "player%d.revolution", plrno);
  }

  /* 1.14 servers depend on technology order in ruleset. Here we are trying
   * to simulate 1.14.1 default order */
  ini
	 && plr != vision_owner(pdcity  bool was_send_tile_suppressed = send_tile_suppression(TRUE)S_S_RUNNING, "game.server_state()S_S_INITIALS_S_INITIAL == tmp_server_state && 0 == map.generator (S_S_INITIAL == tmp_server_stateS_S_RUNNING == tmp_server_state
  send_tile_suppression(was_send_tile_suppressed() :
				  S_S_RUNNING), "game.server_state()S_S_INITIALgame.info.is_new_game && (S_S_INITIAL == server_state())ENDREP
DELTA 13844 0 5345
SVN  †  †  / ‚ß	  ƒÀH‚ß8’C_S_RUNNING != client_state()                (M†  ½)½  ½ENDREP
DELTA 13927 32288 1521
SVN  ‚È]‚È3)J ¨A  ˆ]¨E‡ 1±)‰ ‚x²a …iµ] ± »u Û9í$Goto _LInspect _C_S_RUNNING == client_state()C_S_RUNNING == client_state()ENDREP
DELTA 12655 10239 398
SVN  ×L×NA„@ ‡-  ‡X€‚ ‡@‹C „M“¬ ‡e—G€@ Ÿ€D ‚	 .€U Z¢z <¥H œR§§ “`ÃlS_S_INITIAL = 0, 
  S_S_GENERATING_WAITING_UNUSED = 1,	/* For savegame compatibility. */
  S_S_RUNNING = 2,
  S_S_OVER = 3,
};

/* used in network values */
enum client_states { 
  C_S_INITIAL = 0,
  C_S_PREPARING = 1,
  C_S_STARTING = 2,
  C_S_RUNNING = 3,
  C_S_OVER = 4,
};coreturn;			/* next make_history_report() */bool user_message_set;
    char user_message[256];
  } meta_infobool is_server(void);
void i_am_server(void);
void i_am_client(void)struct city *game_find_city_by_number(int id);

struct unit *game_find_unit_by_number#define GAME_DEFAULT_SCORETURN       20ENDREP
DELTA 13604 2479 439
SVN  ‚´/‚³i9ƒ
 À µ *ÀT£ Â%… OÃ8Ž žzÄ€^ ™8å)¨ žxÿ †B‚ž™ N‚¤a_Write Log"),				IDM_GAME_EXPORT_LOG},
  {N_("_Clear _Edit"),					IDM_SUBMENU},
  {N_("__WorkGovernment"),	C_S_RUNNING <= client_state());
  my_enable_menu(menu, IDM_GAME_SAVE_QUICK,
		 can_client_access_hack()
		 && C_S_RUNNING <= client_state());
  my_enable_menu(menu, IDM_GAME_SERVER_OPTIONS,
		 C_S_RUNNING <= client_state()NULL != (punit = head_of_units_in_focus(tile_terrain(punit->tile)ENDREP
DELTA 13828 0 10189
SVN  çKçH1 “" Ÿ “M’ ƒp°Q ²}´NC_S_PREPARING == client_state()SDL_Surface *pSurfENDREP
DELTA 13948 78111 2263
SVN  ‚…h‚†4%‚ »Q  V¼ €b TÌ|€] aÝq ˆ'ßŒ ž,ç<C_S_RUNNING == client_state()if (!(get_wstate(pWidget) == FC_WS_DISABLED)) {
      return widget_pressed_action(pWidget);
    }if (!(get_wstate(pWidget) == FC_WS_DISABLED)) {
      widget_sellected_action(pWidget);
    }C_S_RUNNING == client_state()_S_PREPARINGENDREP
DELTA 13899 5988 83
SVN  ‰@‰.	 ˆ5  \ˆdC_S_RUNNING != client_state()ENDREP
DELTA 13948 83785 11732
SVN  ƒþ%„*+©h z €[ Lƒñ@ ‚6ŽB¬ CŽ € QÒ? ƒju§ †>”W ‚d‚›€ƒJ …y‚Ÿ‚ ¬[‚¥€d ƒH‚Ñt€d ž[‚ÕT nƒ@… Fý} ‹"‚ö  ±~ƒ@” G  †ƒ¹† Oƒñ@¢ CŽ €Ž Vƒ¨· TƒÃ=€, \‚§> ƒsƒÇ8€‚* £,ƒË%† UƒîP Suppress send_tile_info() during game_load() */
static bool send_tile_suppressed = FALSE;
uppress send_tile_info() during game_load()
*******/
bool send_tile_suppression(bool now)
{
  bool formerly = send_tile_suppressed;

  send_tile_suppressed = now;
  return formerlysend_tile_suppressed) {
    return;
  }/* removing borders */
  whole_map_iterate(ptile) {
    struct player_tile *playtile = map_get_player_tile(ptile, pplayer);

    /* cleverly uses return that is NULL for non-site tile */
    playtile->site = map_get_player_base(ptile, pplayer);
  } whole_map_iterate_end;

  /* only after removing borders! */
  whole_map_iterate(ptile) {
    struct vision_site *psite = map_get_player_base(ptile, pplayer);

    if (NULL != psite) {
      free_vision_site(p;
 && dest_tile->site->location == ptile) {
	if (!from_tile->site || from_tile->site->location != ptil && from_tile->site->location == ptile) {
	if (!dest_tile->site || dest_tile->site->location != ptilS_S_RUNNING == server_state()
...
S_S_RUNNING == server_state()#ifdef OWNER_SOURCE
#endifClaim ownership of a single tile.
******/
void map_claim_ownership(struct tile *ptile, struct player *powner,
                         struct tile *psource)
{
  struct player *ploser = tile_owner(ptile);

  if (NULL != ploser) {
    struct player_tile *playtile = map_get_player_tile(ptile, ploser);

    /* cleverly uses return that is NULL for non-site tile */
    playtile->site = map_get_player_base(ptile, ploser);

    if (NULL != playtile->site && ptile == psource) {
      /* has new owner */
      playtile->site->owner = powner;
    }
  }

  if (NULL != powner /* assume && NULL != psource */) {
    struct city *pcity = tile_city(ptile);
    struct player_tile *playtile = map_get_player_tile(psource, powner);

    if (NULL != playtile->site) {
      if (ptile != psource) {
        map_get_player_tile(ptile, powner)->site = playtile->site;
      } else if (NULL != pcity) {
        playtile->site = update_vision_site_from_city(playtile->site, pcity);
      } else {
        /* has new owner */
        playtile->site->owner = powner;
      }
    } else {
      assert(ptile == psource);
      if (NULL != pcity) {
        playtile->site = create_vision_site_from_city(pcity);
      } else {
        playtile->site = create_vision_site(-1/*FIXME*/, psource, powner);
      }
    }
  }

  tile_set_owner(ptile, powner);
  send_tile_info(NULL, ptile, FALSE);

  /* This implementation is somewhat inefficient.  By design, it's not
   * called often.  Does not send updates to client.
   */
  if (NULL != ploser && ploser != powner) {
    city_list_iterate(ploser->cities, pcity) {
      update_city_tile_status_map(pcity, ptile);
    } city_list_iterate_end;
  }
  if (NULL != powner && ploser != powner) {
    city_list_iterate(powner->cities, pcity) {
      update_city_tile_status_map(pcity, ptile);
    } city_list_iterate_endUpdate borders for this source.  Call this for each newvoid map_claim_border(struct tile *ptile, struct player *powner)
{
  struct vision_site *psite = map_get_player_site(ptile, powner);
  int range = game.info.borders;

  if (0 == range) {
    /* no borders */
    return;
  }
  if (VISION_SITE_RUIN == psite->identity) {
    /* should never be called! */
    freelog(LOG_VERBOSE, "Warning: border source (%d,%d) is ruin!",
            TILE_XY(ptile));
    return;
  }
  if (VISION_SITE_RUIN < psite->identity) {
    /* city expansion */
    range = MIN(psite->size + 1, game.info.borders);
    if (psite->size > game.info.borders) {
      range += (psite->size - game.info.borders) / 2;
    }
  }
  range *= range; /* due to sq dist */

  freelog(LOG_VERBOSE, "border source (%d,%d) range %d",
          TILE_XY(ptile), range);

  circle_dxyr_iterate(ptile, range, dtile, dx, dy, dr) {
    struct player *downer = tile_owner(dtile);

    if (!map_is_known(dtile, powner)) {
      /* border tile never seen */
      continue;
    }
    if (NULL != downer && downer != powner) {
      struct vision_site *dsite = map_get_player_site(dtile, downer);
      int r = sq_map_distance(dsite->location, dtile);

      /* border tile claimed by another */
      if (VISION_SITE_RUIN == dsite->identity) {
        /* ruins don't keep their borders */
        dsite->owner = powner;
        tile_set_owner(dtile, powner);
        continue;
      } else if (r < dr) {
        /* nearest shall prevail */
        continue;
      } else if (r == dr) {
        if (dsite->identity < psite->identity) {
          /* lower shall prevail: airport/fortress/city */
          continue;
        } else if (dsite->identity == psite->identity) {
          /* neither shall prevail */
          map_claim_ownership(dtile, NULL, NULL);
          continue;
        }
      }
    }

    if (is_ocean_tile(dtile)) {
      if (is_claimable_ocean(dtile, ptile)) {
        map_claim_ownership(dtile, powner, ptile);
      }
    } else {
      if (tile_continent(dtile) == tile_continent(ptile)) {
        map_claim_ownership(dtile, powner, ptile);
      }
    }
  } circle_dxybase sites are done first, as they may be thorn in city side. */
  sites_iterate(psite) {
    map_claim_border(psite->location, vision_owner(psite));
  } sites_iterate_end;

  cities_iterate(pcity) {
    map_claim_border(pcity->tile, city_owner(pcity));
  } cities_iterate_end;

#ifdef OWNER_SOURCE#endifENDREP
DELTA 13948 103760 170
SVN  ƒ„hƒ„V ‚ž œ æ%‚žCC_S_RUNNING > client_state()ENDREP
DELTA 13496 0 7988
SVN  ƒøX„ˆƒ ¢e ”$  h”@· {•X‹ ƒ6£C Pé €E G  Uô?€V G  ¦t€U NÈ µ©3— ƒxÞV— ˆâ` õë7Ÿ ƒ~àd› ‚!ä}€C ‚gçd€‚" ‘ëQ† ‚WüW€A ‰ÿn… „M‚ˆ`  ‚Kš 8‚
€y „A‚‘E€ g‚—Ž Å&‚™° ‹‚Þg· ¯`‚ëº [È~‹ „ ƒœ€F ‰Qƒ d• „ƒªA¨ ƒ3ƒ®oš ƒ²A€W ƒ)ƒ´=€c ƒNƒ·{€‚ ƒrƒ»G› ƒ¿Tƒ G ˜ ZÈ€„W G  †ƒÊg ZÈ‘ ‡&ƒÓ €u ‡TƒÛ:€D yƒã7€ƒ@ ~ƒèp ƒZƒém€n G  †ƒï:´ Sƒõ?€  !ƒö€  "ƒ÷%“ G — NÈ€I EƒÒ €; WƒÆ.– ‚ƒÇ€xstatic enum server_states civserver_state = S_S_INITIALconf = NULLenum server_states server_state(void)
{
  return civserver_state;
}

void set_server_state(enum server_states newstate)
{
  civserver_state = newstate;
}

(). The
  caller must set the server state to S_S_OVER if the function
  returns TRUEtile_owner(punit->tile)tile_owner(punit->tile) (S_S_INITIAL != server_state()t_server_state(S_S_RUNNING)t_server_state(S_S_OVER);
  server_game_free();
  diplhand_free();
#ifdef HAVE_AUTH
  if (srvarg.auth_enabled) {
    /* If auth has been initialized */
    auth_free();
  }
#endif /* HAVE_AUTH */S_S_RUNNING != server_state() && S_S_OVER != server_state()) {
    freelog(LOG_ERROR, "Got a report request %d before game start", type);
    return;
  }

  if (pconn->player == NULL && !pconn->observer) {
    freelog(LOG_ERROR,
            "Got a report request %d from detached connectionNORMAL, "
			    "please upgrade your client to a "
			    "Freeciv 2.2REPORS_S_RUNNING != server_state()S_S_OVER == server_state()S_S_OVER", type);
    } else {
      freelog(LOG_ERROR, "got a packet of type %d "
	                 "outside S_S_RUNNINGS_S_RUNNING == server_state()
      && type != PACKET_PLAYER_READY) {
    /* HACK: the player_ready packet puts the server into S_S_RUNNINGS_S_GENERATINGNULL == pplayer || S_S_INITIAL != server_state()!game.info.is_new_game || S_S_INITIAL != server_state()  Play the game! Returns when S_S_RUNNING != server_state(srv_runningS_S_RUNNING == server_state());
  while (S_S_RUNNING == server_state()erver_sniff_all_inputerver_sniff_all_input() == S_E_OTHERWISES_S_OVER == server_state()S_S_OVER != server_state() && check_for_game_over()) {
      set_server_state(S_S_OVER)static void srv_prepare(void)
{
#ifdef HAVE_AUTH
  if (!srvarg.auth_enabled) {
    con_write(C_COMMENT, _("This civserver program has player authentication support, but it's currently not in use."));
  }
#endif /* HAVE_AUTH */
#ifdef HAVE_AUTH
  if (srvarg.auth_enabled) {
    bool success;

    success = auth_init(srvarg.auth_conf);
    free(srvarg.auth_conf); /* Never needed again */
    srvarg.auth_conf = NULL;
    if (!success) {
      exit(EXIT_FAILURE);
    }
  }
#endif /* HAVE_AUTH */t_server_state(S_S_INITIAL)}

****
  Score calculationsrv_scores(void)
{
  /* Recalculate the scores in case of a spaceship victory */
  players_iterate(pplayer) {
    calc_civ_score(pplayer);
  } players_iterate_end;

  send_game_state(game.est_connections, C_S_OVER);
  report_final_scores();
  show_map_to_all();
  notify_player(NULL, NULL, E_GAME_END, _("The game is over..."));
  send_server_info_to_metaserver(META_INFO);

  if (game.info.save_nturns > 0
      && conn_list_size(game.est_connections) > 0) {
    /* Save game on game_over, but not when the gameover was caused by
     * the -q parameter. */
    save_game_auto("Game over");
  }
}

t up one gamesrv_ready(void)
{t_server_state(S_S_RUNNING);
  (void) send_server_info_to_metaserver(META_INFO);
  send_server_settings(NULL);

  if 
    assert(game.info.is_new_game); { /* FIXME: inexplicable test */
    /* Set up alliances based on team selections */
    assert(game.info.is_new_game); /* FIXME: inexplicable test */
    players_iterate(pplayer) {
      players_iterate(pdest) {
        if (players_on_same_team(pplayer, pdest)
            && player_number(pplayer) != player_number(pdest)) {
          pplayer->diplstates[player_index(pdest)].type = DS_TEAM;
          give_shared_vision(pplayer, pdest);
        }
      } players_iterate_end;
  (game.info.is_new_game) {
    init_new_game();
  }

  send_game_state(game.est_connections, C_S_RUNNING);
}

/* Free the vision data, without sending updates. *//* don't bother using vision_clear_sight() */
      vision_layer_iterate(v) {
        punit->server.vision->radius_sq[v] = -1;
      } vision_layer_iterate_end;/* don't bother using vision_clear_sight() */
      vision_layer_iterate(v) {
        pcity->server.vision->radius_sq[v] = -1;
      } vision_layer_iterate_end;
  game_free();
}

****
  Server main loopvoid srv_main(void)
{
  srv_prepare();

  /* Run server loop */
  do {
    while (S_S_INITIAL == server_state()) {
      server_sniff_all_input(); /* Accepting commands. */
    }

    srv_ready();
    srv_running();
    srv_scores();

    /* Remain in S_S_OVERserver_sniff_all_inputt_server_state(S_S_INITIAL);
  } while (TRUE);

  /* Technically, we won't ever get here. We exit via server_quit. */
}
ENDREP
DELTA 9948 6123 37995
SVN  †  †  ‹WƒÔ$ ‰ „ ‚+‰‘ 	‹'€ƒa ‚~ª€„ ]-€¨ u“K€` „!™f€F už( ƒS£W“ ‚	 1€Ši RË  Hç@€@ `Á™ P‚¼@€H \Á ¯"³ `Á O±1ª fÁy¬ )Æ*± `Á W³y€…F P‚¼@€H gÁx Y¶8€h P‚¼@€Q `Á ‚¸{¯ gÁx N¼€m P‚¼@€T mÁ… ‚Âr­ rÁm€L P‚¼@€T ‚|Áº `Á ‚ÈN« _Î  ‚ËM§ fÍy» P‚¼@€h PÁ L‚¼@€< PÁ †bÒ}¾ YÙ|ƒ ƒzÚU€
 ƒqß/€„j LÁ ƒå<€‚ ]Ú{ ‚Oñe€m ô7€ƒx ‚@ø}€‹, Wƒà| L‚¼@€7 LÁ€ I‚¼@€…Q LÁ „€f€ƒ? ‚†>· s‰€‚7 …_‹FŠ O‘<€ˆp "šS‚ †i›w |¢a ƒ £^‡ w¦`¦ …i§{˜ ­† ;¯ ³ ƒ(°k¥ ;´ ˜  µv† ‚:¶v€Q Š»Mƒ uÆL€m [È&š ‡Éƒ hÐ'€k aÑrƒ ‡AÒSº ÚL  I‚¼@€ƒ) LÁ \ÛU€K nÝd€… Yá-€` ^â€ aä/€ƒv wèh€H wèh  7ì)Ÿ Wíy€j cð"€…) õp€‹F \‚5€\ Z‚‚g€’N P‚’: k‚–!€Ÿ	 G‚©1€‚d b‚¬"€†| LÁ ‚°K€ 3‚³U€F \Úy ‚‚¶9€l ‚q‚º<€i F‚½z€m PÁ€ L‚¼@€‰e PÁ€m L‚¼@€ƒ[ ]ƒàv€‚< Hç@€ƒ2 TÛ<€g L‚¼@€ƒd |‚Â€…7 RË  ‚Ê$€„J m„–t ‚Ñ+€‚ T‚Õ0€o w‚×g€ R¡~€…N UÁ€} R¡~€Œ> UÁ¼ R¡~€‚T LÁ 6‚Ø^€N ‚Û9€ƒ. ‚Z‚ßQ€‰1 ‚éƒ ,‚ê€A ‚5‚ëx² ƒL‚îY€‚ „K‚ôG€e v‚ùqƒ  ‚úg€= ‚a‚ý½ hƒ€0ƒ IƒŸ~ƒ ‚pƒa „ƒ…4€‚$ ƒ@ƒ‰P€u Eƒw€ƒ IƒŸ~€< _ƒ% ˆƒ€@ oƒ™V `ƒœc€w IƒŸ~ƒ gƒ G€ƒZ Oƒ¥s€… Mƒ¨G€D …ƒªR ;ƒ¯Y€„3 Iƒ¶;£ hƒ´Sƒ nƒ¶;ƒ Zƒ·)ƒ Iƒ¶;€x =ƒ¹>€u Xƒ»gƒ Cƒ½?¤ Wƒ¾.€D `ƒ¿Cƒ nƒÁ#„ PƒÀ6€` ‚TƒÃ6€E ƒÆH€ PÁ€‚ L‚¼@€g G  ‚HƒÉF€_ LÁ pƒÍ,€F Lç@€ƒ BƒÐ€‚D ‚GƒÓh€S ƒÛr $ƒØ{€‚ ‚1ƒÛr€ƒ. Wƒà|” 
ƒáb€‚< UÁ‡ 
ƒáb€‘ IË  %ƒáS€„H ƒæu€­6 u„…d€V M„‡y€‚ LÁ %„o€‚ ƒ×|‹ „Ž €„ `„•r€‚] LÁ ~„—a€ LÁ „š1€‡ MË  ƒn„¯{€Q @„µN€ „¸€J OÛ= „º=Ÿ w„»Q€` h„½s€l M„¿|€‚7 a„Ât€j M„Å3€‚X H„È~€ebase#include "unitlis#include "themes_g.h"

#include "civclient.h"		/* for client_state() */
#include "climap.h"		/* for client_tile_get_known() */
#include "control.h"		/* for fill_xxx */
#include "goto.h"
#include "options.h"		/* for fill_xxx */
#include "themes_common.h"

#include "citydlg_common.h"	/* for generate_citydlg_dimensions() */
#include "tilespec.h"

#define TILESPEC_CAPSTR "+tilespec4+2007.Oct.26 duplicates_ok"
/*
 * Tilespec capabilities acceptable to this program:
 *
 * +tilespec4#define TILESPEC_SUFFIX ".tilespec"
#define TILE_SECTION_PREFIX "tile_"

/* This the way directional indices are now encoded: */
#define MAX_INDEX_CARDINAL 		64
#define MAX_INDEX_HALF                  16
#define MAX_INDEX_VALID			256

#define NUM_TILES_HP_BAR 11
#define NUM_TILES_DIGITS 10
#define NUM_TILES_SELECT 4
#define MAX_NUM_CITIZEN_SPRITES 6

/* This could be moved to common/map.h if there's more use for it. */
enum direction4 {
  DIR4_NORTH = 0, DIR4_SOUTH, DIR4_EAST, DIR4_WEST
};
static const char direction4letters[4] = "udrl"enum match_style {
  MATCH_NONE,
  MATCH_SAME,		/* "boolean" match */
  MATCH_PAIR,
  MATCH_FULL
};

enum sprite_type {
  CELL_WHOLE,		/* entire tile */
  CELL_CORNER		/* corner of tile */
};

struct drawing_data {
  char *name;
  char *mine_tag;

  int num_layers; /* 1 thru MAX_NUM_LAYERS. */
#define MAX_NUM_LAYERS 3

  struct drawing_layer {
    bool is_tall;
    int offset_x, offset_y;

    enum match_style match_style;
    int match_index[1 + MATCH_FULL];
    int match_indices; /* 0 = no match_type, 1 = no match_with */

    enum sprite_type sprite_type;

    struct sprite_vector base;
    struct sprite *match[MAX_INDEX_CARDINAL];
    struct sprite **cells;
  } layer[MAX_NUM_LAYERS];

  bool is_reversed;

  int blending; /* layer, 0 = none */
  struct sprite *blender;
  struct sprite *blend[4]; /* indexed by a direction4 */

  struct sprite *mine;
};

struct city_sprite {
  struct {
    int num_thresholds;
    struct {
      int city_size;
      struct sprite *sprite;
    } *thresholds;
  } *styles;
  int num_styles;
};

struct named_sprites {
  struct sprite
    *indicator[INDICATOR_COUNT][NUM_TILES_PROGRESS],
    *treaty_thumb[2],     /* 0=disagree, 1=agree */
    *arrow[ARROW_LAST], /* 0=right arrow, 1=plus, 2=minus */

    *icon[ICON_COUNT],

    /* The panel sprites for showing tax % allocations. */
    *tax_luxury, *tax_science, *tax_gold,
    *dither_tile;     /* only used for isometric view */

  struct {
    struct sprite
      *tile,
      *worked_tile,
      *unworked_tile;
  } mask;

  struct sprite *tech[A_LAST];
  struct sprite *building[B_LAST];
  struct sprite *government[G_MAGIC];
  struct sprite *unittype[U_LAST];
  struct sprite *resource[MAX_NUM_RESOURCES];

  struct sprite_vector nation_flag;
  struct sprite_vector nation_shield;

  struct citizen_graphic {
    /* Each citizen type has up to MAX_NUM_CITIZEN_SPRITES different
     * sprites, as defined by the tileset. */
    int count;
    struct sprite *sprite[MAX_NUM_CITIZEN_SPRITES];
  } citizen[CITIZEN_LAST], specialist[SP_MAX];
  struct sprite *spaceship[SPACESHIP_COUNT];
  struct {
    int hot_x, hot_y;
    struct sprite *frame[NUM_CURSOR_FRAMES];
  } cursor[CURSOR_LAST];
  struct {
    struct sprite
      /* for roadstyle 0 */
      *dir[8],     /* all entries used */
      /* for roadstyle 1 */
      *even[MAX_INDEX_HALF],    /* first unused */
      *odd[MAX_INDEX_HALF],     /* first unused */
      /* for roadstyle 0 and 1 */
      *isolated,
      *corner[8], /* Indexed by direction; only non-cardinal dirs used. */
      *total[MAX_INDEX_VALID];     /* includes all possibilities */
  } road, rail;
  struct {
    struct sprite_vector unit;
    struct sprite *nuke;
  } explode;
  struct {
    struct sprite
      *hp_bar[NUM_TILES_HP_BAR],
      *vet_lev[MAX_VET_LEVELS],
      *select[NUM_TILES_SELECT],
      *auto_attack,
      *auto_settler,
      *auto_explore,
      *fallout,
      *fortified,
      *fortifying,
      *go_to,			/* goto is a C keyword :-) */
      *irrigate,
      *mine,
      *pillage,
      *pollution,
      *road,
      *sentry,
      *stack,
      *loaded,
      *transform,
      *connect,
      *patrol,
      *battlegroup[MAX_NUM_BATTLEGROUPS],
      *lowfuel,
      *tired;
  } unit;
  struct {
    struct sprite
      *unhappy[2],
      *output[O_MAX][2];
  } upkeep;
  struct {
    struct sprite
      *disorder,
      *size[NUM_TILES_DIGITS],
      *size_tens[NUM_TILES_DIGITS],		/* first unused */
      *tile_foodnum[NUM_TILES_DIGITS],
      *tile_shieldnum[NUM_TILES_DIGITS],
      *tile_tradenum[NUM_TILES_DIGITS];
    struct city_sprite
      *tile,
      *wall,
      *occupied;
    struct sprite_vector worked_tile_overlay;
    struct sprite_vector unworked_tile_overlay;
  } city;
  struct citybar_sprites citybar;
  struct {
    struct sprite
      *turns[NUM_TILES_DIGITS],
      *turns_tens[NUM_TILES_DIGITS];
  } path;
  struct {
    struct sprite *attention;
  } user;
  struct {
    struct sprite
      *farmland[MAX_INDEX_CARDINAL],
      *irrigation[MAX_INDEX_CARDINAL],
      *pollution,
      *village,
      *fallout,
      *fog,
      **fullfog,
      *spec_river[MAX_INDEX_CARDINAL],
      *darkness[MAX_INDEX_CARDINAL],         /* first unused */
      *river_outlet[4];		/* indexed by enum direction4 */
  } tx;				/* terrain extra */
  struct {
    struct sprite
      *background,
      *middleground,
      *foreground,
      *activity;
  } bases[BASE_LAST];
  struct {
    struct sprite
      *main[EDGE_COUNT],
      *city[EDGE_COUNT],
      *worked[EDGE_COUNT],
      *unavailable,
      *selected[EDGE_COUNT],
      *coastline[EDGE_COUNT],
      *borders[EDGE_COUNT][2],
      *player_borders[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS][EDGE_COUNT][2];
  } grid;
  struct {
    struct sprite *player[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS];
    struct sprite *background; /* Generic background */
  } backgrounds;
  struct {
    struct sprite_vector overlays;
    struct sprite *background; /* Generic background color */
    struct sprite *player[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS];
  } colors;

  struct drawing_data *drawing[MAX_NUM_ITEMS];
}
/* Darkness style.  Don't reorder this enum since tilesets depend on it. */
enum darkness_style;

struct specfile {
  struct sprite *big_sprite;
  char *file_name;
}sprite *sprite;
};
ruct tileset {
  char name[512];
  int priority;

  bool is_isometric;
  int hex_width, hex_height;

  int normal_tile_width, normal_tile_height;
  int full_tile_width, full_tile_height;
  int small_sprite_width, small_sprite_height;

  char *main_intro_filename;
  char *minimap_intro_filename;

  int city_names_font_size, city_productions_font_size;

  int roadstyle;
  enum fog_style fogstyle;
  enum darkness_style darkness_style;

  int unit_flag_offset_x, unit_flag_offset_y;
  int city_flag_offset_x, city_flag_offset_y;
  int unit_offset_x, unit_offset_y;

  int citybar_offset_y;

#define NUM_CORNER_DIRS 4
#define TILES_PER_CORNER 4
  int num_valid_tileset_dirs, num_cardinal_tileset_dirs;
  int num_index_valid, num_index_cardinal;
  enum direction8 valid_tileset_dirs[8], cardinal_tileset_dirs[8];

  struct tileset_layer {
    char **match_types;
    int match_count;
  } layers[MAX_NUM_LAYERS];

  struct specfile_list *specfiles;
  struct small_sprite_list *small_sprites;

  /*
   * This hash table maps tilespec tags to struct small_sprites.
   */
  struct hash_table *sprite_hash;

  /* This hash table maps terrain graphic strings to drawing data. */
  struct hash_table *tile_hash;

  struct named_sprites sprites;

  struct color_system *color_system;
  
  int num_prefered_themes;
  char** prefered_themes;
};

struct tileset *tileset;

int focus_unit_state = 0;Hash callback for freeing key*****/
static void sprite_hash_free_key(void *key)
{
  free(key)name of the given tilesetconst char *tileset_get_name(const struct tileset *t)
{
  return t->nameconst struct tileset *t)
{
  return t->is_isometricconst struct tileset *t)
{
  return t->hexhex_height of the current tileset.  For iso-const struct tileset *t)
{
  return t->hex_height  This means it's the width of the bounding box
  of the basic map tile.

  For best results:
    - The value should be even (or a multiple of 4 in iso-view).
    - In iso-view, the width should be twice the height (to give a
      perspective of 30 degrees above the horizon).
    - In non-iso-view, width and height should be equal (overhead
      perspective).
    - In hex or iso-hex view, remember this is the tesselation vector.
      hex_width and hex_height then give the size of the side of the
      hexagon.  Calculating the dimensions of a "regular" hexagon or
      iso-hexagon may be tricky.
  However these requirements are not absolute and callers should not
  depend on them (although some do)int tileset_tile_width(const struct tileset *t)
{
  return t->normal_til  This means it's the height of the bounding box
  of the basic map tile.

  See also tileset_tile_widthint tileset_tile_height(const struct tileset *t)
{
  return t->normal_tile_heightconst struct tileset *t)
{
  return t->full_til
  Some callers assume the full height is 50% larger than the height in
  iso-view, and equal in non-iso viewint tileset_full_tile_height(const struct tileset *t)
{
  return t->full_tile_heightwidthwidth(const struct tileset *t)
{
  return t->offset from the origin of the city tile at which to place the
  citybar textint tileset_citybar_offset_y(const struct tileset *t)
{
  return t->citybar_offset_yconst struct tileset *t)
{
  return t->small_sprite_heightconst struct tileset *t)
{
  return t->mainconst struct tileset *t)
{
  return t->**
  Return the number of possible colors for city overlaysint tileset_num_city_colors(const struct tileset *t)
{
  return t->sprites.city.worked_tile_overlay.size
  Initialize/
static struct tileset *tileset_new(void)
{
  struct tileset *t = fc_calloc(1, sizeof(*t));

  t->specfiles = specfile_list_new();
  t->small_sprites = small_sprite_list_new();
  return tconst struct tileset *t,
				 enum direction8 dir)
{
  if (t->t->const struct tileset *t,
				    enum direction8 dir)
{
  if (t->hex_width > 0 || t->hex_height > 0) {
    return is_valid_tileset_dir(t, s = NULL;

  if (!tilesets) {
    /* Note: this means you must restart the client after installing a new
       tileset. */
    char **list = datafilelist(TILESPEC_SUFFIX);
    int i, count = 0;

    for (i = 0; list[i]; i++) {
      struct tileset *t = tileset_read_toplevel(list[i], FALSE);

      if (t) {
 	tilesets = fc_realloc(tilesets, (count + 1) * sizeof(*tilesets));
 	tilesets[count] = list[i];
 	count++;
 	tileset_free(t);
      } else {
	free(list[i]);
      }
    }
    free(list);

    tilesets = fc_realloc(tilesets, (count + 1) * sizeof(*tilesets));
    tilesets[count] = NULL;
  }

  return tilesetsif (tileset_name) {
    char fname[strlen(tileset_name) + strlen(TILESPEC_SUFFIX) + 1], *dname;

    my_snprintf(fname, sizeof(fname),
		"%s%s", tileset_name, TILESPEC_SUFFIX);

    dname = datafilename(fname);

    if (dname) {
      return mystrdup(dname);
    }
  }
,
                                        bool verbose)
{
  int log_level = verbose ? LOG_ERROR : LOG_DEBUG;
log_level, "\"%s\": %s file appears incompatible:",
	    filename, which);
    freelog(log_level, "  datafile options: %s", file_capstr);
    freelog(log_level, "  supported options: %s", us_capstr);
    return FALSE;
  }
  if (!has_capabilities(file_capstr, us_capstr)) {
    freelog(log_level, "\"%s\": %s file requires option(s)"
			 " that client doesn't support:",
	    filename, which);
    freelog(log_level, "  datafile options: %s", file_capstr);
    freelog(log_level, "  supported options: %s"et_free_toplevel(struct tileset *t)
{
  int i, j;

  if (t->main_intro_filename) {
    free(t->main_intro_filename);
    t->main_intro_filename = NULL;
  }
  if (t->minimap_intro_filename) {
    free(t->minimap_intro_filename);
    t->minimap_intro_filename = NULL;
  }
  
  if (t->prefered_themes) {
    for (i = 0; i < t->num_prefered_themes; i++) {
      free(t->prefered_themes[i]);
    }
    free(t->prefered_themes);
    t->prefered_themes = NULL;
  }
  t->num_prefered_themes = 0;

  if (t->tile_hash) {
    while (hash_num_entries(t->tile_hash) > 0) {
      struct drawing_data *draw
         = (void *)hash_value_by_number(t->tile_hash, 0);

      hash_delete_entry(t->tile_hash, draw->name);
      free(draw->name);
      if (draw->mine_tag) {
	free(draw->mine_tag);
      }
      for (i = 0; i < 4; i++) {
	if (draw->blend[i]) {
	  free_sprite(draw->blend[i]);
	}
      }
      for (i = 0; i < draw->num_layers; i++) {
	sprite_vector_free(&draw->layer[i].base);
      }
      free(draw);
    }
    hash_free(t->tile_hash);
    t->tile_hash = NULL; /* Helpful for sanity. */
  }

  for (i = 0; i < MAX_NUM_LAYERS; i++) {
    struct tileset_layer *tslp = &t->layers[i];

    if (tslp->match_types) {
      for (j = 0; j < tslp->match_count; j++) {
	free(tslp->match_types[j]);
      }
      free(tslp->match_types);
      tslp->match_types = NULL;
    }
  }

  if (t->color_system) {
    color_system_free(t->color_system);
    t->color_system****
  Clean up/
void tileset_free(struct tileset *t)
{
  tileset_free_tiles(t);
  tileset_free_toplevel(t);
  specfile_list_free(t->specfiles);
  small_sprite_list_free(t->small_sprites);
  free(t)
  Read a new tilespec in when first starting the game.

  Call this function with the (guessed) name of the tileset, when
  starting the client/
void tilespec_try_read(const char *tileset_name, bool verbose)
{
  if (!(tileset = tileset_read_toplevel(tileset_name, verbose))) {
    char **list = datafilelist(TILESPEC_SUFFIX);
    int i;

    for (i = 0; list[i]; i++) {
      struct tileset *t = tileset_read_toplevel(list[i], FALSE);

      if (t) {
	if (!tileset || t->priority > tileset->priority) {
	  tileset = t;
	} else {
	  tileset_free(t);
	}
      }
      free(list[i]);
    }
    free(list);

    if (!tileset) {
      freelog(LOG_FATAL, _("No usable default tileset found, aborting!"));
      exit(EXIT_FAILURE);
    }

    freelog(LOG_VERBOSE, "Trying \"%s\" tileset.", tileset->name);
  }
  sz_strlcpy(default_tileset_name, tileset_get_name(tileset))new_tileset_name)
{
  int id;
  struct tile *center_tile;
  enum client_states state = client_state();
  const char *name = new_tileset_name ? new_tileset_name : tileset->name;
  char tileset_name[strlen(name) + 1], old_name[strlen(tileset->name) + 1];

  /* Make local copies since these values may be freed down below */
  sz_strlcpy(tileset_name, name);
  sz_strlcpy(old_name, tileset->name);

  freelog(LOG_NORMAL, _("Loading tileset \"%s\".")et_free_tiles(tileset);
  tileset_free_toplevel(tileset(tileset = tileset_read_toplevel(tileset_name, FALSE))) {
    if (!(tileset = tileset_read_toplevel(old_name, FALSE))) {
      die("Failed to re-read the currently loaded tileset.");
    }
  }
  sz_strlcpy(default_tileset_name, tileset->name);
  tileset_load_tiles(tileset);
  tileset_use_prefered_theme(tileset_S_RUNNINGterrain_type_iterate(pterrain) {
    tileset_setup_tile_type(tileset, pterrain);
  } terrain_type_iterate_end;
  resource_type_iterate(presource) {
    tileset_setup_resource(tileset, presource);
  } resource_type_iterate_end;
  unit_type_iterate(punittype) {
    tileset_setup_unit_type(tileset, punittype);
  } unit_type_iterate_end;
  government_iterate(gov) {
    tileset_setup_government(tileset, gov);
  } government_iterate_end;
  base_type_iterate(pbase) {
    tileset_setup_base(tileset, pbase);
  } base_type_iterate_end;
  nations_iterate(pnation) {
    tileset_setup_nation_flag(tileset, pnation);
  } nations_iterate_end;
  improvement_iterate(pimprove) {
    tileset_setup_impr_type(tileset, pimprove);
  } improvement_iterate_end;
  advance_iterate(A_FIRST, padvance) {
    tileset_setup_tech_type(tileset, padvance);
  } advance_iterate_end;
  specialist_type_iterate(sp) {
    tileset_setup_specialist_type(tileset, sp);
  } specialist_type_iterate_end;

  for (id = 0; id < game.control.styles_count; id++) {
    tileset_setup_city_tiles(tileset, id);
  }

  /* Step 4:  Draw.
   *
   * Do any necessary redraws.
   */nvss\"%s\".ERROR, "Could not load gfx file \"%s\""Could not open \"%s\".", TRUE"Could not load gfx file for the spec file \"%s\"."tileset *t, struct specfile *sf,
			 "Could not open \"%s\".", TRUE secfile_lookup_int_default(file, 0, "%s.pixel_border",
					      gridnames[i]);t->t->sprite_hash, mystrdup(tags[k]), ss)) {
	    freelog(LOG_ERROR, "warning: already have a sprite for \"%s\".	  (void) hash_replace(t->t->t->sprite_hash, mystrdup(tags[k]), ss)) {
	  freelog(LOG_ERROR, "warning: already have a sprite for \"%s\".t->"Couldn't find a supported gfx file extension for \"%s\"."Determine the sprite_type string/
static int check_sprite_type(const char *sprite_type, const char *tile_section)
{
  if (mystrcasecmp(sprite_type, "corner") == 0) {
    return CELL_CORNER;
  }
  if (mystrcasecmp(sprite_type, "single") == 0) {
    return CELL_WHOLE;
  }
  if (mystrcasecmp(sprite_type, "whole") == 0) {
    return CELL_WHOLE;
  }
  freelog(LOG_ERROR, "[%s] unknown sprite_type \"%s\".",
	  tile_section,
	  sprite_type);
  return CELL_WHOLEstruct tileset *tileset_read_toplevel(const char *tileset_name, bool verbossections;
  char **spec_filenames, **sections;
  char *file_capstr;
  bool duplicates_ok, is_hex;
  enum direction8 dir;
  const int spl = strlen(TILE_SECTION_PREFIX);
  struct tileset *t = tileset_new();

  fname = tilespec_fullname(tileset_name);
  if (!fname) {
    if (verbose) {
      freelog(LOG_ERROR, "Can't find tileset \"%s\".", tileset_name); 
    }
    tileset_free(t);
    return NULL;
  }
  freelog(LOG_VERBOSE, "tilespec file is \"%s\".", fname);

  if (!section_file_load(file, fname)) {
    freelog(LOG_ERROR, "Could not open \"%s\".", fname);
    section_file_free(file);
    free(fname);
    tileset_free(t);
    return NULL, verbose)) {
    section_file_free(file);
    free(fname);
    tileset_free(t);
    return NULLsz_strlcpy(t->name, tileset_name);
  t->priority = secfile_lookup_int(file, "tilespec.priority");

  t->is_isometric = secfile_lookup_bool(file(file, "tilespec.is_hex");
  t->hex_width = t->hex_height = 0;
  if (is_hex) {
    int hex_side = secfile_lookup_int(file, "tilespec.hex_side");

    if (t->is_isometric) {
      t->hex_height = hex_side;
    } else {
      t->hex_width = hex_side;
    }
    /* Hex tilesets are drawn the same as isometric. */
    t->is_isometric = TRUE;
  }

  if (t->is_isometric && !isometric_view_supported()) {
    freelog(LOG_NORMAL, _("Client does not support isometric tilesets."));
    freelog(LOG_NORMAL, _("tileset_free(t);
    return NULL;
  }
  if (!t->is_isometric && !overhead_view_supported()) {
    freelog(LOG_NORMAL, _("Client does not support overhead view tilesets."));
    freelog(LOG_NORMAL, _("tileset_free(t);
    return NULLt->num_valid_tileset_dirs = t->t, dir)) {
      t->valid_tileset_dirs[t->num_valid_tileset_dirs] = dir;
      t->num_valid_tileset_dirs++;
    }
    if (is_cardinal_tileset_dir(t, dir)) {
      t->cardinal_tileset_dirs[t->num_cardinal_tileset_dirs] = dir;
      t->t->num_valid_tileset_dirs % 2 == 0); /* Assumed elsewhere. */
  t->num_index_valid = 1 << t->num_valid_tileset_dirs;
  t->num_index_cardinal = 1 << t->num_cardinal_tileset_dirs;

  t->normal_tile_width
    = secfile_lookup_int(file, "tilespec.normal_tile_width");
  t->normal_tile_height
    = secfile_lookup_int(file, "tilespec.normal_tile_height");
  if (t->is_isometric) {
    t->full_tile_width = t->normal_tile_width;
    t->full_tile_height = 3 * t->normal_tile_height / 2;
  } else {
    t->full_tile_width = t->normal_tile_width;
    t->full_tile_height = t->normal_tile_height;
  }
  t->small_sprite_width
    = secfile_lookup_int(file, "tilespec.small_tile_width");
  t->t->normal_tile_width, t->normal_tile_height,
	  t->full_tile_width, t->full_tile_height,
	  t->small_sprite_width, t->small_sprite_height);

  t->roadstyle = secfile_lookup_int(file, "tilespec.roadstyle");
  t->fogstyle = secfile_lookup_int(file, "tilespec.fogstyle");
  t->darkness_style = secfile_lookup_int(file, "tilespec.darkness_style");
  if (t->darkness_style < DARKNESS_NONE
      || t->darkness_style > DARKNESS_CORNER
      || (t->darkness_style == DARKNESS_ISORECT
	  && (!t->is_isometric || t->hex_width > 0 || t->hex_height > 0))) {
    freelog(LOG_FATAL, "Invalid darkness style set in tileset.");
    exit(EXIT_FAILURE);
  }
  t->unit_flag_offset_x
    = secfile_lookup_int(file, "tilespec.unit_flag_offset_x");
  t->unit_flag_offset_y
    = secfile_lookup_int(file, "tilespec.unit_flag_offset_y");
  t->city_flag_offset_x
    = secfile_lookup_int(file, "tilespec.city_flag_offset_x");
  t->city_flag_offset_y
    = secfile_lookup_int(file, "tilespec.city_flag_offset_y");
  t->unit_offset_x = secfile_lookup_int(file, "tilespec.unit_offset_x");
  t->unit_offset_y = secfile_lookup_int(file, "tilespec.unit_offset_y");

  t->citybar_offset_y
    = secfile_lookup_int(file, "tilespec.citybar_offset_y");

  t->city_names_font_size
    = secfile_lookup_int(file, "tilespec.city_names_font_size");

  t->city_productions_font_size
    = secfile_lookup_int(file, "tilespec.city_productions_font_size");
  set_city_names_font_sizes(t->city_names_font_size,
			    t->t->main_intro_filename = tilespec_gfx_filename(c);
  freelog(LOG_DEBUG, "intro file %s", t->t->minimap_intro_filename = tilespec_gfx_filename(c);
  freelog(LOG_DEBUG, "radar file %s", t->minimap_intro_filename);

  /* Terrain layer info. */
  for (i = 0; i < MAX_NUM_LAYERS; i++) {
    struct tileset_layer *tslp = &t->layers[i];
    int j, k;

    tslp->match_types
      = secfile_lookup_str_vec(file, &tslp->match_count,
			       "layer%d.match_types", i);
    for (j = 0; j < tslp->match_count; j++) {
      tslp->match_types[j] = mystrdup(tslp->match_types[j]);

      for (k = 0; k < j; k++) {
        if (tslp->match_types[k][0] == tslp->match_types[j][0]) {
          freelog(LOG_FATAL, "[layer%d] match_types: \"%s\" initial"
                             " ('%c') is not unique.",
                             i,
                             tslp->match_types[j],
                             tslp->match_types[j][0]);
          exit(EXIT_FAILURE);
        }
      }
    }
  }

  /* Tile drawing info. */
  sections = secfile_get_secnames_prefix(file, TILE_SECTION_PREFIX, &num_sections);
  if (num_sections == 0) {
    freelog(LOG_ERROR, "No [%s] sections supported by tileset \"%s\".",
				TILE_SECTION_PREFIX, fname);
    section_file_free(file);
    free(fname);
    tileset_free(t);
    return NULL;
  }

  assert(t->tile_hash == NULL);
  t->tile_hash = hash_new(hash_fval_string, hash_fcmp_string);

  for (i = 0; i < num_sections; i++) {
    struct drawing_data *draw = fc_calloc(1, sizeof(*draw));
    char *sprite_type;
    int l;

    draw->name = mystrdup(sections[i] + spl);
    draw->blending = secfile_lookup_int_default(file, 0,
						"%s.is_blended",
						sections[i]);
    draw->blending = CLIP(0, draw->blending, MAX_NUM_LAYERS);

    draw->is_reversed = secfile_lookup_bool_default(file, FALSE,
						    "%s.is_reversed",
						    sections[i]);
    draw->num_layers = secfile_lookup_int(file, "%s.num_layers",
					  sections[i]);
    draw->num_layers = CLIP(1, draw->num_layers, MAX_NUM_LAYERS);

    for (l = 0; l < draw->num_layers; l++) {
      struct drawing_layer *dlp = &draw->layer[l];
      struct tileset_layer *tslp = &t->layers[l];
      char *match_type;
      char **match_with;
      int count;

      dlp->is_tall
	= secfile_lookup_bool_default(file, FALSE, "%s.layer%d_is_tall",
				      sections[i], l);
      dlp->offset_x
	= secfile_lookup_int_default(file, 0, "%s.layer%d_offset_x",
				     sections[i], l);
      dlp->sections[i], l);sections[i], l);
      if (match_type) {
        int j;

	/* Determine our match_type. */
	for (j = 0; j < tslp->match_count; j++) {
	  if (mystrcasecmp(tslp->match_types[j], match_type) == 0) {
	    break;
	  }
	}
	if (j >= tslp->match_count) {
	  freelog(LOG_ERROR, "[%s] invalid match_type \"%s\".",
	                     sections[i],
	                     match_type);
	} else {
	  dlp->match_index[dlp->match_indices++] = j;
	}
      }

      match_with = secfile_lookup_str_vec(file, &count,
					  "%s.layer%d_match_with",
					  sections[i], l);
      if (match_with) {
        int j, k;

        if (count > MATCH_FULL) {
          freelog(LOG_ERROR, "[%s] match_with has too many types (%d, max %d)",
                             sections[i],
                             count,
                             MATCH_FULL);
          count = MATCH_FULL;
        }

        if (1 < dlp->match_indices) {
          freelog(LOG_ERROR, "[%s] previous match_with ignored.",
                             sections[i]);
          dlp->match_indices = 1;
        } else if (1 > dlp->match_indices) {
          freelog(LOG_ERROR, "[%s] missing match_type, using \"%s\".",
                             sections[i],
                             tslp->match_types[0]);
          dlp->match_index[0] = 0;
          dlp->match_indices = 1;
        }

        for (k = 0; k < count; k++) {
          for (j = 0; j < tslp->match_count; j++) {
            if (mystrcasecmp(tslp->match_types[j], match_with[k]) == 0) {
              break;
            }
          }
          if (j >= tslp->match_count) {
            freelog(LOG_ERROR, "[%s] layer%d_match_with: invalid  \"%s\".",
                               sections[i],
                               l,
                               match_with[k]);
          } else if (1 < count) {
            int m;

            for (m = 0; m < dlp->match_indices; m++) {
              if (dlp->match_index[m] == j) {
                freelog(LOG_ERROR, "[%s] layer%d_match_with: duplicate \"%s\".",
                                   sections[i],
                                   l,
                                   match_with[k]);
                break;
              }
            }
            if (m >= dlp->match_indices) {
              dlp->match_index[dlp->match_indices++] = j;
            }
          } else {
            dlp->match_index[dlp->match_indices++] = j;
          }
        }
        free(match_with);
        match_with = NULL;
      }

      /* Check match_indices */
      switch (dlp->match_indices) {
      case 0:
      case 1:
        dlp->match_style = MATCH_NONE;
        break;
      case 2:
        if (dlp->match_index[0] == dlp->match_index[1] ) {
          dlp->match_style = MATCH_SAME;
        } else {
          dlp->match_style = MATCH_PAIR;
        }
        break;
      default:
        dlp->match_style = MATCH_FULL;
        break;
      };

      sprite_type
	= secfile_lookup_str_default(file, "whole", "%s.layer%d_sprite_type",
				     sections[i], l);
      dlp->sprite_type = check_sprite_type(sprite_type, sections[i]);

      switch (dlp->sprite_type) {
      case CELL_WHOLE:
	/* OK, no problem */
	break;
      case CELL_CORNER:
	if (dlp->is_tall
	    || dlp->offset_x > 0
	    || dlp->offset_y > 0) {
	  freelog(LOG_ERROR,
		  "[%s] layer %d: you cannot have tall terrain or\n"
		  "a sprite offset with a cell-based drawing method.",
		  sections[i], l);
	  dlp->is_tall = FALSE;
	  dlp->offset_x = dlp->offset_y = 0;
	}
	break;
      };
    }

    draw->mine_tag = secfile_lookup_str_default(file, NULL, "%s.mine_sprite",
						sections[i]);
    if (draw->mine_tag) {
      draw->mine_tag = mystrdup(draw->mine_tag);
    }

    if (!hash_insert(t->tile_hash, draw->name, draw)) {
      freelog(LOG_NORMAL, "warning: duplicate tilespec entry [%s].",
	      sections[i]);
      section_file_free(file);
      free(fname);
      tileset_free(t);
      return NULL;
    }
  }
  free(sectiosection_file_free(file);
    free(fname);
    tileset_free(t);
    return NULL;
  }

  assert(t->sprite_hash == NULL);
  t->sprite_hash = hash_new_full(hash_fval_string, hash_fcmp_string,
                                 sprite_hash_free_key, NULL);
  for (i = 0; i < num_spec_files; i++) {
    struct specfile *sf = fc_malloc(sizeof(*sf));
    char *dnamedname = datafilename(spec_filenames[i]);
    if (!dname) {
      if (verbose) {
        freelog(LOG_ERROR, "Can't find spec file \"%s\".", spec_filenames[i]);
      }
      section_file_free(file);
      free(fname);
      tileset_free(t);
      return NULL;
    }
    sf->file_name = mystrdup(dname);
    scan_specfile(t, sf, duplicates_ok);

    specfile_list_prepend(t->specfiles, sf);
  }
  free(spec_filenames);

  t->color_system = color_system_read(file);

  section_file_check_unused(file, fname);
  
  t->prefered_themes = secfile_lookup_str_vec(file, &(t->num_prefered_themes),
                                              "tilespec.prefered_themes");
  for (i = 0; i < t->num_prefered_themes; i++) {
    t->prefered_themes[i] = mystrdup(t->prefered_themes[i]);
  }
  
  section_file_free(file);
  freelog(LOG_VERBOSE, "finished reading \"%s\".", fname);
  free(fname);

  return tcitizen_rule_name(enum citizen_category citizen)
{
  /* These strings are used in reading the tileset.  Do not
   * translate. */
  switch (citizen) {default:
    break;
  }
  die("unknown citizen type %d", (int) citizenconst struct tileset *t, int idx)
{
  static char c[64];
  int i;

  c[0] = '\0';
  for (i = 0; i < t->num_cardinal_tileset_dirs; i++) {
    int value = (idx >> i) & 1;

    cat_snprintf(c, sizeof(c), "%s%d",
		 dir_get_tileset_name(t->const struct tileset *t, int index)
{
  static char c[64];
  int i;

  c[0] = '\0';
  for (i = 0; i < t->cat_snprintf(c, sizeof(c), "%s%d",
		 dir_get_tileset_name(t->valid_tileset_dirs[i]), value);
  }

  return c
  Loads the sprite. If the sprite is already loaded a reference
  counter is increased. Can return NULL if the sprite couldn't be
  loaded/
static struct sprite *load_sprite(struct tileset *t, const char *tag_name)
{
  /* Lookup information about where the sprite is found. */
  struct small_sprite *ss = hash_lookup_data(t->sprite_hash, tag_name);

  freelog(LOG_DEBUG, "load_sprite(tag='%s')", tag_name);
  if (!ss) {
    return NULL;
  }

  assert(ss->ref_count >= 0);

  if (!ss->sprite) {
    /* If the sprite hasn't been loaded already, then load it. */
    assert(ss->ref_count == 0);
    if (ss->file) {
      ss->sprite = load_gfx_file(ss->file);
      if (!ss->sprite) {
	freelog(LOG_FATAL, "Couldn't load gfx file \"%s\" for sprite '%s'.",
		ss->file, tag_name);
	exit(EXIT_FAILURE);
      }
    } else {
      int sf_w, sf_h;

      ensure_big_sprite(ss->sf);
      get_sprite_dimensions(ss->sf->big_sprite, &sf_w, &sf_h);
      if (ss->x < 0 || ss->x + ss->width > sf_w
	  || ss->y < 0 || ss->y + ss->height > sf_h) {
	freelog(LOG_ERROR,
		"Sprite '%s' in file \"%s\" isn't within the image!",
		tag_name, ss->sf->file_name);
	return NULL;
      }
      ss->sprite =
	crop_sprite(ss->sf->big_sprite, ss->x, ss->y, ss->width, ss->height,
		    NULL, -1, -1);
    }
  }

  /* Track the reference count so we know when to free the sprite. */
  ss->ref_count++;

  return ss->sprite
  Unloads the sprite. Decrease the reference counter. If the last
  reference is removed the sprite is freed/
static void unload_sprite(struct tileset *t, const char *tag_name)
{
  struct small_sprite *ss = hash_lookup_data(t->sprite_hash, tag_name);

  assert(ss);
  assert(ss->ref_count >= 1);
  assert(ss->sprite);

  ss->ref_count--;

  if (ss->ref_count == 0) {
    /* Nobody's using the sprite anymore, so we should free it.  We know
     * where to find it if we need it again. */
    freelog(LOG_DEBUG, "freeing sprite '%s'.", tag_name);
    free_sprite(ss->sprite);
    ss->******
  Insert a generated sprite into the existing sprite hash with a given
  name.

  This means the sprite can now be accessed via the tag, and will be
  automatically freed along with the tileset.  In other words, you should
  only do this with sprites you've just allocated, and only on tags that
  are unused!*****/
static void insert_sprite(struct tileset *t, const char *tag_name,
			  struct sprite *sprite)
{
  struct small_sprite *ss = fc_calloc(sizeof(*ss), 1);

  assert(load_sprite(t, tag_name) == 0);
  ss->ref_count = 1;
  ss->sprite = sprite;
  small_sprite_list_prepend(t->small_sprites, ss);
  if (!hash_insert(t->sprite_hash, mystrdup(tag_name), ss)) {
    freelog(LOG_ERROR, "warning: already have a sprite for '%s'.", tag_name)
  Return TRUE iff the specified sprite exists in the tileset (whether
  or not it is currently loaded)/
static bool sprite_exists(const struct tileset *t, const char *tag_name)
{
  /* Lookup information about where the sprite is found. */
  struct small_sprite *ss = hash_lookup_data(t->sprite_hash, tag_name);

  return (ss != NULL);
}

/* Not very safe, but convenient: */
#define SET_SPRITE(field, tag)					  \
  do {								  \
    t->sprites.field = load_sprite(t, tag);			  \
    if (!t->sprites.field) {					  \
      die("Sprite tag '%s' missing.", tag);			  \
    }								  \
					    \
  do {									    \
    t->sprites.field = load_sprite(t, tag);				    \
    if (!t->sprites.field) {						    \
      t->sprites.field = load_sprite(t, alt);				    \
    }									    \
    if (!t->sprites.field) {						    \
      die("Sprite tag '%s' and alternate '%s' are both missing.", tag, alt);    \
    }									    \
  } while(FALSE)

/* Sets sprites.field to tag, or NULL if not available */
#define SET_SPRITE_OPT(field, tag) \
  t->sprites.field = load_sprite(t, tag)

#define SET_SPRITE_ALT_OPT(field, tag, alt)				    \
  do {									    \
    t->sprites.field = lookup_sprite_tag_alt(t, tag, alt, FALSE,	    \
					     "sprite", #field);		    \
  } while (FALSE)et_setup_specialist_type(struct tileset *t, Specialist_type_id id)
{
  /* Load the specialist sprite graphics. */
  char buffer[512];
  int j;
  const char *name = specialist_rule_name(specialist_by_number(id));

  for (j = 0; j < MAX_NUM_CITIZEN_SPRITES; j++) {
    my_snprintf(buffer, sizeof(buffer), "specialist.%s_%d", name, j);
    t->sprites.specialist[id].sprite[j] = load_sprite(t, buffer);
    if (!t->sprites.specialist[id].sprite[j]) {
      break;
    }
  }
  t->sprites.specialist[id].count = j;
  if (j == 0) {
    freelog(LOG_FATAL, "No graphics for specialist \"%s\".", et_setup_citizen_types(struct tileset *t)
{
  int i, j;
  char buffer[512];

  /* Load the citizen sprite graphics, no specialist. */
  for (i = 0; i < CITIZEN_LAST; i++) {
    const char *name = citizen_rule_name(i);

    for (j = 0; j < MAX_NUM_CITIZEN_SPRITESt->sprites.citizen[i].sprite[j] = load_sprite(t, buffer);
      if (!t->sprites.citizen[i].sprite[j]) {
	break;
      }
    }
    t->sprites.citizen[i].count = j;
    if (j == 0) {
      freelog(LOG_FATAL, "No graphics for citizen \"%s\"."******
  Return the sprite in the city_sprite listing that corresponds to this
  city - based on city style and size.

  See also load_city_sprite, free_city_**/
static struct sprite *get_city_sprite(const struct city_sprite *city_sprite,
				      const struct city *pcity)
{
  /* get style and match the best tile based on city size */
  int style = style_of_city(pcity);
  int num_thresholds;
  int t;

  assert(style < city_sprite->num_styles);

  num_thresholds = city_sprite->styles[style].num_thresholds;

  if (num_thresholds == 0) {
    return NULL;
  }

  /* We find the sprite with the largest threshold value that's no bigger
   * than this city size. */
  for (t = 0; t < num_thresholds; t++) {
    if (pcity->size < city_sprite->styles[style].thresholds[t].city_size) {
      break;
    }
  }

  return city_sprite->styles[style].thresholds[MAX(t - 1, 0)].spriteAllocates and loads a new city sprite from the given sprite tags.

  tag may be NULL.

  See also get_city_sprite, free_city_**/
static struct city_sprite *load_city_sprite(struct tileset *t,
					    const char *tag)
{
  struct city_sprite *city_sprite = fc_malloc(sizeof(*city_sprite));
  int style, size;
  char buffer[128];

  /* Store number of styles we have allocated memory for.
   * game.control.styles_count might change if client disconnects from
   * server and connects new one. */
  city_sprite->num_styles = game.control.styles_count;
  city_sprite->styles = fc_malloc(city_sprite->num_styles
				  * sizeof(*city_sprite->styles));

  for (style = 0; style < city_sprite->num_styles; style++) {
    int thresholds = 0;
    struct sprite *sprite;
    char *graphic = city_styles[style].graphic;

    city_sprite->styles[style].thresholds = NULL;
    for (size = 0; size < MAX_CITY_SIZE; size++) {
      my_snprintf(buffer, sizeof(buffer), "%s_%s_%d",
		  graphic, tag, size);
      if ((sprite = load_sprite(t, buffer))) {
	thresholds++;
	city_sprite->styles[style].thresholds
	  = fc_realloc(city_sprite->styles[style].thresholds,
		       thresholds
		       * sizeof(*city_sprite->styles[style].thresholds));
	city_sprite->styles[style].thresholds[thresholds - 1].city_size = size;
	city_sprite->styles[style].thresholds[thresholds - 1].sprite = sprite;
      } else if (size == 0) {
	if (graphic == city_styles[style].graphic) {
	  /* Try again with graphic_alt. */
	  size--;
	  graphic = city_styles[style].graphic_alt;
	} else {
	  /* Don't load any others if the 0 element isn't there. */
	  break;
	}
      }
    }
    city_sprite->styles[style].num_thresholds = thresholds;
  }

  return city_spriteFrees a city sprite.

  See also get_city_sprite, load_city_**/
static void free_city_sprite(struct city_sprite *city_sprite)
{
  int style;

  if (!city_sprite) {
    return;
  }
  for (style = 0; style < city_sprite->num_styles; style++) {
    if (city_sprite->styles[style].thresholds) {
      free(city_sprite->styles[style].thresholds);
    }
  }
  free(city_sprite->styles);
  free(city_sprite)et_lookup_sprite_tags(struct tileset *t)
{
  char buffer[512], buffer2[512];
  const char dir_char[] = "nsew";
  const int W = t->normal_tile_width, H = t->normal_tile_height;
  int i, j, f;
  
  assert(t-> (j = 0; j < INDICATOR_COUNT; j++) {
    const char *names[] = {"science_bulb", "warming_sun", "cooling_flake"};

    for (i = 0; i < NUM_TILES_PROGRESS; i++) {
      my_snprintf(buffer, sizeof(buffer), "s.%s_%d", names[j], i);
      SET_SPRITE(indicator[j][i], buffer);
    }
  }

  SET_SPRITE(arrow[ARROW_RIGHT], "s.right_arrow");
  SET_SPRITE(arrow[ARROW_PLUS], "s.plus");
  SET_SPRITE(arrow[ARROW_MINUS], "s.minus");
  if (t->et_setup_citizen_types(t);

  for (i = 0; i < SPACESHIP_COUNT; i++) {
    const char *names[SPACESHIP_COUNT]
      = {"solar_panels", "life_support", "habitation",
	 "structural", "fuel", "propulsion"};

    my_snprintf(buffer, sizeof(buffer), "spaceship.%s", names[i]);
    SET_SPRITE(spaceship[i], buffer);
  }

  for (i = 0; i < CURSOR_LAST; i++) {
    for (f = 0; f < NUM_CURSOR_FRAMES; f++) {
      const char *names[CURSOR_LAST] =
               {"goto", "patrol", "paradrop", "nuke", "select", 
		"invalid", "attack", "edit_paint", "edit_add", "wait"};
      struct small_sprite *ss;

      assert(ARRAY_SIZE(names) == CURSOR_LAST);
      my_snprintf(buffer, sizeof(buffer), "cursor.%s%d", names[i], f);
      SET_SPRITE(cursor[i].frame[f], buffer);
      ss = hash_lookup_data(t->sprite_hash, buffer);
      t->sprites.cursor[i].hot_x = ss->hot_x;
      t->sprites.cursor[i].hot_y = ss->hot_y;
    }
  }

  for (i = 0; i < ICON_COUNT; i++) {
    const char *names[ICON_COUNT] = {"freeciv", "citydlg"};

    my_snprintf(buffer, sizeof(buffer), "icon.%s", names[i]);
    SET_SPRITE(icon[i], buffer);
  }

  /* Isolated road graphics are used by roadstyle 0 and 1*/
  if (t->roadstyle == 0 || t->t->t->num_valid_tileset_dirs; i++) {
      enum direction8 dir = t->t->roadstyle == 1) {
    int num_index = 1 << (t->t->num_valid_tileset_dirs / 2; j++) {
	int value = (i >> j) & 1;

	cat_snprintf(c, sizeof(c), "%s%d",
		     dir_get_tileset_name(t->valid_tileset_dirs[2 * j]),
		     value);
	cat_snprintf(d, sizeof(d), "%s%d",
		     dir_get_tileset_name(t->valid_tileset_dirs[2 * j + 1]),
		    t->num_index_valid; i++) {
      my_snprintf(buffer, sizeof(buffer), "r.road_%s", valid_index_str(t, t, t->roadstyle == 0 || t->roadstyle == 1) {
    for (i = 0; i < t->num_valid_tileset_dirs; i++) {
      enum direction8 dir = t->valid_tileset_dirs[i];

      if (!is_cardinal_tileset_dir(t, t->sprites.explode.unit);
  for (i = 0; ; i++) {
    struct st, t->for (i = 0; i < MAX_NUM_BATTLEGROUPS; i++) {
    my_snprintf(buffer, sizeof(buffer), "unit.battlegroup_%d", i);
    my_snprintf(buffer2, sizeof(buffer2), "city.size_%d", i + 1);
    assert(MAX_NUM_BATTLEGROUPS < NUM_TILES_DIGITS);
    SET_SPRITE_ALT(unit.battlegroup[i], buffer, buffer2);
  }t->sprites.unit.vet_lev[i] = load_sprite(t, buffer);
  }

  t->sprites.unit.select[0] = NULL;
  if (sprite_exists(t, bar.shields, "citybar.shields");
  SET_SPRITE(citybar.food, "citybar.food");
  SET_SPRITE(citybar.occupied, "citybar.occupied");
  SET_SPRITE(citybar.background, "citybar.background");
  sprite_vector_init(&t->sprites.citybar.occupancy);
  for (i = 0; ; i++) {
    struct sprite *sprite;

    my_snprintf(buffer, sizeof(buffer), "citybar.occupancy_%d", i);
    sprite = load_sprite(t, t->sprites.citybar.occupancy, &sprite);
  }
  if (t->sprites.citybar.occupancy.size < 2) {
    freelog(LOG_FATAL, "Missing necessary citybar.occupancy_N sprites.");
    exit(EXIT_FAILURE);t->sprites.upkeep.output[o][0] = load_sprite(t, buffer);
    my_snprintf(buffer, sizeof(buffer),
		"upkeep.%s2", get_output_identifier(o));
    t->sprites.upkeep.output[o][1] = load_sprite(t, SET_SPRITE(colors.background, "colors.background");
  sprite_vector_init(&t->sprites.colors.overlays);
  for (i = 0; ; i++) {
    struct sprite *sprite;

    my_snprintf(buffer, sizeof(buffer), "colors.overlay_%d", i);
    sprite = load_sprite(t, t->t->sprites.city.worked_tile_overlay,
			sprite_vector_size(&t->sprites.colors.overlays));
  sprite_vector_reserve(&t->sprites.city.unworked_tile_overlay,
			sprite_vector_size(&t->sprites.colors.overlays));
  for (i = 0; i < sprite_vector_size(&t->sprites.colors.overlays); i++) {
    struct sprite *color, *color_mask;
    struct sprite *worked, *unworked;

    color = *sprite_vector_get(&t->sprites.colors.overlays, i);
    color_mask = crop_sprite(color, 0, 0, W, H, t->t->sprites.mask.worked_tile, 0, 0);
    unworked = crop_sprite(color_mask, 0, 0, W, H,
			   t->sprites.mask.unworked_tile, 0, 0);
    free_sprite(color_mask);
    t->sprites.city.worked_tile_overlay.p[i] =  worked;
    t->sprites.city.unworked_tile_overlay.p[i] = unworked;
  }

  /* Chop up and build the background graphics. */
  t->sprites.backgrounds.background
    = crop_sprite(t->sprites.colors.background, 0, 0, W, H,
		  t->sprites.mask.tile, 0, 0);
  for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) {
    t->sprites.backgrounds.player[i]
      = crop_sprite(t->sprites.colors.player[i], 0, 0, W, H,
		    t->sprites.mask.tile, 0, 0)t->hex_width == 0) {
	continue;
      } else if (i == EDGE_LR && t->smy_snprintf(buffer, sizeof(buffer), "grid.borders.%c.%d",
		      name[i][j], p);
	  s = load_sprite(t, buffer);

	  if (!s) {
	    if (t->sprites.colors.player[p] && t->sprites.grid.borders[i][j]) {
	      s = crop_sprite(t->sprites.colors.player[p],
			      0, 0,
			      t->normal_tile_width, t->normal_tile_height,
			      t->sprites.grid.borders[i][j], 0, 0);
	      insert_sprite(t, buffer, s);
	    } else {
	      s = t->sprites.grid.borders[i][j];
	    }
	  }
	  t->sprites.grid.player_borders[p][i][j] = s;
	}
      }
    }
  }

  for (i = 0; i < t->river_%s",
		cardinal_index_str(t, t->t, t->farmland_%s",
		cardinal_index_str(t, i));
    SET_SPRITE_ALT(tx.farmland[i], buffer, "tx.farmland");
  }

  switch (t->sprite *darkness = load_sprite(t, "tx.darkness");
      const int W = t->normal_tile_width, H = t->normal_tile_heightt->	offsets[i][1], W / 2, H / 2,
						t->num_cardinal_tileset_dirs; i++) {
      enum direction8 dir = t->t->t, iORNER:
    t->sprites.tx.fullfog = fc_realloc(t->sprites.tx.fullfog,
				       81 * sizeof(*t->t->sprites.tx.fullfog[i] = load_sprite(t, buf);
    }
    break;
  };/* no other place to initialize these variables */
  sprite_vector_init(&t->sprites.nation_flag);
  sprite_vector_init(&t->sprites.nation_shield)
  Frees any internal buffers which are created by load_sprite. Should
  be called after the last (for a given period of time) load_sprite
  call.  This saves a fair amount of memory, but it will take extra time
  the next time we start loading sprites again/
static void finish_loading_sprites(struct tileset *t)
{
  specfile_list_iterate(t->specfiles, sf) {
    if (sf->big_sprite) {
      free_sprite(sf->big_sprite);
      sf->big_sprite = NULL;
    }
  } specfile_list_iterate_end;
}
et_load_tiles(struct tileset *t)
{
  tileset_lookup_sprite_tags(t);
  finish_loading_sprites(t)  FIXME: currently called with some parameters translated, not others!ruct sprite* lookup_sprite_tag_alt(struct tileset *t,
                                     const char *tag, const char *alt,
                                     bool required, const char *what,
                                     const char *name)
{
  struct sprite *sp;
  
  /* (should get sprite_hash before connection) */
  if (!t->sprite_hash) {
    die("attempt to lookup for %s \"%s\", tag);
  if (sp) return sp;

  sp = load_sprite(t, alt);
  if (sp) {
    freelog(LOG_VERBOSE,
	    "Using alternate graphic \"%s\" (instead of \"%s\") for %s \"%s\".",
	    alt, tag, what, name);
    return sp;
  }

  freelog(required ? LOG_FATAL : LOG_VERBOSE,
	  "Don't have graphics tags \"%s\" or \"%s\" for %s \"%s\"."et_setup_unit_type(struct tileset *t, struct unit_type *ut)
{
  t->sprites.unittype[utype_index(ut)]
    = lookup_sprite_tag_alt(t, ut->graphic_str, ut->graphic_alt,
			    TRUE, "unit_type", utype_rule_name(ut)et_setup_impr_type(struct tileset *t,
			     struct impr_type *pimprove)
{
  t->sprites.building[improvement_index(pimprove)]
    = lookup_sprite_tag_alt(t, pimprove->graphic_str,
			    pimprove->graphic_alt,
			    FALSE, "impr_type",
			    improvement_rule_name(pimprove)et_setup_tech_type(struct tileset *t,
			     struct advance *padvance)
{
  if (valid_advance(padvance)) {
    t->sprites.tech[advance_index(padvance)]
      = lookup_sprite_tag_alt(t, padvance->graphic_str,
			      padvance->graphic_alt,
			      FALSE, "technology",
			      advance_rule_name(padvance));

    /* should maybe do something if NULL, eg generic default? */
  } else {
    t->sprites.tech[advance_index(padvance)]******
  Set resourc*****/
void tileset_setup_resource(struct tileset *t,
			    const struct resource *presource)
{
  assert(presource);
  t->sprites.resource[resource_index(presource)]
    = lookup_sprite_tag_alt(t, presource->graphic_str,
			    presource->graphic_alt,
			    FALSE, "resource",
			    resource_rule_name(presource))Set bas*****/
void tileset_setup_base(struct tileset *t,
                        const struct base_type *pbase)
{
  char full_tag_name[MAX_LEN_NAME + strlen("_fg")];
  const int id = base_index(pbase);

  assert(id >= 0 && id < base_count());

  sz_strlcpy(full_tag_name, pbase->graphic_str);
  strcat(full_tag_name, "_bg");
  t->sprites.bases[id].background = load_sprite(t, full_tag_name);

  sz_strlcpy(full_tag_name, pbase->graphic_str);
  strcat(full_tag_name, "_mg");
  t->sprites.bases[id].middleground = load_sprite(t, full_tag_name);

  sz_strlcpy(full_tag_name, pbase->graphic_str);
  strcat(full_tag_name, "_fg");
  t->sprites.bases[id].foreground = load_sprite(t, full_tag_name);

  if (t->sprites.bases[id].background == NULL
      && t->sprites.bases[id].middleground == NULL
      && t->sprites.bases[id].foreground == NULL) {
    /* No primary graphics at all. Try alternative */
    freelog(LOG_VERBOSE,
	    "Using alternate graphic \"%s\" (instead of \"%s\") for base \"%s\".",
            pbase->graphic_alt,
            pbase->graphic_str,
            base_rule_name(pbase));

    sz_strlcpy(full_tag_name, pbase->graphic_alt);
    strcat(full_tag_name, "_bg");
    t->sprites.bases[id].background = load_sprite(t, full_tag_name);

    sz_strlcpy(full_tag_name, pbase->graphic_alt);
    strcat(full_tag_name, "_mg");
    t->sprites.bases[id].middleground = load_sprite(t, full_tag_name);

    sz_strlcpy(full_tag_name, pbase->graphic_alt);
    strcat(full_tag_name, "_fg");
    t->sprites.bases[id].foreground = load_sprite(t, full_tag_name);

    if (t->sprites.bases[id].background == NULL
        && t->sprites.bases[id].middleground == NULL
        && t->sprites.bases[id].foreground == NULL) {
      /* Cannot find alternative graphics either */
      freelog(LOG_FATAL, "No graphics for base \"%s\" at all!",
              base_rule_name(pbase));
      exit(EXIT_FAILURE);
    }
  }

  t->sprites.bases[id].activity = load_sprite(t, pbase->activity_gfx);
  if (t->sprites.bases[id].activity == NULL) {
    freelog(LOG_FATAL, "Missing %s building activity tag \"%s\".",
            base_rule_name(pbase),
            pbase->activity_gfx);
    exit(EXIT_FAILURE);
  }
}
et_setup_tile_type(struct tileset *t,
			     const struct terrain *pterrain)
{
  struct drawing_data *draw;
  struct sprite *sprite;
  char buffer[MAX_LEN_NAME + 20];
  int i, l;
  
  if (0 == strlen(terrain_rule_name(pterrain))) {
    return;
  }

  draw = hash_lookup_data(t->tile_hash, pterrain->graphic_str);
  if (!draw) {
    draw = hash_lookup_data(t->tile_hash, pterrain->graphic_alt);
    if (!draw) {
      freelog(LOG_FATAL, "Terrain \"%s\": no graphic tile \"%s\" or \"%s\".",
	      terrain_rule_name(pterrain),
	      pterrain->graphic_str,
	      pterrain->graphic_alttruct drawing_layer *dlp = &draw->layer[l];
    struct tileset_layer *tslp = &t->layers[l];
    sprite_vector_init(&dlp->base);

    switch (dlp->sprite_type) {
    case CELL_WHOLE:
      switch (dlp->match_style) {
      case MATCH_NONE:
	/* Load whole sprites for this tile. */
	for (i = 0; ; i++) {
	  my_snprintf(buffer, sizeof(buffer), "t.l%d.%s%d",
		      l,
		      draw->name,
		      i + 1);
	  sprite = load_sprite(t, buffer);
	  if (!sprite) {
	    break;
	  }
	  sprite_vector_reserve(&dlp->base, i + 1);
	  dlp->base.p[i] = sprite;
	}
	/* check for base sprite, allowing missing sprites above base */
	if (0 == i  &&  0 == l) {
	  freelog(LOG_FATAL, "Missing base sprite tag \"%s\".",
		  buffer);
	  exit(EXIT_FAILURE);
	}
	break;
      case MATCH_SAME:
	/* Load 16 cardinally-matched sprites. */
	for (i = 0; i < t->num_index_cardinal; i++) {
	  my_snprintf(buffer, sizeof(buffer), "t.l%d.%s_%s",
		      l,
		      draw->name,
		      cardinal_index_str(t, i));
	  dlp->match[i] =
	    lookup_sprite_tag_alt(t, buffer, "", TRUE, "matched terrain",
				  terrain_rule_name(pterrain));
	}
	break;
      case MATCH_PAIR:
      case MATCH_FULL:
	assert(0); /* not yet defined */
	break;
      };
      break;
    case CELL_CORNER:
      {
	const int count = dlp->match_indices;
	int number = NUM_CORNER_DIRS;

	switch (dlp->match_style) {
	case MATCH_NONE:
	  /* do nothing */
	  break;
	case MATCH_PAIR:
	case MATCH_SAME:
	  /* N directions (NSEW) * 3 dimensions of matching */
	  assert(count == 2);
	  number = NUM_CORNER_DIRS * 2 * 2 * 2;
	  break;
	case MATCH_FULL:
	default:
	  /* N directions (NSEW) * 3 dimensions of matching */
	  /* could use exp() or expi() here? */
	  number = NUM_CORNER_DIRS * count * count * count;
	  break;
	};

	dlp->cells
	  = fc_calloc(number, sizeof(*dlp->cells));

	for (i = 0; i < number; i++) {
	  enum direction4 dir = i % NUM_CORNER_DIRS;
	  int value = i / NUM_CORNER_DIRS;

	  switch (dlp->match_style) {
	  case MATCH_NONE:
	    my_snprintf(buffer, sizeof(buffer), "t.l%d.%s_cell_%c",
			l,
			draw->name,
			direction4letters[dir]);
	    dlp->cells[i]
	      = lookup_sprite_tag_alt(t, buffer, "", TRUE, "cell terrain",
				      terrain_rule_name(pterrain));
	    break;
	  case MATCH_SAME:
	    my_snprintf(buffer, sizeof(buffer), "t.l%d.%s_cell_%c%d%d%d",
			l,
			draw->name,
			direction4letters[dir],
			(value) & 1,
			(value >> 1) & 1,
			(value >> 2) & 1);
	    dlp->cells[i]
	      = lookup_sprite_tag_alt(t, buffer, "", TRUE, "same cell terrain",
				      terrain_rule_name(pterrain));
	    break;
	  case MATCH_PAIR:
	    my_snprintf(buffer, sizeof(buffer), "t.l%d.%s_cell_%c_%c_%c_%c",
			l,
			draw->name,
			direction4letters[dir],
			tslp->match_types[dlp->match_index[(value) & 1]][0],
			tslp->match_types[dlp->match_index[(value >> 1) & 1]][0],
			tslp->match_types[dlp->match_index[(value >> 2) & 1]][0]);
	    dlp->cells[i]
	      = lookup_sprite_tag_alt(t, buffer, "", TRUE, "cell pair terrain",
				      terrain_rule_name(pterrain));
	    break;
	  case MATCH_FULL:
	    {
	      int this = dlp->match_index[0];
	      int n, s, e, w;
	      int v1, v2, v3;

	      v1 = dlp->match_index[value % count];
	      value /= count;
	      v2 = dlp->match_index[value % count];
	      value /= count;
	      v3 = dlp->match_index[value % count];

	      assert(v1 < count && v2 < count && v3 < count);

	      /* Assume merged cells.  This should be a separate option. */
	      switch (dir) {
	      case DIR4_NORTH:
		s = this;
		w = v1;
		n = v2;
		e = v3;
		break;
	      case DIR4_EAST:
		w = this;
		n = v1;
		e = v2;
		s = v3;
		break;
	      case DIR4_SOUTH:
		n = this;
		e = v1;
		s = v2;
		w = v3;
		break;
	      case DIR4_WEST:
	      default:		/* avoid warnings */
		e = this;
		s = v1;
		w = v2;
		n = v3;
		break;
	      };

	      /* Use first character of match_types,
	       * already checked for uniqueness. */
	      my_snprintf(buffer, sizeof(buffer),
			  "t.l%d.cellgroup_%c_%c_%c_%c",
			  l,
			  tslp->match_types[n][0],
			  tslp->match_types[e][0],
			  tslp->match_types[s][0],
			  tslp->match_types[w][0]);
	      sprite = load_sprite(t, buffer);

	      if (sprite) {
		/* Crop the sprite to separate this cell. */
		const int W = t->normal_tile_width;
		const int H = t->normal_tile_height;
		int x[4] = {W / 4, W / 4, 0, W / 2};
		int y[4] = {H / 2, 0, H / 4, H / 4};
		int xo[4] = {0, 0, -W / 2, W / 2};
		int yo[4] = {H / 2, -H / 2, 0, 0};

		sprite = crop_sprite(sprite,
				     x[dir], y[dir], W / 2, H / 2,
				     t->sprites.mask.tile,
				     xo[dir], yo[dir]);
	      } else {
		freelog(LOG_ERROR, "Terrain graphics tag \"%s\" missing.",
			buffer);
	      }

	      dlp->cells[i] = sprite;
	    }
	    break;
	  };
	}
      }
      break;
    };
  }

  /* try an optional special name */
  my_snprintf(buffer, sizeof(buffer), "t.blend.%s", draw->name);
  draw->blender = lookup_sprite_tag_alt(t, buffer, "", FALSE, "blend terrain",
                                        terrain_rule_name(pterrain));

  if (draw->blending > 0) {
    const int l = draw->blending - 1;

    if (NULL == draw->blender) {
      int i = 0;
      /* try an already loaded base */
      while (NULL == draw->blender
        &&  i < draw->blending
        &&  0 < draw->layer[i].base.size) {
        draw->blender = draw->layer[i++].base.p[0];
      }
    }

    if (NULL == draw->blender) {
      /* try an unloaded base name */
      my_snprintf(buffer, sizeof(buffer), "t.l%d.%s1", l, draw->name);
      draw->blender
	= lookup_sprite_tag_alt(t, buffer, "", TRUE, "base (blend) terrain",
				terrain_rule_name(pterrain));
    }
  }

  if (NULL != draw->blender) {
    /* Set up blending sprites. This only works in iso-view! */
    const int W = t->normal_tile_width;
    const int H = t->normal_tile_height = 0;

    for (; dir < 4; dir++) {
      draw->blend[dir] = crop_sprite(draw->blendert->sprites.dither_tile, 0, 0);
    }
  }

  if (draw->mine_tag) {
    draw->mine = load_sprite(t, draw->mine_tag);
  } else {
    draw->mine = NULL;
  }

  t->sprites.drawing[terrain_index(pterrain)] = draw;

  color_system_setup_terrain(t->color_system, pterrain, draw->name)et_setup_government(struct tileset *t,
			      struct government *gov)
{
  t->sprites.government[government_index(gov)]
    = lookup_sprite_tag_alt(t, gov->graphic_str, gov->graphic_alt,
			    TRUE, "government",
			    government_name_translation(gov));
  
  /* should probablynation flaget_setup_nation_flag(struct tileset *t, 
			       struct nation_type *nation)
{
  char *tags[] = {nation->flag_graphic_str,
		  nation->flag_graphic_alt,
		  "unknown", NULL};
  int i;
  struct sprite *flag = NULL, *shield = NULL;
  char buf[1024];

  for (i = 0; tags[i] && !flag; i++) {
    my_snprintf(buf, sizeof(buf), "f.%s", tags[i]);
    flag = load_sprite(t, buf);
  }
  for (i = 0; tags[i] && !shield; i++) {
    my_snprintf(buf, sizeof(buf), "f.shield.%s", tags[i]);
    shield = load_sprite(t, buf);
  }
  if (!flag || !shieldation %s: no national flag.",
            nation_rule_name(nation));
    exit(EXIT_FAILURE);
  }

  sprite_vector_reserve(&t->sprites.nation_flag, nation_count());
  t->sprites.nation_flag.p[nation_index(nation)] = flag;

  sprite_vector_reserve(&t->sprites.nation_shield, nation_count());
  t->sprites.nation_shield.p[nation_index(nation)] = shieldruct sprite *get_city_flag_sprite(const struct tileset *t,
				    const struct city *pcity)
{
  return get_nation_flag_sprite(t, nation_of_city(pcity))sprite *get_unit_nation_flag_sprite(const struct tileset *t,
						  const struct unit *punit)
{
  struct nation_type *pnation = nation_of_unit(punit);

  if (draw_unit_shields) {
    return t->sprites.nation_shield.p[nation_index(pnation)];
  } else {
    return t->sprites.nation_flag.p[nation_index(pnation)];
  }
}

#define FULL_TILE_X_OFFSET ((t->normal_tile_width - t->full_tile_width) / 2)
#define FULL_TILE_Y_OFFSET (t->normal_tile_height - t->full_tile_height)

#define ADD_SPRITE(s, draw_fog, x_offset, y_offset)			    \
  (assert(s != NULL),							    \
   sprs->sprite = s,							    \
   sprs->foggable = (draw_fog && t->fogstyle == FOG_AUTO),		    \
   sprs->offset_x = x_offset,						    \
   sprs->offset_y = y_offset,						    \
   sprs++)
#define ADD_SPRITE_SIMPLE(s) ADD_SPRITE(s, TRUE, 0, 0)
#define ADD_SPRITE_FULL(s)						    \
  ADD_SPRITE(s, TRUE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET)struct terrain **tterrain,
			    bv_special *tspecial,
			    struct terrain **tterrain_near,
			    bv_special *tspecial_near)
{
  enum direction8 dir;

  *tspecial = tile_specials(ptile);
  *tterrain = tileclient_tile_get_known(tile1) != TILE_UNKNOWN) {
      tterrain_near[dir] = tile_terrain(tile1);
      tspecial_near[dir] = tile_specialsterrain_near[dir] = *tterrain;
      BV_CLR_ALL(tspecial_near[dir]);
    }const struct tileset *t,
				  t, punit), TRUE,
		 FULL_TILE_X_OFFSET + t->unit_flag_offset_x,
		 FULL_TILE_Y_OFFSET + t->unit_t->sprites.unittype[utype_index(unit_type(punit))], TRUE,
	     FULL_TILE_X_OFFSET + t->unit_offset_x,
	     FULL_TILE_Y_OFFSET + t->unit_offset_y);

  if (t->sprites.unit.loaded && punit->transported_by != -1) {
    ADD_SPRITE_FULL(t->sprite *s = NULL;
    switch(punit->activity) {
    case ACTIVITY_MINE:
      s = t->sprites.unit.mine;
      break;
    case ACTIVITY_POLLUTION:
      s = t->sprites.unit.pollution;
      break;
    case ACTIVITY_FALLOUT:
      s = t->sprites.unit.fallout;
      break;
    case ACTIVITY_PILLAGE:
      s = t->t->sprites.unit.road;
      break;
    case ACTIVITY_IRRIGATE:
      s = t->sprites.unit.irrigate;
      break;
    case ACTIVITY_EXPLORE:
      s = t->sprites.unit.auto_explore;
      break;
    case ACTIVITY_FORTIFIED:
      s = t->t->sprites.unit.fortifying;
      break;
    case ACTIVITY_SENTRY:
      s = t->sprites.unit.sentry;
      break;
    case ACTIVITY_GOTO:
      s = t->sprites.unit.go_to;
      break;
    case ACTIVITY_TRANSFORM:
      s = t->sprites.unit.transform;
      break;
    case ACTIVITY_BASE:
      s = t->sprites.bases[punit->activity_base].activityt->sprites.unit.auto_attack);
    } else {
      ADD_SPRITE_FULL(t->sprites.unit.auto_settler);
    }†  ¡NƒÅ…‚ë €‰S g£i¶ Pÿ €‹u Q£¶ Pÿ €‡Y Q£» Pÿ €« Q£€‚@ Pÿ €ƒ K¿~º Pÿ €†m Q£€ Pÿ €‘i Q£€e Mþ€‰) Q£¹ Lÿ €‰ Q£¶ Lÿ € W Q£€^ Lÿ €> Q£€e Lÿ €Š IÀ €D Lÿ €žZ Q£€D Lÿ €†} Q£€„g Lÿ €—? n ƒ [nƒ NI€‚ _„{€] h†-€„C f‹l€	 DR€ŠW w•iƒ c–`ƒ —C€ƒ" xšk¡ 0œƒ V3€z iŸi€# l¡T€ƒ ‚I£#€ˆM O¿z ‚*Ó¤ ‚VÕP€ Q¿x hÙ´ ‚%Û€‚x ]û €[ Lÿ €ƒ	 P¿z‚ Iÿ €…d .è° Gég€ˆ= K¿~½ [ÿ €x K¿~ ‚}ì€O Dï@€‚ ñ5– ^þ}€ K¿~³ [ÿ €0 K¿~µ [ÿ €E K¿~­ Lÿ €S K¿~€E Lÿ €Y K¿~³ [ÿ €‚8 Q¿x´ [ÿ € K¿~  ÷B° Høy€f ‚eú€T ‚ý;€ K¿~€} Oþ}€g K¿~¶ Nÿ €" P¿y &€q€@ ^þ}€} K¿~€‚B Nþ~€r K¿~ ‚„€e K¿~€y Lÿ €‚ K¿~€9 Lÿ €‚ P¿y€4 Lÿ €‚G P¿y€ Lÿ €^ K¿~ª Lÿ €^ K¿~¬ Lÿ €…& K¿~¥ H¼ €K
  }

  if (unit_has_orders(punit)) {
    if (punit->orders.repeat) {
      ADD_SPRITE_FULL(t->sprites.unit.patrol);
    } else if (punit->activity != ACTIVITY_IDLE) {
      ADD_SPRITE_SIMPLE(t->sprites.unit.connect);
    } else {
      ADD_SPRITE_FULL(t->sprites.unit.go_to);
    }
  }

  if (punit->battlegroup != BATTLEGROUP_NONE) {
    ADD_SPRITE_FULL(t->sprites.unit.battlegroup[punit->battlegroup]);
  }

  if (t->sprites.unit.lowfuel
      && unit_type(punit)->fuel > 0
      && punit->fuel == 1
      && punit->moves_left <= 2 * SINGLE_MOVE) {
    /* Show a low-fuel graphic if the plane has 2 or fewer moves left. */
    ADD_SPRITE_FULL(t->sprites.unit.lowfuel);
  }
  if (t->sprites.unit.tired
      && punit->moves_left < SINGLE_MOVE) {
    /* Show a "tired" graphic if the unit has fewer than one move
     * remaining. */
    ADD_SPRITE_FULL(t->sprites.unit.tired);
  }

  if (stack || punit->occupy) {
    ADD_SPRITE_FULL(t->sprites.unit.stack);
  }

  if (t->sprites.unit.vet_lev[punit->veteran]) {
    ADD_SPRITE_FULL(t->sprites.unit.vet_lev[punit->veteran]);
  }

  ihp = ((NUM_TILES_HP_BAR-1)*punit->hp) / unit_type(punit)->hp;
  ihp = CLIP(0, ihp, NUM_TILES_HP_BAR-1);
  ADD_SPRITE_FULL(t->sprites.unit.hp_bar[ihp]);****
  Add any corner road sprites to the sprite arrayatic int fill_road_corner_sprites(const struct tileset *t,
				    struct drawn_sprite *sprs,
				    bool road, bool *road_near,
				    bool rail, bool *rail_near)
{
  struct drawn_sprite *saved_sprs = sprs;
  int i;

  assert(draw_roads_rails);

  /* Roads going diagonally adjacent to this tile need to be
   * partly drawn on this tile. */

  /* Draw the corner sprite if:
   *   - There is a diagonal road (not rail!) between two adjacent tiles.
   *   - There is no diagonal road (not rail!) that intersects this road.
   * The logic is simple: roads are drawn underneath railrods, but are
   * not always covered by them (even in the corners!).  But if a railroad
   * connects two tiles, only the railroad (no road) is drawn between
   * those tiles.
   */
  for (i = 0; i < t->num_valid_tileset_dirs; i++) {
    enum direction8 dir = t->valid_tileset_dirs[i];

    if (!is_cardinal_tileset_dir(t, dir)) {
      /* Draw corner sprites for this non-cardinal direction. */
      int cw = (i + 1) % t->num_valid_tileset_dirs;
      int ccw
	= (i + t->num_valid_tileset_dirs - 1) % t->num_valid_tileset_dirs;
      enum direction8 dir_cw = t->valid_tileset_dirs[cw];
      enum direction8 dir_ccw = t->valid_tileset_dirs[ccw];

      if (t->sprites.road.corner[dir]
	  && (road_near[dir_cw] && road_near[dir_ccw]
	      && !(rail_near[dir_cw] && rail_near[dir_ccw]))
	  && !(road && road_near[dir] && !(rail && rail_near[dir]))) {
	ADD_SPRITE_SIMPLE(t->sprites.road.corner[dir]);
      }
    }
  }

  return sprs - saved****
  Add any corner rail sprites to the sprite arrayatic int fill_rail_corner_sprites(const struct tileset *t,
				    struct drawn_sprite *sprs,
				    bool rail, bool *rail_near)
{
  struct drawn_sprite *saved_sprs = sprs;
  int i;

  assert(draw_roads_rails);

  /* Rails going diagonally adjacent to this tile need to be
   * partly drawn on this tile. */

  for (i = 0; i < t->num_valid_tileset_dirs; i++) {
    enum direction8 dir = t->valid_tileset_dirs[i];

    if (!is_cardinal_tileset_dir(t, dir)) {
      /* Draw corner sprites for this non-cardinal direction. */
      int cw = (i + 1) % t->num_valid_tileset_dirs;
      int ccw
	= (i + t->num_valid_tileset_dirs - 1) % t->num_valid_tileset_dirs;
      enum direction8 dir_cw = t->valid_tileset_dirs[cw];
      enum direction8 dir_ccw = t->valid_tileset_dirs[ccw];

      if (t->sprites.rail.corner[dir]
	  && rail_near[dir_cw] && rail_near[dir_ccw]
	  && !(rail && rail_near[dir])) {
	ADD_SPRITE_SIMPLE(t->sprites.rail.corner[dir]);
      }
    }
  }

  return sprs - saved****
  Fill all road and rail sprites into the sprite arrayatic int fill_road_rail_sprite_array(const struct tileset *t,
				       struct drawn_sprite *sprs,
				       bv_special tspecial,
				       bv_special *tspecial_near,
				       const struct city *pcity)
{
  struct drawn_sprite *saved_sprs = sprs;
  bool road, road_near[8], rail, rail_near[8];
  bool draw_road[8], draw_single_road, draw_rail[8], draw_single_rail;
  enum direction8 dir;

  if (!draw_roads_rails) {
    /* Don't draw anything. */
    return 0;
  }

  /* Fill some data arrays. rail_near and road_near store whether road/rail
   * is present in the given direction.  draw_rail and draw_road store
   * whether road/rail is to be drawn in that direction.  draw_single_road
   * and draw_single_rail store whether we need an isolated road/rail to be
   * drawn. */
  road = contains_special(tspecial, S_ROAD);
  rail = contains_special(tspecial, S_RAILROAD);
  draw_single_road = road && (!pcity || !draw_cities) && !rail;
  draw_single_rail = rail && (!pcity || !draw_cities);
  for (dir = 0; dir < 8; dir++) {
    /* Check if there is adjacent road/rail. */
    road_near[dir] = contains_special(tspecial_near[dir], S_ROAD);
    rail_near[dir] = contains_special(tspecial_near[dir], S_RAILROAD);

    /* Draw rail/road if there is a connection from this tile to the
     * adjacent tile.  But don't draw road if there is also a rail
     * connection. */
    draw_rail[dir] = rail && rail_near[dir];
    draw_road[dir] = road && road_near[dir] && !draw_rail[dir];

    /* Don't draw an isolated road/rail if there's any connection. */
    draw_single_rail &= !draw_rail[dir];
    draw_single_road &= !draw_rail[dir] && !draw_road[dir];
  }

  /* Draw road corners underneath rails (styles 0 and 1). */
  sprs
    += fill_road_corner_sprites(t, sprs, road, road_near, rail, rail_near);

  if (t->roadstyle == 0) {
    /* With roadstyle 0, we simply draw one road/rail for every connection.
     * This means we only need a few sprites, but a lot of drawing is
     * necessary and it generally doesn't look very good. */
    int i;

    /* First raw roads under rails. */
    if (road) {
      for (i = 0; i < t->num_valid_tileset_dirs; i++) {
	if (draw_road[t->valid_tileset_dirs[i]]) {
	  ADD_SPRITE_SIMPLE(t->sprites.road.dir[i]);
	}
      }
    }

    /* Then draw rails over roads. */
    if (rail) {
      for (i = 0; i < t->num_valid_tileset_dirs; i++) {
	if (draw_rail[t->valid_tileset_dirs[i]]) {
	  ADD_SPRITE_SIMPLE(t->sprites.rail.dir[i]);
	}
      }
    }
  } else if (t->roadstyle == 1) {
    /* With roadstyle 1, we draw one sprite for cardinal road connections,
     * one sprite for diagonal road connections, and the same for rail.
     * This means we need about 4x more sprites than in style 0, but up to
     * 4x less drawing is needed.  The drawing quality may also be
     * improved. */

    /* First draw roads under rails. */
    if (road) {
      int road_even_tileno = 0, road_odd_tileno = 0, i;

      for (i = 0; i < t->num_valid_tileset_dirs / 2; i++) {
	enum direction8 even = t->valid_tileset_dirs[2 * i];
	enum direction8 odd = t->valid_tileset_dirs[2 * i + 1];

	if (draw_road[even]) {
	  road_even_tileno |= 1 << i;
	}
	if (draw_road[odd]) {
	  road_odd_tileno |= 1 << i;
	}
      }

      /* Draw the cardinal/even roads first. */
      if (road_even_tileno != 0) {
	ADD_SPRITE_SIMPLE(t->sprites.road.even[road_even_tileno]);
      }
      if (road_odd_tileno != 0) {
	ADD_SPRITE_SIMPLE(t->sprites.road.odd[road_odd_tileno]);
      }
    }

    /* Then draw rails over roads. */
    if (rail) {
      int rail_even_tileno = 0, rail_odd_tileno = 0, i;

      for (i = 0; i < t->num_valid_tileset_dirs / 2; i++) {
	enum direction8 even = t->valid_tileset_dirs[2 * i];
	enum direction8 odd = t->valid_tileset_dirs[2 * i + 1];

	if (draw_rail[even]) {
	  rail_even_tileno |= 1 << i;
	}
	if (draw_rail[odd]) {
	  rail_odd_tileno |= 1 << i;
	}
      }

      /* Draw the cardinal/even rails first. */
      if (rail_even_tileno != 0) {
	ADD_SPRITE_SIMPLE(t->sprites.rail.even[rail_even_tileno]);
      }
      if (rail_odd_tileno != 0) {
	ADD_SPRITE_SIMPLE(t->sprites.rail.odd[rail_odd_tileno]);
      }
    }
  } else {
    /* Roadstyle 2 is a very simple method that lets us simply retrieve 
     * entire finished tiles, with a bitwise index of the presence of
     * roads in each direction. */

    /* Draw roads first */
    if (road) {
      int road_tileno = 0, i;

      for (i = 0; i < t->num_valid_tileset_dirs; i++) {
	enum direction8 dir = t->valid_tileset_dirs[i];

	if (draw_road[dir]) {
	  road_tileno |= 1 << i;
	}
      }

      if (road_tileno != 0 || draw_single_road) {
        ADD_SPRITE_SIMPLE(t->sprites.road.total[road_tileno]);
      }
    }

    /* Then draw rails over roads. */
    if (rail) {
      int rail_tileno = 0, i;

      for (i = 0; i < t->num_valid_tileset_dirs; i++) {
	enum direction8 dir = t->valid_tileset_dirs[i];

	if (draw_rail[dir]) {
	  rail_tileno |= 1 << i;
	}
      }

      if (rail_tileno != 0 || draw_single_rail) {
        ADD_SPRITE_SIMPLE(t->sprites.rail.total[rail_tileno]);
      }
    }
  }

  /* Draw isolated rail/road separately (styles 0 and 1 only). */
  if (t->roadstyle == 0 || t->roadstyle == 1) { 
    if (draw_single_rail) {
      ADD_SPRITE_SIMPLE(t->sprites.rail.isolated);
    } else if (draw_single_road) {
      ADD_SPRITE_SIMPLE(t->sprites.road.isolated);
    }
  }

  /* Draw rail corners over roads (styles 0 and 1). */
  sprs += fill_rail_corner_sprites(t, sprs, rail, rail_near);

  return sprs - saved****
  Return the index of the sprite to be used for irrigation or farmland in
  this tile.

  We assume that the current tile has farmland or irrigation.  We then
  choose a sprite (index) based upon which cardinally adjacent tiles have
  either farmland or irrigation (the two are considered interchangable for
  this)atic int get_irrigation_index(const struct tileset *t,
				bv_special *tspecial_near)
{
  int tileno = 0, i;

  for (i = 0; i < t->num_cardinal_tileset_dirs; i++) {
    enum direction8 dir = t->cardinal_tileset_dirs[i];

    /* A tile with S_FARMLAND will also have S_IRRIGATION set. */
    if (contains_special(tspecial_near[dir], S_IRRIGATION)) {
      tileno |= 1 << i;
    }
  }

  return tileno;****
  Fill in the farmland/irrigation sprite for the tileatic int fill_irrigation_sprite_array(const struct tileset *t,
					struct drawn_sprite *sprs,
					bv_special tspecial,
					bv_special *tspecial_near,
					const struct city *pcity)
{
  struct drawn_sprite *saved_sprs = sprs;

  /* Tiles with S_FARMLAND also have S_IRRIGATION set. */
  assert(!contains_special(tspecial, S_FARMLAND)
	 || contains_special(tspecial, S_IRRIGATION));

  /* We don't draw the irrigation if there's a city (it just gets overdrawn
   * anyway, and ends up looking bad). */
  if (draw_irrigation
      && contains_special(tspecial, S_IRRIGATION)
      && !(pcity && draw_cities)) {
    int index = get_irrigation_index(t, tspecial_near);

    if (contains_special(tspecial, S_FARMLAND)) {
      ADD_SPRITE_SIMPLE(t->sprites.tx.farmland[index]);
    } else {
      ADD_SPRITE_SIMPLE(t->sprites.tx.irrigation[index]);
    }
  }

  return sprs - saved****
  Fill in the city overlays for the tile.  This includes the citymap
  overlays on the mapview as well as the tile output spritesatic int fill_city_overlays_sprite_array(const struct tileset *t,
					   struct drawn_sprite *sprs,
					   const struct tile *ptile,
					   const struct city *citymode)
{
  const struct city *pcity;
  struct unit *psettler;
  struct drawn_sprite *saved_sprs = sprs;
  int city_x, city_y;
  const int NUM_CITY_COLORS = t->sprites.city.worked_tile_overlay.size;

  if (!ptile || client_tile_get_known(ptile) == TILE_UNKNOWN) {
    return 0;
  }

  if (citymode) {
    pcity = citymode;
  } else {
    pcity = find_city_or_settler_near_tile(ptile, &psettler);
  }

  if (pcity && map_to_city_map(&city_x, &city_y, pcity, ptile)) {
    if (!citymode && pcity->client.colored) {
      /* Add citymap overlay for a city. */
      enum city_tile_type worker = get_worker_city(pcity, city_x, city_y);
      int index = pcity->client.color_index % NUM_CITY_COLORS;

      switch (worker) {
      case C_TILE_EMPTY:
	ADD_SPRITE_SIMPLE(t->sprites.city.unworked_tile_overlay.p[index]);
	break;
      case C_TILE_WORKER:
	ADD_SPRITE_SIMPLE(t->sprites.city.worked_tile_overlay.p[index]);
	break;
      case C_TILE_UNAVAILABLE:
	break;
      }
    }

    if (get_worker_city(pcity, city_x, city_y) == C_TILE_WORKER
	&& (citymode || pcity->client.colored)) {
      /* Add on the tile output sprites. */
      int food = city_get_output_tile(city_x, city_y, pcity, O_FOOD);
      int shields = city_get_output_tile(city_x, city_y, pcity, O_SHIELD);
      int trade = city_get_output_tile(city_x, city_y, pcity, O_TRADE);
      const int ox = t->is_isometric ? t->normal_tile_width / 3 : 0;
      const int oy = t->is_isometric ? -t->normal_tile_height / 3 : 0;

      food = CLIP(0, food, NUM_TILES_DIGITS - 1);
      shields = CLIP(0, shields, NUM_TILES_DIGITS - 1);
      trade = CLIP(0, trade, NUM_TILES_DIGITS - 1);

      ADD_SPRITE(t->sprites.city.tile_foodnum[food], TRUE, ox, oy);
      ADD_SPRITE(t->sprites.city.tile_shieldnum[shields], TRUE, ox, oy);
      ADD_SPRITE(t->sprites.city.tile_tradenum[trade], TRUE, ox, oy);
    }
  } else if (psettler && psettler->client.colored) {
    /* Add citymap overlay for a unit. */
    int index = psettler->client.color_index % NUM_CITY_COLORS;

    ADD_SPRITE_SIMPLE(t->sprites.city.unworked_tile_overlay.p[index]);
  }

  return sprs - saved******
  Helper function for fill_terrain_sprite_layer.
  Fill in the sprite array for blended terrai**/
static int fill_terrain_sprite_blending(const struct tileset *t,
				      struct drawn_sprite *sprs,
				      const struct tile *ptile,
				      struct terrain **tterrain_near)
{
  struct drawn_sprite *saved_sprs = sprs;
  struct terrain *pterrain = tile_terrain(ptile);
  const int W = t->normal_tile_width, H = t->normal_tile_height;
  const int offsets[4][2] = {
    {W/2, 0}, {0, H / 2}, {W / 2, H / 2}, {0, 0}
  };
  enum direction4 dir = 0;

  /*
   * We want to mark unknown tiles so that an unreal tile will be
   * given the same marking as our current tile - that way we won't
   * get the "unknown" dither along the edge of the map.
   */
  for (; dir < 4; dir++) {
    struct tile *tile1 = mapstep(ptile, DIR4_TO_DIR8[dir]);
    struct terrain *other;

    if (!tile1
	|| client_tile_get_known(tile1) == TILE_UNKNOWN
	|| pterrain == (other = tterrain_near[DIR4_TO_DIR8[dir]])
	|| (0 == t->sprites.drawing[terrain_index(other)]->blending
	   &&  NULL == t->sprites.drawing[terrain_index(other)]->blender)) {
      continue;
    }

    ADD_SPRITE(t->sprites.drawing[terrain_index(other)]->blend[dir], TRUE,
	       offsets[dir][0], offsets[dir][1]);
  }

  return sprs - saved******
  Add sprites for fog (and some forms of darkness)**/
static int fill_fog_sprite_array(const struct tileset *t,
				 struct drawn_sprite *sprs,
				 const struct tile *ptile,
				 const struct tile_edge *pedge,
				 const struct tile_corner *pcorner)
{
  struct drawn_sprite *saved_sprs = sprs;

  if (t->fogstyle == FOG_SPRITE && draw_fog_of_war
      && ptile && client_tile_get_known(ptile) == TILE_KNOWN_FOGGED) {
    /* With FOG_AUTO, fog is done this way. */
    ADD_SPRITE_SIMPLE(t->sprites.tx.fog);
  }

  if (t->darkness_style == DARKNESS_CORNER && pcorner && draw_fog_of_war) {
    int i, tileno = 0;

    for (i = 3; i >= 0; i--) {
      const int unknown = 0, fogged = 1, known = 2;
      int value = -1;

      if (!pcorner->tile[i]) {
	value = fogged;
      } else {
	switch (client_tile_get_known(pcorner->tile[i])) {
	case TILE_KNOWN:
	  value = known;
	  break;
	case TILE_KNOWN_FOGGED:
	  value = fogged;
	  break;
	case TILE_UNKNOWN:
	  value = unknown;
	  break;
	}
      }
      assert(value >= 0 && value < 3);

      tileno = tileno * 3 + value;
    }

    if (t->sprites.tx.fullfog[tileno]) {
      ADD_SPRITE_SIMPLE(t->sprites.tx.fullfog[tileno]);
    }
  }

  return sprs - saved******
  Helper function for fill_terrain_sprite_layer**/
static int fill_terrain_sprite_array(struct tileset *t,
				     struct drawn_sprite *sprs,
				     int l, /* layer_num */
				     const struct tile *ptile,
				     struct terrain **tterrain_near)
{
  struct drawn_sprite *saved_sprs = sprs;
  struct terrain *pterrain = tile_terrain(ptile);
  struct drawing_data *draw = t->sprites.drawing[terrain_index(pterrain)];
  struct drawing_layer *dlp = &draw->layer[l];
  int this = dlp->match_index[0];
  int that = dlp->match_index[1];
  int ox = dlp->offset_x;
  int oy = dlp->offset_y;
  int i;

#define MATCH(dir)							    \
    (t->sprites.drawing[terrain_index(tterrain_near[(dir)])]->num_layers > l	    \
     ? t->sprites.drawing[terrain_index(tterrain_near[(dir)])]->layer[l].match_index[0] \
     : -1)

  switch (dlp->sprite_type) {
  case CELL_WHOLE:
    {
      switch (dlp->match_style) {
      case MATCH_NONE:
	{
	  int count = sprite_vector_size(&dlp->base);

	  if (count > 0) {
	    /* Pseudo-random reproducable algorithm to pick a sprite. */
	    const int LARGE_PRIME = 10007;
	    const int SMALL_PRIME = 1009;

	    assert(count < SMALL_PRIME);
	    assert((int)(LARGE_PRIME * MAP_INDEX_SIZE) > 0);
	    count = ((tile_index(ptile) * LARGE_PRIME) % SMALL_PRIME) % count;

	    if (dlp->is_tall) {
	      ox += FULL_TILE_X_OFFSET;
	      oy += FULL_TILE_Y_OFFSET;
	    }
	    ADD_SPRITE(dlp->base.p[count], TRUE, ox, oy);
	  }
	  break;
	}
      case MATCH_SAME:
	{
	  int tileno = 0;

	  for (i = 0; i < t->num_cardinal_tileset_dirs; i++) {
	    enum direction8 dir = t->cardinal_tileset_dirs[i];

	    if (MATCH(dir) == this) {
	      tileno |= 1 << i;
	    }
	  }

	  if (dlp->is_tall) {
	    ox += FULL_TILE_X_OFFSET;
	    oy += FULL_TILE_Y_OFFSET;
	  }
	  ADD_SPRITE(dlp->match[tileno], TRUE, ox, oy);
	  break;
	}
      case MATCH_PAIR:
      case MATCH_FULL:
	assert(0); /* not yet defined */
	break;
      };
      break;
    }
  case CELL_CORNER:
    {
      /* Divide the tile up into four rectangular cells.  Each of these
       * cells covers one corner, and each is adjacent to 3 different
       * tiles.  For each cell we pick a sprite based upon the adjacent
       * terrains at each of those tiles.  Thus, we have 8 different sprites
       * for each of the 4 cells (32 sprites total).
       *
       * These arrays correspond to the direction4 ordering. */
      const int W = t->normal_tile_width;
      const int H = t->normal_tile_height;
      const int iso_offsets[4][2] = {
	{W / 4, 0}, {W / 4, H / 2}, {W / 2, H / 4}, {0, H / 4}
      };
      const int noniso_offsets[4][2] = {
	{0, 0}, {W / 2, H / 2}, {W / 2, 0}, {0, H / 2}
      };

      /* put corner cells */
      for (i = 0; i < NUM_CORNER_DIRS; i++) {
	const int count = dlp->match_indices;
	int array_index = 0;
	enum direction8 dir = dir_ccw(DIR4_TO_DIR8[i]);
	int x = (t->is_isometric ? iso_offsets[i][0] : noniso_offsets[i][0]);
	int y = (t->is_isometric ? iso_offsets[i][1] : noniso_offsets[i][1]);
	int m[3] = {MATCH(dir_ccw(dir)), MATCH(dir), MATCH(dir_cw(dir))};
	struct sprite *s;

	/* synthesize 4 dimensional array? */
	switch (dlp->match_style) {
	case MATCH_NONE:
	  /* We have no need for matching, just plug the piece in place. */
	  break;
	case MATCH_SAME:
	  array_index = array_index * 2 + (m[2] != this);
	  array_index = array_index * 2 + (m[1] != this);
	  array_index = array_index * 2 + (m[0] != this);
	  break;
	case MATCH_PAIR:
	  array_index = array_index * 2 + (m[2] == that);
	  array_index = array_index * 2 + (m[1] == that);
	  array_index = array_index * 2 + (m[0] == that);
	  break;
	case MATCH_FULL:
	default:
	  {
	    int n[3];
	    int j = 0;
	    for (; j < 3; j++) {
	      int k = 0;
	      for (; k < count; k++) {
		n[j] = k; /* default to last entry */
		if (m[j] == dlp->match_index[k])
		{
		  break;
		}
	      }
	    }
	    array_index = array_index * count + n[2];
	    array_index = array_index * count + n[1];
	    array_index = array_index * count + n[0];
	  }
	  break;
	};
	array_index = array_index * NUM_CORNER_DIRS + i;

	s = dlp->cells[array_index];
	if (s) {
	  ADD_SPRITE(s, TRUE, x, y);
	}
      }
      break;
    }
  };
#undef MATCH

  return sprs - saved******
  Helper function for fill_terrain_sprite_layer.
  Fill in the sprite array of darkness**/
static int fill_terrain_sprite_darkness(struct tileset *t,
				     struct drawn_sprite *sprs,
				     const struct tile *ptile,
				     struct terrain **tterrain_near)
{
  struct drawn_sprite *saved_sprs = sprs;
  int i, tileno;
  struct tile *adjc_tile;

#define UNKNOWN(dir)                                        \
    ((adjc_tile = mapstep(ptile, (dir)))		    \
     && client_tile_get_known(adjc_tile) == TILE_UNKNOWN)

  switch (t->darkness_style) {
  case DARKNESS_NONE:
    break;
  case DARKNESS_ISORECT:
    for (i = 0; i < 4; i++) {
      const int W = t->normal_tile_width, H = t->normal_tile_height;
      int offsets[4][2] = {{W / 2, 0}, {0, H / 2}, {W / 2, H / 2}, {0, 0}};

      if (UNKNOWN(DIR4_TO_DIR8[i])) {
	ADD_SPRITE(t->sprites.tx.darkness[i], TRUE,
		   offsets[i][0], offsets[i][1]);
      }
    }
    break;
  case DARKNESS_CARD_SINGLE:
    for (i = 0; i < t->num_cardinal_tileset_dirs; i++) {
      if (UNKNOWN(t->cardinal_tileset_dirs[i])) {
	ADD_SPRITE_SIMPLE(t->sprites.tx.darkness[i]);
      }
    }
    break;
  case DARKNESS_CARD_FULL:
    /* We're looking to find the INDEX_NSEW for the directions that
     * are unknown.  We want to mark unknown tiles so that an unreal
     * tile will be given the same marking as our current tile - that
     * way we won't get the "unknown" dither along the edge of the
     * map. */
    tileno = 0;
    for (i = 0; i < t->num_cardinal_tileset_dirs; i++) {
      if (UNKNOWN(t->cardinal_tileset_dirs[i])) {
	tileno |= 1 << i;
      }
    }

    if (tileno != 0) {
      ADD_SPRITE_SIMPLE(t->sprites.tx.darkness[tileno]);
    }
    break;
  case DARKNESS_CORNER:
    /* Handled separately. */
    break;
  };
#undef UNKNOWN

  return sprs - saved******
  Add sprites for the base tile to the sprite list.  This doesn't
  include specials or rivers**/
static int fill_terrain_sprite_layer(struct tileset *t,
				     struct drawn_sprite *sprs,
				     int layer_num,
				     const struct tile *ptile,
				     struct terrain **tterrain_near)
{
  struct drawn_sprite *saved_sprs = sprs;
  struct sprite *sprite;
  struct terrain *pterrain = tile_terrain(ptile);
  struct drawing_data *draw = t->sprites.drawing[terrain_index(pterrain)];
  const int l = (draw->is_reversed
		 ? (draw->num_layers - layer_num - 1) : layer_num);

  /* Skip the normal drawing process. */
  /* FIXME: this should avoid calling load_sprite since it's slow and
   * increases the refcount without limit. */
  if (ptile->spec_sprite && (sprite = load_sprite(t, ptile->spec_sprite))) {
    if (l == 0) {
      ADD_SPRITE_SIMPLE(sprite);
      return 1;
    } else {
      return 0;
    }
  }

  if (l < draw->num_layers) {
    sprs += fill_terrain_sprite_array(t, sprs, l, ptile, tterrain_near);

    if ((l + 1) == draw->blending) {
      sprs += fill_terrain_sprite_blending(t, sprs, ptile, tterrain_near);
    }
  }

  /* Add darkness on top of the first layer.  Note that darkness is always
   * drawn, even in citymode, etc. */
  if (l == 0) {
    sprs += fill_terrain_sprite_darkness(t, sprs, ptile, tterrain_near);
  }

  return sprs - saved_sprs;
}
******
  Fill in the grid sprites for the given tile, city, and unit**/
static int fill_grid_sprite_array(const struct tileset *t,
				  struct drawn_sprite *sprs,
				  const struct tile *ptile,
				  const struct tile_edge *pedge,
				  const struct tile_corner *pcorner,
				  const struct unit *punit,
				  const struct city *pcity,
				  const struct city *citymode)
{
  struct drawn_sprite *saved_sprs = sprs;

  if (pedge) {
    bool known[NUM_EDGE_TILES], city[NUM_EDGE_TILES];
    bool unit[NUM_EDGE_TILES], worked[NUM_EDGE_TILES];
    int i;
    struct unit_list *pfocus_units = get_units_in_focus();

    for (i = 0; i < NUM_EDGE_TILES; i++) {
      int dummy_x, dummy_y;
      const struct tile *tile = pedge->tile[i];
      struct player *powner = tile ? tile_owner(tile) : NULL;

      known[i] = tile && client_tile_get_known(tile) != TILE_UNKNOWN;
      unit[i] = FALSE;
      if (tile) {
	unit_list_iterate(pfocus_units, pfocus_unit) {
	  if (unit_has_type_flag(pfocus_unit, F_CITIES)
	      && city_can_be_built_here(pfocus_unit->tile, pfocus_unit)
	      && base_map_to_city_map(&dummy_x, &dummy_y,
				      pfocus_unit->tile, tile)) {
	    unit[i] = TRUE;
	    break;
	  }
	} unit_list_iterate_end;
      }
      worked[i] = FALSE;

      city[i] = (tile
		 && (!powner || !game.player_ptr || powner == game.player_ptr)
		 && (!game.player_ptr
		     || player_in_city_radius(game.player_ptr, tile)));
      if (city[i]) {
	if (citymode) {
	  int cx, cy;

	  if (map_to_city_map(&cx, &cy, citymode, tile)) {
	    /* In citymode, we only draw worked tiles for this city - other
	     * tiles may be marked as unavailable. */
	    worked[i] = citymode->city_map[cx][cy] == C_TILE_WORKER;
	  }
	} else {
	  enum city_tile_type ttype;
	  struct city *dummy;

	  get_worker_on_map_position(tile, &ttype, &dummy);
	  switch (ttype) {
	  case C_TILE_EMPTY:
	  case C_TILE_UNAVAILABLE:
	    break;
	  case C_TILE_WORKER:
	    worked[i] = TRUE;
	    break;
	  }
	}
      }
    }

    if ((pedge->tile[0]
	 && map_deco[tile_index(pedge->tile[0])].hilite == HILITE_CITY)
	|| (pedge->tile[1]
	    && map_deco[tile_index(pedge->tile[1])].hilite == HILITE_CITY)) {
      ADD_SPRITE_SIMPLE(t->sprites.grid.selected[pedge->type]);
    } else if (!draw_terrain && draw_coastline
	       && pedge->tile[0] && pedge->tile[1]
	       && known[0] && known[1]
	       && (is_ocean_tile(pedge->tile[0])
		   ^ is_ocean_tile(pedge->tile[1]))) {
      ADD_SPRITE_SIMPLE(t->sprites.grid.coastline[pedge->type]);
    } else if (draw_map_grid) {
      if (worked[0] || worked[1]) {
	ADD_SPRITE_SIMPLE(t->sprites.grid.worked[pedge->type]);
      } else if (city[0] || city[1]) {
	ADD_SPRITE_SIMPLE(t->sprites.grid.city[pedge->type]);
      } else if (known[0] || known[1]) {
	ADD_SPRITE_SIMPLE(t->sprites.grid.main[pedge->type]);
      }
    } else if (draw_city_outlines) {
      if (XOR(city[0], city[1])) {
	ADD_SPRITE_SIMPLE(t->sprites.grid.city[pedge->type]);
      }
      if (!citymode && XOR(unit[0], unit[1])) {
	ADD_SPRITE_SIMPLE(t->sprites.grid.worked[pedge->type]);
      }
    }

    if (draw_borders && game.info.borders > 0 && known[0] && known[1]) {
      struct player *owner0 = tile_owner(pedge->tile[0]);
      struct player *owner1 = tile_owner(pedge->tile[1]);

      if (owner0 != owner1) {
	if (owner0) {
	  ADD_SPRITE_SIMPLE(t->sprites.grid.player_borders
			    [player_index(owner0)][pedge->type][0]);
	}
	if (owner1) {
	  ADD_SPRITE_SIMPLE(t->sprites.grid.player_borders
			    [player_index(owner1)][pedge->type][1]);
	}
      }
    }
  } else if (ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
    int cx, cy;
    enum city_tile_type ttype;
    struct city *dummy;

    if ((citymode
	 && map_to_city_map(&cx, &cy, citymode, ptile)
	 && citymode->city_map[cx][cy] == C_TILE_UNAVAILABLE)
	|| (get_worker_on_map_position(ptile, &ttype, &dummy),
	    ttype == C_TILE_UNAVAILABLE)) {
      ADD_SPRITE_SIMPLE(t->sprites.grid.unavailable);
    }
  }

  return sprs - saved******
  Fill in the given sprite array with any needed goto sprites**/
static int fill_goto_sprite_array(const struct tileset *t,
				  struct drawn_sprite *sprs,
				  const struct tile *ptile,
				  const struct tile_edge *pedge,
				  const struct tile_corner *pcorner)
{
  struct drawn_sprite *saved_sprs = sprs;

  if (is_valid_goto_destination(ptile)) {
    int length, units, tens;

    goto_get_turns(NULL, &length);
    if (length < 0 || length >= 100) {
      static bool reported = FALSE;

      if (!reported) {
	freelog(LOG_ERROR,
		_("Paths longer than 99 turns are not supported.\n"
		  "Report this bug at %s"), BUG_URL);
	reported = TRUE;
      }
      tens = units = 9;
    } else {
      tens = (length / 10) % NUM_TILES_DIGITS;
      units = length % NUM_TILES_DIGITS;
    }

    ADD_SPRITE_SIMPLE(t->sprites.path.turns[units]);
    if (tens > 0) {
      ADD_SPRITE_SIMPLE(t->sprites.path.turns_tens[tens]);
    }
  }

  return sprs - saved******
  Fill in the sprite array for the given tile, city, and unit.

  ptile, if specified, gives the tile.  If specified the terrain and specials
  will be drawn for this tile.  In this case (map_x,map_y) should give the
  location of the tile.

  punit, if specified, gives the unit.  For tile drawing this should
  generally be get_drawable_unit(); otherwise it can be any unit.

  pcity, if specified, gives the city.  For tile drawing this should
  generally be tile_city(ptile); otherwise it can be any city.

  citymode specifies whether this is part of a citydlg.  If so some drawing
  is done differently**/
int fill_sprite_array(struct tileset *t,
		      struct drawn_sprite *sprs, enum mapview_layer layer,
		      const struct tile *ptile,
		      const struct tile_edge *pedge,
		      const struct tile_corner *pcorner,
		      const struct unit *punit, const struct city *pcity,
		      const struct city *citymode)
{
  struct terrain *pterrain = NULL, *tterrain_near[8];
  bv_special tspecial, tspecial_near[8];
  int tileno, dir;
  struct drawn_sprite *save_sprs = sprs;
  struct player *owner = NULL;
  struct base_type *pbase = NULL;

  if (ptile != NULL) {
    pbase = tile_get_base(ptile);
  }

  /* Unit drawing is disabled if the view options is turned off, but only
   * if we're drawing on the mapview. */
  bool do_draw_unit = (punit && (draw_units || !ptile
				 || (draw_focus_unit
				     && unit_is_in_focus(punit))));
  bool solid_bg = (solid_color_behind_units
		   && (do_draw_unit
		       || (pcity && draw_cities)
		       || (ptile && !draw_terrain)));

  if (citymode) {
    int count = 0, i, cx, cy;
    const struct tile *const *tiles = NULL;
    bool valid = FALSE;

    if (ptile) {
      tiles = &ptile;
      count = 1;
    } else if (pcorner) {
      tiles = pcorner->tile;
      count = NUM_CORNER_TILES;
    } else if (pedge) {
      tiles = pedge->tile;
      count = NUM_EDGE_TILES;
    }

    for (i = 0; i < count; i++) {
      if (tiles[i] && map_to_city_map(&cx, &cy, citymode, tiles[i])) {
	valid = TRUE;
	break;
      }
    }
    if (!valid) {
      return 0;
    }
  }

  if (ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
    build_tile_data(ptile,
		    &pterrain, &tspecial, tterrain_near, tspecial_near);
  }

  switch (layer) {
  case LAYER_BACKGROUND:
    /* Set up background color. */
    if (solid_color_behind_units) {
      if (do_draw_unit) {
	owner = unit_owner(punit);
      } else if (pcity && draw_cities) {
	owner = city_owner(pcity);
      }
    }
    if (owner) {
      ADD_SPRITE_SIMPLE(t->sprites.backgrounds.player[player_index(owner)]);
    } else if (ptile && !draw_terrain) {
      ADD_SPRITE_SIMPLE(t->sprites.backgrounds.background);
    }
    break;

  case LAYER_TERRAIN1:
    if (draw_terrain && !solid_bg
      && ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
      sprs += fill_terrain_sprite_layer(t, sprs, 0, ptile, tterrain_near);
    }
    break;

  case LAYER_TERRAIN2:
    if (draw_terrain && !solid_bg
      && ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
      sprs += fill_terrain_sprite_layer(t, sprs, 1, ptile, tterrain_near);
    }
    break;

  case LAYER_TERRAIN3:
    if (draw_terrain && !solid_bg
      && ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
      assert(MAX_NUM_LAYERS == 3);
      sprs += fill_terrain_sprite_layer(t, sprs, 2, ptile, tterrain_near);
    }
    break;

  case LAYER_WATER:
    if (ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
      if (draw_terrain && !solid_bg
       && terrain_has_flag(pterrain, TER_OCEANIC)) {
	for (dir = 0; dt->t, t->num_cardinal_tileset_dirs; i++) {
	  enum direction8 dir = t->cardinal_tileset_dirs[i];

	  if (contains_special(tspecial_near[dir], S_RIVER)
	      || terrain_has_flag(tterrain_near[dir], TER_OCEANIC)) {
	    tileno |= 1 << i;
	  }
	}
	ADD_SPRITE_SIMPLE(t->client_tile_get_known(ptile) != TILE_UNKNOWN) {
      sprs += fill_road_rail_sprite_array(t, client_tile_get_known(ptile) != TILE_UNKNOWN) {
      if (draw_specials) {
	if (tile_resource_is_valid(ptile)) {
	  ADD_SPRITE_SIMPLE(t->sprites.resource[resource_index(tile_resource(ptile))]);
	}
      }

      if (draw_fortress_airbase && pbase != NULL
          && t->sprites.bases[base_index(pbase)].background) {
        ADD_SPRITE_FULL(t->sprites.bases[base_index(pbase)].background);
      }

      if (draw_mines && contains_special(tspecial, S_MINE)
	  && t->sprites.drawing[terrain_index(pterrain)]->mine) {
	ADD_SPRITE_SIMPLE(t->sprites.drawing[terrain_index(pterrain)t->sprites.tx.village);
      }
    }
    break;

  case LAYER_GRID1:
    if (t->is_isometric) {
      sprs += fill_grid_sprite_array(t, draw_full_citybar && !solid_color_behind_units) {
	ADD_SPRITE(get_city_flag_sprite(t, pcity), TRUE,
		   FULL_TILE_X_OFFSET + t->city_flag_offset_x,
		   FULL_TILE_Y_OFFSET + t->city_flag_offset_y);
      }
      /* For iso-view the city.wall graphics include the full city, whereas
       * for non-iso view they are an overlay on top of the base city
       * graphic. */
      if (!t->is_isometric || !pcity->client.walls) {
	ADD_SPRITE_FULL(get_city_sprite(t->sprites.city.tile, pcity));
      }
      if (t->is_isometric && pcity->client.walls) {
	ADD_SPRITE_FULL(get_city_sprite(t->sprites.city.wall, pcity));
      }
      if (!draw_full_citybar && pcity->client.occupied) {
	ADD_SPRITE_FULL(get_city_sprite(t->sprites.city.occupied, pcity));
      }
      if (!t->is_isometric && pcity->client.walls) {
	ADD_SPRITE_FULL(get_city_sprite(t->sprites.city.wall, pcity));
      }
      if (pcity->client.unhappy) {
	ADD_SPRITE_FULL(t->sprites.city.disorder);
      }
    }
    break;

  case LAYER_SPECIAL2:
    if (ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
      if (draw_fortress_airbase && pbase != NULL
          && t->sprites.bases[base_index(pbase)].middleground) {
        ADD_SPRITE_FULL(t->sprites.bases[base_index(pbase)].middleground);
      }

      if (draw_pollution && contains_special(tspecial, S_POLLUTION)) {
	ADD_SPRITE_SIMPLE(t->t->t,  && !draw_full_citybar) {
      if (pcity->size >= 10) {
	ADD_SPRITE(t->sprites.city.size_tens[pcity->size / 10],
		   FALSE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET);
      }
      ADD_SPRITE(t->sprites.city.size[pcity->size % 10],
		 FALSE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET);
    }
    break;

  case LAYER_UNIT:
  case LAYER_FOCUS_UNIT:
    if (do_draw_unit && XOR(layer == LAYER_UNIT, unit_is_in_focus(punit))unit_is_in_focus(punit)
	  && t->t->t, sprs, punit, stacked, backdrop);
    }
    break;

  case LAYER_SPECIAL3:
    if (ptile && client_tile_get_known(ptile) != TILE_UNKNOWN) {
      if (draw_fortress_airbase && pbase != NULL
          && t->sprites.bases[base_index(pbase)].foregroundt->sprites.bases[base_index(pbase)].foreground);
      }
    }
    break;

  case LAYER_GRID2:
    if (!t->is_isometric) {
      sprs += fill_grid_sprite_array(t, sprs += fill_city_overlays_sprite_array(t, sprs, ptile, citymode);
    if (ptile && map_deco[tile_index(ptile)].crosshair > 0) {
      ADD_SPRITE_SIMPLE(t->sprites.user.attention);
    }
    break;

  case LAYER_CITYBAR:
    /* Nothing.  This is just a placeholder. */
    break;

  case LAYER_GOTO:
    if (ptile && goto_is_active()) {
      sprs += fill_goto_sprite_array(t, sprs, ptile, pedge, pcornervoid tileset_setup_city_tiles(struct tileset *t, int style)
{
  if (style == game.control.styles_count - 1) {

    /* Free old sprites */
    free_city_sprite(t->sprites.city.tile);
    free_city_sprite(t->sprites.city.wall);
    free_city_sprite(t->sprites.city.occupied);

    t->sprites.city.tile = load_city_sprite(t, "city");
    t->sprites.city.wall = load_city_sprite(t, "wall");
    t->sprites.city.occupied = load_city_sprite(t, "occupied");

    for (style = 0; style < game.control.styles_count; style++) {
      if (t->sprites.city.tile->styles[style].num_thresholds == 0) {
	freelog(LOG_FATAL, "City style \"%s\": no city graphics.",
		city_style_rule_name(style));
	exit(EXIT_FAILURE);
      }
      if (t->sprites.city.wall->styles[style].num_thresholds == 0) {
	freelog(LOG_FATAL, "City style \"%s\": no wall graphics.",
		city_style_rule_name(style));
	exit(EXIT_FAILURE);
      }
      if (t->sprites.city.occupied->styles[style].num_thresholds == 0) {
	freelog(LOG_FATAL, "City style \"%s\": no occupied graphics.",
		city_style_rule_name(style));
	exit(EXIT_FAILURE);
      }
    }const struct tileset *t)
{
  if (t->struct tileset *t)
{
  focus_unit_state = 0;
}

void focus_unit_in_combat(struct tileset *t)
{
  if (!t->sprites.unit.select[0]) {
    reset_focus_unit_state(tstruct tileset *t)
{
  focus_unit_state++;
  if (t->const struct tileset *t,
			       struct tile *ptile,
			       const struct city *citymode)
{
  struct unit *punit = find_visible_unit(ptile);

  if (!punit)
    return NULL;

  if (citymode && unit_owner(punit) == city_owner(citymode))
    return NULL;

  if (!unit_is_in_focus(punit)
      || t->sprites.unit.select[0] || focus_unit_state == 0)
    return punit;
  else
  **
  This patch unloads all sprites from the sprite hash (the hash itself
  is left intact)**/
static void unload_all_sprites(struct tileset *t)
{
  if (t->sprite_hash) {
    int i, entries = hash_num_entries(t->sprite_hash);

    for (i = 0; i < entries; i++) {
      const char *tag_name = hash_key_by_number(t->sprite_hash, i);
      struct small_sprite *ss = hash_lookup_data(t->sprite_hash, tag_name);

      while (ss->ref_count > 0) {
	unload_sprite(t, tag_name);
      }
    }../
void tileset_free_tiles(struct tileset *t)
{
  int i;

  freelog(LOG_DEBUG, "tilespec_free_tiles");

  unload_all_sprites(t);

  free_city_sprite(t->sprites.city.tile);
  t->sprites.city.tile = NULL;
  free_city_sprite(t->sprites.city.wall);
  t->sprites.city.wall = NULL;
  free_city_sprite(t->sprites.city.occupied);
  t->sprites.city.occupied = NULL;

  if (t->sprite_hash) {
    const int entries = hash_num_entries(t->sprite_hash);

    for (i = 0; i < entries; i++) {
      const char *key = hash_key_by_number(t->sprite_hash, 0);

      hash_delete_entry(t->sprite_hash, key);
    }

    hash_free(t->sprite_hash);
    t->sprite_hash = NULL;
  }

  small_sprite_list_iterate(t->small_sprites, ss) {
    small_sprite_list_unlink(t->t->specfiles, sf) {
    specfile_list_unlink(t->iterate(&t->sprites.city.worked_tile_overlay, psprite) {
    free_sprite(*psprite);
  } sprite_vector_iterate_end;
  sprite_vector_free(&t->sprites.city.worked_tile_overlay);

  sprite_vector_iterate(&t->sprites.city.unworked_tile_overlay, psprite) {
    free_sprite(*psprite);
  } sprite_vector_iterate_end;
  sprite_vector_free(&t->sprites.city.unworked_tile_overlay);

  for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) {
    if (t->sprites.backgrounds.player[i]) {
      free_sprite(t->sprites.backgrounds.player[i]);
      t->sprites.backgrounds.player[i] = NULL;
    }
  }

  if (t->sprites.tx.fullfog) {
    free(t->sprites.tx.fullfog);
    t->sprites.tx.fullfog = NULL;
  }
  if (t->sprites.backgrounds.background) {
    free_sprite(t->sprites.backgrounds.background);
    t->sprites.backgrounds.background = NULL;
  }

  sprite_vector_free(&t->sprites.colors.overlays);
  sprite_vector_free(&t->sprites.explode.unit);
  sprite_vector_free(&t->sprites.nation_flag);
  sprite_vector_free(&t->sprites.nation_shield);
  sprite_vector_free(&t->sprites.citybar.occupancy);****
  Return the sprite for drawing the given spaceship part *get_spaceship_sprite(const struct tileset *t,
				    enum spaceship_part part)
{
  return t->sprites.spaceship[part];sprite *get_citizen_sprite(const struct tileset *t,
				  enum citizen_categoryconst struct citizen_graphic *graphic;

  if (type < CITIZEN_SPECIALIST) {
    assert(type >= 0);
    graphic = &t->sprites.citizen[type];
  } else {
    assert(type < (CITIZEN_SPECIALIST + SP_MAX));
    graphic = &t->sprites.specialist[type - CITIZEN_SPECIALISTthe sprite for the nat *get_nation_flag_sprite(const struct tileset *t,
				      const struct nation_type *pnation)
{
  return t->sprites.nation_flag.p[nation_index(pnation)];****
  Return the sprite for the technology/advance *get_tech_sprite(const struct tileset *t, Tech_type_id tech)
{
  if (tech < 0 || tech >= advance_count()) {
    assert(0);
    return NULL;
  }
  return t->sprites.tech[tech];****
  Return the sprite for the building/improvement *get_building_sprite(const struct tileset *t,
				   struct impr_type *pimprove)
{
  if (!pimprove) {
    assert(0);
    return NULL;
  }
  return t->sprites.building[improvement_index(pimprove)];******
  Return the sprite for the government**/
struct sprite *get_government_sprite(const struct tileset *t,
				     const struct government *gov)
{
  if (!gov) {
    assert(0);
    return NULL;
  }
  return t->sprites.government[government_index(gov)];******
  Return the sprite for the unit type (the base "unit" sprite)**/
struct sprite *get_unittype_sprite(const struct tileset *t,
				   const struct unit_type *punittype)
{
  if (!punittype) {
    assert(0);
    return NULL;
  }
  return t->sprites.unittype[utype_index(punittype)];****
  Return a "sample" sprite for this city style *get_sample_city_sprite(const struct tileset *t,
				      int city_style)
{
  int num_thresholds = t->sprites.city.tile->styles[city_style].num_thresholds;

  if (num_thresholds == 0) {
    return NULL;
  } else {
    return (t->sprites.city.tile->styles[city_style]
	    .thresholds[num_thresholds - 1].sprite****
  Return a sprite with an "arrow" theme graphic *get_arrow_sprite(const struct tileset *t,
				enum arrow_type arrow)
{
  assert(arrow >= 0 && arrow < ARROW_LAST);

  return t->sprites.arrow[arrow];sprite *get_tax_sprite(const struct tileset *t, t->sprites.tax_science;
  case O_GOLD:
    return t->sprites.tax_gold;
  case O_LUXURY:
    return t->sprite *get_treaty_thumb_sprite(const struct tileset *t, bool on_off)
{
  return t->const struct sprite_vector *get_unit_explode_animation(const struct
						       tileset *t)
{
  return &t->sprites.explode.unit;******
  Return a sprite contining the single nuke graphic.

  TODO: This should be an animation like the unit explode animat**/
struct sprite *get_nuke_explode_sprite(const struct tileset *t)
{
  return t->sprites.explode.nuke;****
  Return all the sprites used for citybar drawingconst struct citybar_sprites *get_citybar_sprites(const struct tileset *t)
{
  if (draw_full_citybar) {
    return &t->sprites.citybar;
  } else {
    return NULL 
  A cursor can consist of several frames to be used for animat *get_cursor_sprite(const struct tileset *t,
				 enum cursor_type cursor,
				 int *hot_x, int *hot_y, int frame)
{
  *hot_x = t->sprites.cursor[cursor].hot_x;
  *hot_y = t->sprites.cursor[cursor].hot_y;
  return t->sprites.cursor[cursor].frame[frame];******
  Return a sprite for the given icon.  Icons are used by the operating
  system/window manager.  Usually freeciv has to tell the OS what icon to
  use.

  Note that this function will return NULL before the sprites are loaded.
  The GUI code must be sure to call tileset_load_tiles before setting the
  top-level ic**/
struct sprite *get_icon_sprite(const struct tileset *t, enum icon_type icon)
{
  return t->sprites.icon[icon];sprite *get_attention_crosshair_sprite(const struct tileset *t)
{
  return t->sprites.user.attention;******
  Returns a sprite for the given indicator with the given index.  The
  index should be in [0, NUM_TILES_PROGRESS)**/
struct sprite *get_indicator_sprite(const struct tileset *t,
				    enum indicator_type indicator,
				    int index)
{
  index = CLIP(0, index, NUM_TILES_PROGRESS - 1);
  assert(indicator >= 0 && indicator < INDICATOR_COUNT);
  return t->sprites.indicator[indicator][index];******
  Return a sprite for the unhappiness of the unit - to be shown as an
  overlay on the unit in the city support dialog, for instance.

  May return NULL if there's no unhappiness**/
struct sprite *get_unit_unhappy_sprite(const struct tileset *t,
				       const struct unit *punit,
				       int happy_cost)
{
  const int unhappy = CLIP(0, happy_cost, 2);

  if (unhappy > 0) {
    return t->sprites.upkeep.unhappy[unhappy - 1];
  } else {
    return NULL******
  Return a sprite for the upkeep of the unit - to be shown as an overlay
  on the unit in the city support dialog, for instance.

  May return NULL if there's no unhappiness**/
struct sprite *get_unit_upkeep_sprite(const struct tileset *t,
				      Output_type_id otype,
				      const struct unit *punit,
				      const int *upkeep_cost)
{
  const int upkeep = CLIP(0, upkeep_cost[otype], 2);

  if (upkeep > 0) {
    return t->sprites.upkeep.output[otype][upkeep - 1];
  } else {
    return NULL******
  Return a rectangular sprite containing a fog "color".  This can be used
  for drawing fog onto arbitrary areas (like the overview)**/
struct sprite *get_basic_fog_sprite(const struct tileset *t)
{
  return t->sprites.tx.fog;******
  Return the tileset's color system**/
struct color_system *get_color_system(const struct tileset *t)
{
  return t->color_system;******
  Loads prefered theme if there's any**/
void tileset_use_prefered_theme(const struct tileset *t)
{
  int i;
    
  for (i = 0; i < t->num_prefered_themes; i++) {
    if (strcmp(t->prefered_themes[i], default_theme_name)) {
      if (popup_theme_suggestion_dialog(t->prefered_themes[i])) {
        freelog(LOG_DEBUG, "trying theme \"%s\".", t->prefered_themes[i]);
        if (load_theme(t->prefered_themes[i])) {
          sz_strlcpy(default_theme_name, t->prefered_themes[i]);
          return;
        }
      }
    }
  }
  freelog(LOG_VERBOSE, "The tileset doesn't specify prefered themes or "
                       "none of prefered themes can be used. Using system "
		       "default");
  gui_clear_theme();******
  Initialize tileset structure*****/
void tileset_init(struct tileset *t)
{
  /* We currently have no city sprites loaded. */
  t->sprites.city.tile     = NULL;
  t->sprites.city.wall     = NULL;
  t->sprites.city.occupied = NULL;
}
ENDREP
DELTA 13354 36036 2970
SVN  ‚½l‚Ì‚aš Š  ‹	Š— ‹[•G€‚w }¡?€ …;¢j€r ´&¨?† ‚"çmš …	ß)† ‚ä3 (æD† ‚çl ˆ.éz… ‚Fò(† .ôhŒ ‚)ò/œ 2øVŒ ‚)ò/œ ‰@üHˆ „y†€D mÙ@€f xÙ@§ ÇOŠ' Š]Ñv€s 7Ý5¾ 
ë€[ ‚nì€ „bð&¨ Kõ0¤ Tõ0 v÷s ùp€ >ü „ý^¼ \‚‚)€o ‚ƒz€, U‚ƒz d‚‡ª ƒb‚ˆ-€G 
‚b€  C‚~€	 3‚‘P¤ ƒ6‚“'€b s‚—E ‚F‚™? ‡‚œ® c‚£a€‚y ‚y‚¦ ‚‚©œ Š'‚«>€L G‚¶O …O‚¸head_of_units_in_focus(_TRANSPORTER:
      key_unit_unload_all();
      break;
    case ID_UNIT_ORDER_LOAD:
      unit_list_iterate(get_units_in_focus(), punit) {
        request_unit_load(punit, NULL);
      } unit_list_iterate_end;
      break;
    case ID_UNIT_ORDER_UNLOAD:
      unit_list_iterate(get_units_in_focus(), punit) {
        request_unit_unload(punit);
      } unit_list_iterate_end_SETTLER:
      unit_list_iterate(get_units_in_focus(), punit) {
        request_unit_autosettlers(punit);
      } unit_list_iterate_endunit_list_iterate(get_units_in_focus(), punit) {
        request_unit_return(punit);
      } unit_list_iterate_endCtrl+Uu;
  pBuf->mod = KMOD_CTRLCtrl+Gmod = KMOD_CTRLShift+mod = KMOD_SHIFTCtrl+CTRL |Ctrl+Shift+Rr;
  pBuf->mod = KMOD_CTRL |Ctrl+Shift+Ll;
  pBuf->mod = KMOD_CTRL |_SETTLER Transporter"), "Shift+U");
  pBuf = create_themeicon(pTheme->OUnloamod = KMOD_SHIFT;
  pBuf->key = SDLK_u;
  add_to_gui_list(ID_UNIT_ORDER_UNLOAD_TRANSPORTER, pBuf);
  /* --------- */

  /* Load */
  my_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Load"), "L");
  pBuf = create_themeicon(pTheme->OLoal;
  add_to_gui_list(ID_UNIT_ORDER_LOADs_list *punits = NULL;
  struct unit *pUnit = NULL;
  static char cBuf[128];
  
  if ((C_S_RUNNING != client_state()units = get_units_in_focus();
    pUnit = unit_list_get(punitsstruct city *pCity = tile_city(pTile);
      struct terrain *pTerrain = tile_terrain(pTile)City) {
	  my_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Add to City"), "B");
	} else {
	  my_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Build New City"), "B (%s) %d %s",
			_("Build Railroad"), "R (%s) %d %s",
			_("Build Road"), "RCCity)) {
	int revenue = get_caravan_enter_city_trade_bonus(pHomecity, pCity);
	
        if (can_establish_trade_route(pHomecity, pCCerrain), "Forest") ||
          !strcmp(terrain_rule_name(pT (%s) %d %s",
			_("Cut Down to"),
                terrain_name_translation(pTerrain->irrigation_result)
			,"Ierrain), "Swamp")) {
	  my_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
			_("Irrigate to"),
                terrain_name_translation(pTerrain->irrigation_result)
			,"I (%s) %d %s",
			_("Build Irrigation"), "Ierrain), "Forest")) {  
	  /* set Irrigate Icon -> make swamp */
	  my_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
			_("Irrigate to"),
			terrain_name_translation(pTerrain->mining_result)
			,"Merrain), "Jungle") ||
              !strcmp(terrain_rule_name(pTerrain), "Plains") ||
              !strcmp(terrain_rule_name(pTerrain), "Swamp")) {
	  /* set Forest Icon -> plant Forrest*/
	  my_snprintf(cBuf, sizeof(cBuf),"%s (%s) %d %s",
			_("Plant Forest"), "M (%s) %d %s",
			_("Build Mine"), "M (%s) %d %s",
	  _("Transform to"),
	  terrain_name_translation(pTerrain->transform_result),
			"MCCCity && can_unit_change_homecity(pUnit)
	&& pC_TRANSPORTER);
      } else {
	local_hide(ID_UNIT_ORDER_UNLOAD_TRANSPORTER);
      }

      if (units_can_load(punits)) {
        local_show(ID_UNIT_ORDER_LOAD);
      } else {
        local_hide(ID_UNIT_ORDER_LOAD);
      }

      if (units_can_unload(punits)) {
        local_show(ID_UNIT_ORDER_UNLOAD);
      } else {
        local_hide(ID_UNIT_ORDER_UNLOAD);
      }
       (%s)", _("Auto-Settler"), "A (%s)", _("Auto-Attack"), "ACity && has_city_airport(pCity) && pCity->airlift) {*/
      if (pCity && pCCENDREP
DELTA 14055 20020 1289
SVN  †ƒ†‚44 Ý  €^ IÝ| ‚WÞtš ‚áwŸ ƒ“Z‚ï(client_state() != value);

  if (C_S_PREPARING == client_state()
      && C_S_RUNNING == valueC_S_RUNNING == client_state()C_S_OVER == client_state()C_S_PREPARING == client_state()ENDREP
DELTA 13899 20355 189
SVN  ‚†d‚†a? Ç~ Ÿ %± &±~ ¿%Ê‘ ü4Š0_S_PREPARING);
  return (True);ui_init(void)
{unit_owner(punit)ENDREP
DELTA 13513 8750 82
SVN  ••JX  €X „f s”#enum server_states server_state(void);
void set_server_state(enum server_states newstateENDREP
DELTA 13349 0 343
SVN  ‡‡k.8 ž!  gž?Š ƒV > ‡[¤2 ƒ|¬+ ¬s°E „)ÝV ¥bâS_S_RUNNING == server_state()_S_RUNNINGS_S_INITIAL == server_state()S_S_RUNNING == server_state()S_S_RUNNING != server_state()S_S_RUNNING == server_state()S_S_INITIAL == server_state()ENDREP
DELTA 13356 0 358
SVN  öõo+ –p Ÿ 	—Œ ÝK˜8C_S_PREPARING == client_state()_S_PREPARINGENDREP
DELTA 13356 3677 1986
SVN  ó]óen ’c  ¡T’l€m ½@¶-()) {
  case S_S_INITIAL:
    sz_strlcpy(state, "Pregame");
    break;
  case S_S_RUNNING:
    sz_strlcpy(state, "Running");
    break;
  case S_S_OVER:
    sz_strlcpy(state, "Game Ended");
    break;
  case S_S_GENERATING_WAITING_UNUSEDENDREP
id: vg.0.r14120/163344
type: file
pred: vg.0.r13995/6694
count: 360
text: 14120 44890 4852 66565 17692a1690707fe859681e9b2415e271
props: 11057 12128 112 0 85dbe778568e34751643d476c23a0d7c
cpath: /trunk/server/srv_main.c
copyroot: 0 /

id: vh.0.r14120/163579
type: file
pred: vh.0.r13513/10083
count: 43
text: 14120 162542 114 2762 426d3954575cd8dcccc80be121e04fa3
props: 10857 1151 111 0 7a0697bf766451f41e947e71ce1310bc
cpath: /trunk/server/srv_main.h
copyroot: 0 /

id: 2dw.0.r14120/163812
type: file
pred: 2dw.0.r13349/373
count: 67
text: 14120 162683 244 17387 bc2a98e88fc5415551468af9a80eafa4
props: 11086 310 111 0 e5ad8d36ef6bfd356bb06d6f3ece066f
cpath: /trunk/server/connecthand.c
copyroot: 0 /

id: 4g.0.r14120/164048
type: file
pred: 4g.0.r14055/22842
count: 392
text: 14120 1472 3686 76340 b045bef876562587e07ea4a9204176cf
props: 10971 452 112 0 14688860b403b675ea6c3d1b6f5d2330
cpath: /trunk/server/citytools.c
copyroot: 0 /

id: 13.0.r14120/164282
type: file
pred: 13.0.r14055/23076
count: 210
text: 14120 39238 5538 69290 093c4236af6a078f9226a43d1557ff86
props: 10990 3093 112 0 0e7b2145f04ad4ce4f4fdbad497f598c
cpath: /trunk/server/maphand.c
copyroot: 0 /

id: 4s.0.r14120/164516
type: file
pred: 4s.0.r13496/8294
count: 74
text: 14120 163047 268 14821 f9e29f4bad6f4d99195e1a8bb51dfba9
props: 11087 3026 111 0 c246f5509cfd811186cfd3230be7c3ab
cpath: /trunk/server/meta.c
copyroot: 0 /

id: 15.0.r14120/164745
type: file
pred: 15.0.r13489/3991
count: 153
text: 14120 13037 1054 36058 160ed64145b03b257e0e2019de448963
props: 10956 5264 112 0 3b4f53580729e091747f5670a0f86c52
cpath: /trunk/server/sernet.c
copyroot: 0 /

id: 4y.0.r14120/164977
type: file
pred: 4y.0.r12484/7852
count: 13
text: 14120 21531 209 1389 cdead900139d406da27bfff414c4b15a
props: 8659 14374 111 0 b491beec13ba952c0167e367d3cb48d2
cpath: /trunk/server/sernet.h
copyroot: 0 /

id: 4z.0.r14120/165206
type: file
pred: 4z.0.r13948/116134
count: 470
text: 14120 25267 1664 152003 bac5cf79afd9a1088568f3043535252f
props: 11087 3718 112 0 d0e5ada95c1c714385b6751e38a4f15d
cpath: /trunk/server/stdinhand.c
copyroot: 0 /

id: vl.0.r14120/165444
type: file
pred: vl.0.r14055/24012
count: 350
text: 14120 35532 1702 162754 f0610bb3f824902319455bd7981edf97
props: 11092 74 112 0 de3988801a325e2d7d51fcbc7209a255
cpath: /trunk/server/savegame.c
copyroot: 0 /

id: 4u.0.r14120/165678
type: file
pred: 4u.0.r13948/116601
count: 458
text: 14120 35189 313 63572 505f5d4beb5f8da432f9a3e72762396b
props: 11057 14272 112 0 ab87823e529bcaae2ff952f918d53839
cpath: /trunk/server/plrhand.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 21
file 5q.0.r13780/1316
K 9
airgoto.c
V 22
file 160.0.r12750/6124
K 9
airgoto.h
V 22
file 161.0.r12750/6355
K 6
auth.c
V 22
file 39c.0.r14093/8340
K 6
auth.h
V 23
file 39d.0.r13513/10535
K 11
barbarian.c
V 23
file lw.0.r13948/114019
K 11
barbarian.h
V 21
file lx.0.r13220/1454
K 10
cityhand.c
V 19
file 10.0.r13923/65
K 10
cityhand.h
V 23
file 4f.0.r13297/423686
K 11
citytools.c
V 23
file 4g.0.r14120/164048
K 11
citytools.h
V 23
file 4h.0.r13297/426253
K 10
cityturn.c
V 23
file 4i.0.r13948/113783
K 10
cityturn.h
V 22
file 4j.0.r11590/32928
K 11
civserver.c
V 21
file 4k.0.r13513/9626
K 11
civserver.h
V 21
file 4l.0.r2805/33121
K 10
commands.c
V 22
file 2ly.0.r13258/3875
K 10
commands.h
V 22
file 2lz.0.r12738/3399
K 13
connecthand.c
V 24
file 2dw.0.r14120/163812
K 13
connecthand.h
V 23
file 2dx.0.r11356/12433
K 9
console.c
V 21
file dd.0.r11144/6041
K 9
console.h
V 21
file de.0.r11697/6876
K 10
diplhand.c
V 22
file 4m.0.r13927/53741
K 10
diplhand.h
V 22
file 4n.0.r13567/27963
K 11
diplomats.c
V 23
file vz.0.r13948/115192
K 11
diplomats.h
V 22
file w0.0.r13567/28426
K 10
edithand.c
V 24
file 3bk.0.r13948/114956
K 10
gamehand.c
V 23
file 4o.0.r13948/114254
K 10
gamehand.h
V 21
file 4p.0.r12456/4365
K 9
generator
V 23
dir 2me.0.r13948/112390
K 11
ggzserver.c
V 23
file 39a.0.r12670/12494
K 11
ggzserver.h
V 23
file 39b.0.r12670/13043
K 10
gotohand.c
V 23
file 11.0.r13948/110294
K 10
gotohand.h
V 23
file 7r.0.r13948/112621
K 10
handchat.c
V 21
file 4q.0.r10956/2557
K 10
handchat.h
V 22
file dj.0.r7100/189089
K 9
maphand.c
V 23
file 13.0.r14120/164282
K 9
maphand.h
V 22
file 14.0.r14055/23310
K 6
meta.c
V 23
file 4s.0.r14120/164516
K 6
meta.h
V 21
file 4t.0.r13258/4570
K 9
plrhand.c
V 23
file 4u.0.r14120/165678
K 9
plrhand.h
V 22
file 4v.0.r13567/29348
K 8
report.c
V 21
file vi.0.r13343/8641
K 8
report.h
V 21
file vj.0.r10414/9434
K 9
ruleset.c
V 22
file 8w.0.r13939/68133
K 9
ruleset.h
V 22
file 8x.0.r13895/80296
K 13
sanitycheck.c
V 22
file wi.0.r14055/23777
K 13
sanitycheck.h
V 21
file wj.0.r8119/11096
K 10
savegame.c
V 23
file vl.0.r14120/165444
K 10
savegame.h
V 21
file vm.0.r10073/2584
K 7
score.c
V 24
file 2eg.0.r13948/112852
K 7
score.h
V 22
file 2eh.0.r11430/3487
K 9
scripting
V 21
dir 31x.0.r13602/9707
K 8
sernet.c
V 23
file 15.0.r14120/164745
K 8
sernet.h
V 23
file 4y.0.r14120/164977
K 10
settings.c
V 21
file 2m0.0.r14095/782
K 10
settings.h
V 22
file 2m1.0.r10846/4216
K 10
settlers.c
V 23
file 7s.0.r13948/113319
K 10
settlers.h
V 23
file 7t.0.r13948/113555
K 11
spacerace.c
V 23
file 9a.0.r13133/212819
K 11
spacerace.h
V 21
file 9b.0.r11338/1129
K 10
srv_main.c
V 23
file vg.0.r14120/163344
K 10
srv_main.h
V 23
file vh.0.r14120/163579
K 11
stdinhand.c
V 23
file 4z.0.r14120/165206
K 11
stdinhand.h
V 21
file 50.0.r12637/7365
K 11
techtools.c
V 21
file 33n.0.r13640/187
K 11
techtools.h
V 22
file 33o.0.r11130/1173
K 10
unithand.c
V 23
file 18.0.r13948/115900
K 10
unithand.h
V 21
file 19.0.r10368/4183
K 11
unittools.c
V 22
file 1a.0.r14055/23542
K 11
unittools.h
V 21
file 1b.0.r13577/4556
END
ENDREP
id: z.0.r14120/168987
type: dir
pred: z.0.r14095/4069
count: 3386
text: 14120 165913 3061 3061 9dde8840399b192a307a25ccb63977f0
props: 13933 1750 123 0 2b883b78ac685994a9940e39e0d24770
cpath: /trunk/server
copyroot: 0 /

id: 3v.0.r14120/169208
type: file
pred: 3v.0.r13343/12603
count: 216
text: 14120 37531 653 11214 2f62df73985c577ce2379e28bf644966
props: 11057 32714 112 0 2cf57fb6d11b8ba51814c6d419f0189e
cpath: /trunk/common/game.h
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 23
file 5h.0.r13948/126380
K 6
aicore
V 21
dir 18t.0.r13960/7926
K 6
base.c
V 24
file 3jw.0.r13948/120124
K 6
base.h
V 23
file 3jx.0.r13193/15954
K 8
capstr.c
V 21
file dv.0.r12017/6110
K 8
capstr.h
V 21
file dw.0.r1356/11833
K 6
city.c
V 21
file q.0.r14055/27521
K 6
city.h
V 23
file 3q.0.r13948/121272
K 8
combat.c
V 23
file wp.0.r13948/120811
K 8
combat.h
V 21
file wq.0.r12783/4096
K 12
connection.c
V 22
file un.0.r13356/32015
K 12
connection.h
V 21
file uo.0.r11775/7278
K 8
dataio.c
V 23
file 15r.0.r13567/33297
K 8
dataio.h
V 23
file 15s.0.r10480/10050
K 11
diptreaty.c
V 22
file 3r.0.r13567/33762
K 11
diptreaty.h
V 22
file 3s.0.r13567/34454
K 9
effects.c
V 24
file 2eo.0.r13948/124451
K 9
effects.h
V 23
file 2ep.0.r13588/11506
K 8
events.c
V 20
file 33h.0.r14115/61
K 8
events.h
V 22
file 3t.0.r13567/34228
K 10
fc_types.h
V 24
file 2ll.0.r13948/124684
K 6
game.c
V 20
file 3u.0.r13466/565
K 6
game.h
V 23
file 3v.0.r14120/169208
K 19
generate_packets.py
V 21
file 2f4.0.r13517/616
K 12
government.c
V 22
file he.0.r13247/25540
K 12
government.h
V 22
file hf.0.r13136/24006
K 6
idex.c
V 23
file qo.0.r13024/189431
K 6
idex.h
V 21
file qp.0.r8119/15235
K 13
improvement.c
V 23
file vb.0.r13297/433063
K 13
improvement.h
V 23
file vc.0.r13297/433301
K 5
map.c
V 21
file r.0.r14055/29370
K 5
map.h
V 23
file 41.0.r13948/125912
K 10
movement.c
V 24
file 2xv.0.r13948/123286
K 10
movement.h
V 21
file 2xw.0.r12837/901
K 8
nation.c
V 22
file il.0.r13136/24703
K 8
nation.h
V 22
file im.0.r13227/10406
K 9
packets.c
V 20
file 43.0.r13456/276
K 11
packets.def
V 23
file 2f5.0.r13910/17917
K 9
packets.h
V 23
file 44.0.r13297/432831
K 8
player.c
V 22
file 45.0.r14055/28445
K 8
player.h
V 22
file 46.0.r14055/28678
K 14
requirements.c
V 24
file 2wq.0.r13948/126141
K 14
requirements.h
V 23
file 2wr.0.r13588/11976
K 11
spaceship.c
V 20
file 98.0.r9977/2632
K 11
spaceship.h
V 20
file 99.0.r9977/2979
K 12
specialist.c
V 23
file 33f.0.r13169/67171
K 12
specialist.h
V 23
file 33g.0.r13169/67406
K 6
team.c
V 23
file 33i.0.r13136/22843
K 6
team.h
V 23
file 33j.0.r13136/23073
K 6
tech.c
V 20
file t.0.r13614/8061
K 6
tech.h
V 22
file u.0.r13297/434239
K 9
terrain.c
V 23
file 2fp.0.r14055/28209
K 9
terrain.h
V 23
file qs.0.r13948/124221
K 6
tile.c
V 23
file 2ys.0.r14055/27750
K 6
tile.h
V 23
file 2yt.0.r14055/27980
K 6
unit.c
V 22
file v.0.r13948/120353
K 6
unit.h
V 23
file 48.0.r13948/120581
K 10
unitlist.c
V 24
file 39m.0.r13133/225391
K 10
unitlist.h
V 23
file 39n.0.r13906/18659
K 10
unittype.c
V 23
file v9.0.r13297/433764
K 10
unittype.h
V 23
file va.0.r13297/434002
K 9
version.c
V 21
file oe.0.r13518/7663
K 9
version.h
V 21
file e7.0.r13518/7887
K 8
vision.c
V 23
file 4dk.0.r14055/28911
K 8
vision.h
V 23
file 4dl.0.r14055/29141
K 10
worklist.c
V 23
file o8.0.r13297/437651
K 10
worklist.h
V 23
file o9.0.r13297/438357
END
ENDREP
id: p.0.r14120/172309
type: dir
pred: p.0.r14115/3153
count: 2383
text: 14120 169439 2857 2857 81edc865fde2ded3c9559f330cd49f36
props: 12883 2571 96 0 2763e13ff5d021346ae24ff6c9ced232
cpath: /trunk/common
copyroot: 0 /

id: zh.0.r14120/172529
type: file
pred: zh.0.r13024/198499
count: 35
text: 14120 23008 126 24309 76b056563a1f2988f97d530678fa8d93
props: 10755 60573 111 0 1767e81bb248f04892a3d72080d82dc5
cpath: /trunk/client/agents/agents.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file zg.0.r13602/20434
K 8
agents.c
V 23
file zh.0.r14120/172529
K 8
agents.h
V 22
file zi.0.r8387/119237
K 10
cma_core.c
V 22
file zj.0.r13906/24289
K 10
cma_core.h
V 20
file zk.0.r8132/2370
K 9
cma_fec.c
V 23
file zl.0.r13297/450850
K 9
cma_fec.h
V 20
file zm.0.r8132/1669
K 5
sha.c
V 24
file 2fy.0.r13948/134914
K 5
sha.h
V 23
file 2fz.0.r9577/101433
END
ENDREP
id: zf.0.r14120/173162
type: dir
pred: zf.0.r13948/135543
count: 135
text: 14120 172769 380 380 2a29cd40bdc66cbd300ad11d858b5d26
props: 11108 11608 65 0 c67827893bff2f279fa7f0439c4cba47
cpath: /trunk/client/agents
copyroot: 0 /

id: gz.0.r14120/173391
type: file
pred: gz.0.r14114/7428
count: 223
text: 14120 35075 88 89713 b6d5b562b33fc6043536f6f2b44be482
props: 11088 7720 112 0 89a05fc93c37a832d4b63085dac12c4b
cpath: /trunk/client/control.c
copyroot: 0 /

id: 10k.0.r14120/173622
type: file
pred: 10k.0.r14114/7654
count: 176
text: 14120 15264 6238 60777 008bfff4f70f7ac76a3c80845c026a0a
props: 11057 38870 112 0 ec3aa248409009be6c82cab2c7e95ef5
cpath: /trunk/client/gui-gtk-2.0/gui_main.c
copyroot: 0 /

id: 10z.0.r14120/173871
type: file
pred: 10z.0.r14102/5046
count: 105
text: 14120 27392 96 54094 8c31bf6bcf0d4f26ea5f59a47dcc4f25
props: 11057 39977 111 0 05d0c9433d86d9823b0e8b2536eb2299
cpath: /trunk/client/gui-gtk-2.0/menu.c
copyroot: 0 /

id: 108.0.r14120/174114
type: file
pred: 108.0.r14102/5528
count: 140
text: 14120 37373 128 42035 a56a2bb3f84bc221400d85e2b934754d
props: 11088 8070 112 0 858133ad234580a5fc7c24a791c3b702
cpath: /trunk/client/gui-gtk-2.0/dialogs.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file zu.0.r13602/21290
K 8
canvas.c
V 23
file 2y6.0.r10518/13194
K 8
canvas.h
V 23
file 2y7.0.r10096/14437
K 16
caravan_dialog.c
V 24
file 376.0.r13297/453169
K 10
chatline.c
V 22
file zw.0.r9577/108991
K 10
chatline.h
V 22
file zx.0.r9577/109355
K 15
choice_dialog.c
V 23
file 377.0.r13481/22903
K 15
choice_dialog.h
V 23
file 378.0.r12670/99360
K 9
citydlg.c
V 20
file zy.0.r14018/528
K 9
citydlg.h
V 20
file zz.0.r5493/6351
K 9
cityrep.c
V 22
file 100.0.r14102/5289
K 9
cityrep.h
V 22
file 101.0.r9098/11480
K 8
cma_fe.c
V 22
file 102.0.r11771/9226
K 8
cma_fe.h
V 23
file 103.0.r10181/13675
K 8
colors.c
V 22
file 104.0.r10458/4290
K 8
colors.h
V 22
file 105.0.r10458/4652
K 12
connectdlg.c
V 22
file 106.0.r10804/2737
K 12
connectdlg.h
V 21
file 107.0.r7580/6878
K 9
dialogs.c
V 24
file 108.0.r14120/174114
K 9
dialogs.h
V 22
file 109.0.r11212/7101
K 10
diplodlg.c
V 23
file 10a.0.r13567/40813
K 10
diplodlg.h
V 23
file 10b.0.r9577/108261
K 17
diplomat_dialog.c
V 21
file 36n.0.r14106/319
K 9
editdlg.c
V 21
file 3bi.0.r13600/876
K 9
editdlg.h
V 23
file 3bj.0.r12670/98777
K 9
finddlg.c
V 24
file 10c.0.r13133/240719
K 9
finddlg.h
V 22
file 2d0.0.r5989/22356
K 10
gamedlgs.c
V 25
file 10d.0.r13038/2044647
K 9
gotodlg.c
V 21
file 10e.0.r14018/765
K 9
gotodlg.h
V 23
file 10f.0.r4313/263426
K 10
graphics.c
V 23
file 10g.0.r11337/79662
K 10
graphics.h
V 23
file 10h.0.r11337/80150
K 12
gtkpixcomm.c
V 22
file 10i.0.r10800/1239
K 12
gtkpixcomm.h
V 22
file 10j.0.r10800/1606
K 10
gui_main.c
V 24
file 10k.0.r14120/173622
K 10
gui_main.h
V 23
file 10l.0.r13227/14336
K 11
gui_stuff.c
V 22
file 10m.0.r11771/8499
K 11
gui_stuff.h
V 22
file 10n.0.r11771/8983
K 11
happiness.c
V 23
file 10o.0.r13927/70336
K 11
happiness.h
V 23
file 10p.0.r9577/106064
K 9
helpdlg.c
V 24
file 10q.0.r13297/454174
K 9
helpdlg.h
V 23
file 10r.0.r4313/267882
K 10
inputdlg.c
V 20
file 10s.0.r8860/225
K 10
inputdlg.h
V 21
file 10t.0.r7580/3991
K 10
inteldlg.c
V 24
file 10u.0.r13286/182228
K 10
inteldlg.h
V 23
file 2d1.0.r9577/108626
K 9
mapctrl.c
V 24
file 10v.0.r13948/137721
K 9
mapctrl.h
V 23
file 10w.0.r11337/80395
K 9
mapview.c
V 23
file 10x.0.r13604/20357
K 9
mapview.h
V 23
file 10y.0.r12881/17128
K 6
menu.c
V 24
file 10z.0.r14120/173871
K 6
menu.h
V 22
file 110.0.r4315/16581
K 12
messagedlg.c
V 23
file 111.0.r11771/10924
K 12
messagedlg.h
V 22
file 2d2.0.r5989/22693
K 12
messagewin.c
V 22
file 112.0.r14102/4804
K 12
messagewin.h
V 23
file 113.0.r10108/19424
K 11
optiondlg.h
V 23
file 114.0.r4313/264106
K 7
pages.c
V 24
file 2pi.0.r13133/239228
K 7
pages.h
V 22
file 2pj.0.r11863/8922
K 8
plrdlg.c
V 22
file 115.0.r14109/5260
K 8
plrdlg.h
V 22
file 116.0.r10803/7069
K 10
ratesdlg.h
V 22
file 2d3.0.r5989/22018
K 4
rc2c
V 23
file 117.0.r4313/274431
K 10
repodlgs.c
V 24
file 118.0.r13297/452917
K 10
repodlgs.h
V 21
file 119.0.r9098/9312
K 11
resources.c
V 23
file 11a.0.r5390/112550
K 11
resources.h
V 23
file 11b.0.r4313/267539
K 14
spaceshipdlg.c
V 24
file 11c.0.r13133/241213
K 14
spaceshipdlg.h
V 23
file 11d.0.r9577/110090
K 8
sprite.c
V 23
file 2y8.0.r10141/28169
K 8
sprite.h
V 23
file 2y9.0.r10141/29270
K 11
theme_dlg.c
V 23
file 47d.0.r13967/56448
K 8
themes.c
V 23
file 34x.0.r13227/13852
K 13
tileset_dlg.c
V 23
file 45i.0.r13967/56740
K 7
wldlg.c
V 22
file 11e.0.r13616/2081
K 7
wldlg.h
V 21
file 11f.0.r7682/2202
END
ENDREP
id: zs.0.r14120/177721
type: dir
pred: zs.0.r14114/11253
count: 1027
text: 14120 174360 3348 3348 ff9fcb90bb0cf1eae3852f7791f578a0
props: 11108 11912 79 0 480bb3268560e84c2d6c8376c422c65e
cpath: /trunk/client/gui-gtk-2.0
copyroot: 0 /

id: bm.0.r14120/177957
type: file
pred: bm.0.r13927/74901
count: 134
text: 14120 162407 106 33633 6e6d3c098daed98e8b62069ff905dce3
props: 10925 3549 112 0 177404f64081975a31585790400154e7
cpath: /trunk/client/gui-xaw/gui_main.c
copyroot: 0 /

id: 2qm.0.r14120/178200
type: file
pred: 2qm.0.r13133/246178
count: 8
text: 14120 28100 6948 8673 09b736e42a27464a943673015fcf2b8a
props: 10598 2663 110 0 fdfdab56f53d2388a66f6a5ce0985f95
cpath: /trunk/client/gui-xaw/pages.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file bq.0.r13602/25128
K 9
actions.c
V 22
file nt.0.r13221/16529
K 9
actions.h
V 21
file nu.0.r1888/21779
K 4
ad2c
V 22
file 9q.0.r1186/243967
K 8
canvas.c
V 21
file 9r.0.r3959/87925
K 8
canvas.h
V 20
file 9s.0.r4034/9073
K 9
canvasp.h
V 20
file 9t.0.r4034/8365
K 10
chatline.c
V 20
file 9u.0.r9160/4848
K 10
chatline.h
V 21
file 9v.0.r2187/10435
K 9
citydlg.c
V 23
file 9w.0.r13948/142047
K 9
citydlg.h
V 20
file 9x.0.r2187/8309
K 9
cityrep.c
V 23
file 9y.0.r13297/459948
K 9
cityrep.h
V 20
file g1.0.r5489/4916
K 8
cma_fe.c
V 21
file 2ei.0.r13148/376
K 8
cma_fe.h
V 21
file 2ej.0.r6908/4433
K 8
colors.c
V 21
file a2.0.r10532/8601
K 8
colors.h
V 21
file a3.0.r10532/9312
K 12
connectdlg.c
V 21
file a4.0.r11187/6858
K 12
connectdlg.h
V 21
file a5.0.r2187/12228
K 9
dialogs.c
V 22
file a6.0.r13227/18587
K 9
dialogs.h
V 21
file a7.0.r10882/3191
K 10
diplodlg.c
V 23
file a8.0.r13286/187072
K 10
diplodlg.h
V 20
file a9.0.r2187/7955
K 17
diplomat_dialog.c
V 22
file 37p.0.r14106/4153
K 9
finddlg.c
V 23
file aa.0.r13133/247876
K 9
finddlg.h
V 22
file 2dk.0.r5989/31562
K 9
gotodlg.c
V 23
file ab.0.r13133/245452
K 9
gotodlg.h
V 21
file ac.0.r1888/21069
K 10
graphics.c
V 23
file ad.0.r13297/460443
K 10
graphics.h
V 21
file ae.0.r10789/6338
K 10
gui_main.c
V 23
file bm.0.r14120/177957
K 10
gui_main.h
V 22
file bn.0.r11408/10219
K 11
gui_stuff.c
V 22
file bo.0.r6129/126486
K 11
gui_stuff.h
V 21
file bp.0.r4964/56392
K 9
helpdlg.c
V 23
file af.0.r13297/460685
K 9
helpdlg.h
V 21
file g2.0.r1888/23188
K 10
inputdlg.c
V 20
file ag.0.r7586/1961
K 10
inputdlg.h
V 20
file ah.0.r7586/2315
K 10
inteldlg.c
V 23
file ai.0.r13286/187316
K 10
inteldlg.h
V 23
file 2dl.0.r10108/22972
K 9
mapctrl.c
V 21
file aj.0.r10532/8954
K 9
mapctrl.h
V 21
file ak.0.r10532/9667
K 9
mapview.c
V 22
file al.0.r13913/54451
K 9
mapview.h
V 22
file am.0.r13913/54689
K 6
menu.c
V 23
file an.0.r13948/142288
K 6
menu.h
V 21
file ao.0.r12091/4447
K 12
messagedlg.c
V 22
file ap.0.r10532/10389
K 12
messagedlg.h
V 22
file 2dm.0.r5989/31896
K 12
messagewin.c
V 21
file aq.0.r9098/15891
K 12
messagewin.h
V 20
file g3.0.r5489/3851
K 11
optiondlg.c
V 21
file ar.0.r11793/1242
K 11
optiondlg.h
V 21
file as.0.r1432/23133
K 7
pages.c
V 24
file 2qm.0.r14120/178200
K 7
pages.h
V 22
file 2qn.0.r10536/7909
K 9
pixcomm.c
V 21
file at.0.r3145/18494
K 9
pixcomm.h
V 20
file au.0.r4034/9777
K 10
pixcommp.h
V 20
file av.0.r4034/8719
K 8
plrdlg.c
V 23
file aw.0.r13133/248117
K 8
plrdlg.h
V 20
file g4.0.r5489/3140
K 10
ratesdlg.c
V 23
file ax.0.r13046/134049
K 10
ratesdlg.h
V 22
file 2dn.0.r5989/31227
K 10
repodlgs.c
V 20
file ay.0.r13306/731
K 10
repodlgs.h
V 21
file az.0.r10957/6056
K 11
resources.c
V 20
file b0.0.r9310/2224
K 11
resources.h
V 21
file b1.0.r3145/14204
K 14
spaceshipdlg.c
V 23
file b2.0.r13133/248358
K 14
spaceshipdlg.h
V 21
file b3.0.r2187/11152
K 8
themes.c
V 23
file 350.0.r10945/14451
K 7
wldlg.c
V 23
file o5.0.r13297/460928
K 7
wldlg.h
V 22
file o6.0.r10181/18680
END
ENDREP
id: 9o.0.r14120/181435
type: dir
pred: 9o.0.r14106/7394
count: 837
text: 14120 178440 2982 2982 2406d9e756ab5722c6eef59f3c6401be
props: 11108 12237 78 0 a27c61ac5fddbd709df8c1876129f940
cpath: /trunk/client/gui-xaw
copyroot: 0 /

id: y3.0.r14120/181665
type: file
pred: y3.0.r13368/14896
count: 57
text: 14120 27516 37 25666 8bac757682d23f6b0dc126d931640fee
props: 10519 872 111 0 910e8d1010fade384d0a5659f339617e
cpath: /trunk/client/gui-win32/gui_main.c
copyroot: 0 /

id: yg.0.r14120/181906
type: file
pred: yg.0.r14102/9357
count: 60
text: 14120 38213 465 39401 b73bd4262f0aa8ef7f051ac2328cddd3
props: 10989 3605 111 0 d69121ee529fb8cb3643d711ec0f2158
cpath: /trunk/client/gui-win32/menu.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file nr.0.r13602/28588
K 8
canvas.c
V 21
file 2ya.0.r10482/217
K 8
canvas.h
V 22
file 2yb.0.r10131/2132
K 10
chatline.c
V 21
file xk.0.r7930/24198
K 10
chatline.h
V 20
file xl.0.r5785/7678
K 9
citydlg.c
V 23
file xm.0.r13948/146005
K 9
citydlg.h
V 19
file xn.0.r5671/865
K 9
cityrep.c
V 23
file xo.0.r13948/146483
K 9
cityrep.h
V 22
file xp.0.r3745/159022
K 8
cma_fe.c
V 21
file 2fu.0.r9591/3114
K 8
cma_fe.h
V 20
file 2fv.0.r7442/210
K 8
colors.c
V 21
file xq.0.r10461/1484
K 8
colors.h
V 21
file xr.0.r10461/1841
K 12
connectdlg.c
V 22
file xs.0.r13328/11571
K 12
connectdlg.h
V 20
file xt.0.r8331/7783
K 9
dialogs.c
V 21
file xu.0.r14106/7622
K 9
dialogs.h
V 21
file xv.0.r10883/4520
K 10
diplodlg.c
V 23
file xw.0.r13286/191510
K 10
diplodlg.h
V 22
file xx.0.r13481/26989
K 9
finddlg.c
V 23
file xy.0.r13133/253294
K 9
finddlg.h
V 22
file 2dg.0.r5989/39776
K 9
gotodlg.c
V 22
file xz.0.r13899/32458
K 9
gotodlg.h
V 20
file y0.0.r3786/3776
K 10
graphics.c
V 22
file y1.0.r13412/12305
K 10
graphics.h
V 21
file y2.0.r10294/2998
K 10
gui_main.c
V 23
file y3.0.r14120/181665
K 10
gui_main.h
V 20
file y4.0.r10222/314
K 11
gui_stuff.c
V 22
file y5.0.r13328/10611
K 11
gui_stuff.h
V 22
file y6.0.r13328/10851
K 11
happiness.c
V 23
file 137.0.r13927/78605
K 11
happiness.h
V 23
file 138.0.r13481/26751
K 9
helpdlg.c
V 22
file y7.0.r13328/11331
K 9
helpdlg.h
V 22
file y8.0.r3745/150873
K 10
inputdlg.c
V 19
file y9.0.r8895/460
K 10
inputdlg.h
V 22
file ya.0.r3745/153242
K 10
inteldlg.c
V 20
file yb.0.r13336/374
K 10
inteldlg.h
V 22
file 2dh.0.r5989/39102
K 9
mapctrl.c
V 21
file yc.0.r12331/5681
K 9
mapctrl.h
V 21
file yd.0.r6430/14685
K 9
mapview.c
V 22
file ye.0.r13604/28356
K 9
mapview.h
V 22
file yf.0.r13412/11359
K 6
menu.c
V 23
file yg.0.r14120/181906
K 6
menu.h
V 20
file yh.0.r5785/9458
K 12
messagedlg.c
V 22
file yi.0.r10488/20525
K 12
messagedlg.h
V 22
file 2di.0.r5989/40112
K 12
messagewin.c
V 21
file yj.0.r9098/24106
K 12
messagewin.h
V 22
file yk.0.r3745/155966
K 11
optiondlg.c
V 22
file yl.0.r13412/10878
K 11
optiondlg.h
V 21
file ym.0.r3959/96575
K 7
pages.c
V 23
file 2qk.0.r13412/11835
K 7
pages.h
V 22
file 2ql.0.r8639/12634
K 8
plrdlg.c
V 23
file yn.0.r13133/253538
K 8
plrdlg.h
V 20
file yo.0.r3847/6164
K 10
ratesdlg.c
V 23
file yp.0.r13046/138739
K 10
ratesdlg.h
V 22
file 2dj.0.r5989/39439
K 10
repodlgs.c
V 22
file yq.0.r13412/11593
K 10
repodlgs.h
V 22
file yr.0.r3745/151547
K 14
spaceshipdlg.c
V 23
file yt.0.r13133/253781
K 14
spaceshipdlg.h
V 20
file yu.0.r3778/5068
K 8
sprite.c
V 22
file 2yc.0.r10294/2273
K 8
sprite.h
V 23
file 2yd.0.r10141/44406
K 8
themes.c
V 23
file 34z.0.r10945/20562
K 7
wldlg.c
V 23
file yv.0.r13297/467606
K 7
wldlg.h
V 21
file yw.0.r12515/1620
END
ENDREP
id: np.0.r14120/184891
type: dir
pred: np.0.r14106/10602
count: 613
text: 14120 182144 2734 2734 1d8642b3750aca632d7acc9bb48fc9e6
props: 11108 12557 68 0 fbaef5f6348d6ae4b0cc177104ca4ad2
cpath: /trunk/client/gui-win32
copyroot: 0 /

id: n.0.r14120/185124
type: file
pred: n.0.r14055/32690
count: 629
text: 14120 162152 225 98612 99299095ad5b98c2eaec2a5c7b0e5571
props: 11088 14698 112 0 2c9d3e41a2f20488aa9cdb8d740d094e
cpath: /trunk/client/packhand.c
copyroot: 0 /

id: 18d.0.r14120/185358
type: file
pred: 18d.0.r13857/55844
count: 76
text: 14120 23164 2074 77962 1c67760d3cc456dbe0ce5c9359146b1d
props: 9803 3079 111 0 9b377c828b4ca1827963af8e19878787
cpath: /trunk/client/gui-sdl/optiondlg.c
copyroot: 0 /

id: 186.0.r14120/185602
type: file
pred: 186.0.r14075/3052
count: 162
text: 14120 27582 492 39199 63d30bb9ed9cf5d11f0d2f1493e71410
props: 10779 67955 111 0 1566ee949d8102994e5ce1bbf3530de9
cpath: /trunk/client/gui-sdl/mapview.c
copyroot: 0 /

id: 18i.0.r14120/185845
type: file
pred: 18i.0.r13844/5371
count: 103
text: 14120 37260 87 110231 1648625453996056ca6090c071889c67
props: 10779 68322 111 0 622f1432038f91cce287c1d90e4f7964
cpath: /trunk/client/gui-sdl/repodlgs.c
copyroot: 0 /

id: 17o.0.r14120/186089
type: file
pred: 17o.0.r13966/8686
count: 118
text: 14120 38820 312 33588 a33fefd873ad67b72a7712ca7fd3c08b
props: 10411 162763 111 0 93121dcfd7714818c8d46f9c51a886fa
cpath: /trunk/client/gui-sdl/gui_main.c
copyroot: 0 /

id: 188.0.r14120/186334
type: file
pred: 188.0.r13948/151146
count: 60
text: 14120 158420 3702 42507 65b999c4cb7fdb72009f41ae04ad251f
props: 10805 77668 111 0 18cdb9becb11c47631b7a093e907200c
cpath: /trunk/client/gui-sdl/menu.c
copyroot: 0 /

id: 390.0.r14120/186577
type: file
pred: 390.0.r14075/3292
count: 15
text: 14120 5187 49 33248 64cd17f07e8726c2b83701bd2199975f
props: 12670 112635 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl/themespec.c
copyroot: 0 /

id: 17a.0.r14120/186819
type: file
pred: 17a.0.r14075/3774
count: 140
text: 14120 12546 462 98952 044ac53d64bdf72241d0af386ff791b1
props: 10805 78030 111 0 ae073b1a8624f4e72ab3bef202bf2f05
cpath: /trunk/client/gui-sdl/dialogs.c
copyroot: 0 /

id: 184.0.r14120/187062
type: file
pred: 184.0.r13948/151882
count: 92
text: 14120 26956 407 79032 3f58b7e0d26c6fdbe8baf6688cdc8892
props: 9803 6307 111 0 4135f0dfb17a4d11b2424d95e27830f5
cpath: /trunk/client/gui-sdl/mapctrl.c
copyroot: 0 /

id: 16y.0.r14120/187304
type: file
pred: 16y.0.r14075/4734
count: 46
text: 14120 38706 87 29640 adb48793266f275def54b07dcc22915c
props: 9030 114052 111 0 2a5912525b098cb46a1301ee940f7617
cpath: /trunk/client/gui-sdl/chatline.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file 16u.0.r13687/1992
K 14
SDL_rotozoom.c
V 24
file 3jy.0.r12670/115301
K 14
SDL_rotozoom.h
V 24
file 3jz.0.r12670/115888
K 9
SDL_ttf.c
V 22
file 2dz.0.r13598/7332
K 9
SDL_ttf.h
V 22
file 2e0.0.r13598/7566
K 11
alphablit.c
V 23
file 3be.0.r13354/59832
K 8
canvas.c
V 23
file 39i.0.r13354/56191
K 8
canvas.h
V 23
file 39j.0.r13354/56918
K 16
caravan_dialog.c
V 23
file 3bp.0.r12699/32779
K 10
chatline.c
V 24
file 16y.0.r14120/187304
K 10
chatline.h
V 23
file 16z.0.r13795/17949
K 9
citydlg.c
V 22
file 170.0.r14075/2812
K 9
citydlg.h
V 23
file 171.0.r13354/55222
K 9
cityrep.c
V 22
file 172.0.r13661/1878
K 9
cityrep.h
V 22
file 173.0.r12769/2941
K 8
cma_fe.c
V 21
file 174.0.r14048/458
K 8
cma_fe.h
V 23
file 175.0.r11361/43495
K 8
colors.c
V 23
file 176.0.r13354/62500
K 8
colors.h
V 22
file 177.0.r14075/4496
K 12
connectdlg.c
V 22
file 178.0.r14075/5211
K 12
connectdlg.h
V 23
file 179.0.r12349/45319
K 9
dialogs.c
V 24
file 17a.0.r14120/186819
K 9
dialogs.h
V 23
file 17b.0.r13354/61529
K 10
diplodlg.c
V 23
file 17c.0.r13572/15711
K 10
diplodlg.h
V 22
file 17d.0.r11584/2869
K 17
diplomat_dialog.c
V 24
file 3bn.0.r13948/151631
K 9
finddlg.c
V 23
file 17e.0.r13526/14796
K 9
finddlg.h
V 20
file 2d8.0.r5991/702
K 9
gotodlg.c
V 23
file 17f.0.r13899/36368
K 9
gotodlg.h
V 22
file 17g.0.r6515/58208
K 10
graphics.c
V 22
file 17h.0.r14075/4014
K 10
graphics.h
V 23
file 17i.0.r12611/13939
K 11
gui_iconv.c
V 23
file 17l.0.r13354/66120
K 11
gui_iconv.h
V 23
file 17m.0.r13354/66657
K 8
gui_id.h
V 23
file 17n.0.r13857/56810
K 10
gui_main.c
V 24
file 17o.0.r14120/186089
K 10
gui_main.h
V 23
file 17p.0.r13354/59593
K 11
gui_mouse.c
V 23
file 3ca.0.r13354/59349
K 11
gui_mouse.h
V 24
file 3cb.0.r12670/112397
K 12
gui_string.c
V 22
file 17r.0.r13665/2840
K 12
gui_string.h
V 23
file 17s.0.r13481/30445
K 14
gui_tilespec.c
V 23
file 191.0.r13857/56085
K 14
gui_tilespec.h
V 23
file 192.0.r13913/62094
K 11
happiness.c
V 23
file 17x.0.r11361/41144
K 11
happiness.h
V 23
file 17y.0.r11361/41867
K 9
helpdlg.c
V 23
file 17z.0.r13526/15037
K 9
helpdlg.h
V 23
file 180.0.r11361/47416
K 10
inputdlg.c
V 23
file 181.0.r11361/47897
K 10
inputdlg.h
V 23
file 182.0.r5500/260641
K 10
inteldlg.c
V 22
file 183.0.r14075/4255
K 10
inteldlg.h
V 22
file 2d9.0.r11409/2687
K 9
mapctrl.c
V 24
file 184.0.r14120/187062
K 9
mapctrl.h
V 23
file 185.0.r13354/63700
K 9
mapview.c
V 24
file 186.0.r14120/185602
K 9
mapview.h
V 23
file 187.0.r13354/56676
K 6
menu.c
V 24
file 188.0.r14120/186334
K 6
menu.h
V 23
file 189.0.r13857/57045
K 12
messagedlg.c
V 23
file 18a.0.r11361/49350
K 12
messagedlg.h
V 22
file 2da.0.r5989/48394
K 12
messagewin.c
V 23
file 18b.0.r13354/60073
K 12
messagewin.h
V 23
file 18c.0.r6286/140236
K 5
mmx.h
V 23
file 2e1.0.r6286/134429
K 11
optiondlg.c
V 24
file 18d.0.r14120/185358
K 11
optiondlg.h
V 22
file 18e.0.r12381/2174
K 7
pages.c
V 23
file 2qg.0.r13795/17473
K 7
pages.h
V 22
file 2qh.0.r8639/16416
K 8
plrdlg.c
V 23
file 18f.0.r13526/15279
K 8
plrdlg.h
V 22
file 18g.0.r6387/81301
K 10
ratesdlg.h
V 22
file 2db.0.r5989/47726
K 10
repodlgs.c
V 24
file 18i.0.r14120/185845
K 10
repodlgs.h
V 23
file 18j.0.r13354/58129
K 14
spaceshipdlg.c
V 23
file 18m.0.r13526/15520
K 14
spaceshipdlg.h
V 23
file 18n.0.r5500/263363
K 8
sprite.c
V 23
file 39k.0.r13354/55462
K 8
sprite.h
V 24
file 39l.0.r12670/108062
K 18
themebackgrounds.c
V 23
file 3ff.0.r13795/16976
K 18
themebackgrounds.h
V 23
file 3fg.0.r13795/17225
K 13
themecolors.c
V 24
file 392.0.r12670/113849
K 13
themecolors.h
V 24
file 393.0.r12670/114433
K 8
themes.c
V 24
file 38p.0.r12670/109789
K 11
themespec.c
V 24
file 390.0.r14120/186577
K 11
themespec.h
V 24
file 391.0.r12670/113267
K 11
unistring.c
V 23
file 18o.0.r13354/57401
K 11
unistring.h
V 23
file 18p.0.r13481/30205
K 8
widget.c
V 22
file 3fu.0.r13966/8449
K 8
widget.h
V 24
file 3fv.0.r12670/110372
K 15
widget_button.c
V 22
file 3fh.0.r14075/3532
K 15
widget_button.h
V 24
file 3g7.0.r12670/113556
K 17
widget_checkbox.c
V 22
file 3fi.0.r14075/5747
K 17
widget_checkbox.h
V 24
file 3g8.0.r12670/106620
K 13
widget_core.c
V 23
file 3fj.0.r13354/61769
K 13
widget_edit.c
V 23
file 3fk.0.r13354/64909
K 13
widget_edit.h
V 24
file 3g9.0.r12670/115595
K 13
widget_icon.c
V 23
file 3fl.0.r13354/59104
K 13
widget_icon.h
V 24
file 3ga.0.r12670/112107
K 14
widget_label.c
V 22
file 3fm.0.r13598/6851
K 14
widget_label.h
V 24
file 3gb.0.r12670/110079
K 10
widget_p.h
V 24
file 3fn.0.r12670/107197
K 18
widget_scrollbar.c
V 24
file 3fo.59n.r14075/5451
K 18
widget_scrollbar.h
V 24
file 3gc.0.r12670/116811
K 15
widget_window.c
V 23
file 3fp.0.r13354/55944
K 15
widget_window.h
V 23
file 3gd.0.r12699/32533
K 7
wldlg.c
V 22
file 18q.0.r14075/4974
K 7
wldlg.h
V 23
file 18r.0.r11361/49592
END
ENDREP
id: 16t.0.r14120/192293
type: dir
pred: 16t.0.r14075/10727
count: 492
text: 14120 187546 4734 4734 f09fe21f66b5540d263ced4e7d463296
props: 11108 12869 78 0 a27c61ac5fddbd709df8c1876129f940
cpath: /trunk/client/gui-sdl
copyroot: 0 /

id: 2kn.0.r14120/192526
type: file
pred: 2kn.0.r13899/42797
count: 3
text: 14120 39162 49 1198 0218a94d95056c143f5906e036393206
props: 7939 65106 110 0 94a2a96823d3c54fff31bdd51de17982
cpath: /trunk/client/gui-ftwl/gotodlg.c
copyroot: 0 /

id: 2kz.0.r14120/192766
type: file
pred: 2kz.0.r13948/157588
count: 37
text: 14120 44807 53 49750 32a72e67517309f9e3ae6f48a6aa5026
props: 10452 1016 111 0 45c0e160a790dc8f7645f8a7eabea654
cpath: /trunk/client/gui-ftwl/mapview.c
copyroot: 0 /

id: 2kr.0.r14120/193009
type: file
pred: 2kr.0.r11943/1054
count: 16
text: 14120 10380 2137 10560 b90a85a9625bc3498fc896ad38c39770
props: 10130 8501 111 0 d4514082fc7e52be026d3360dec4dcb0
cpath: /trunk/client/gui-ftwl/gui_main.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 23
file 2k4.0.r13602/37073
K 8
canvas.c
V 22
file 2ye.0.r12291/8284
K 8
canvas.h
V 23
file 2yf.0.r10109/10676
K 6
chat.c
V 22
file 2k5.0.r11941/7401
K 6
chat.h
V 22
file 2k6.0.r7939/79684
K 10
chatline.c
V 22
file 2k7.0.r11941/6451
K 10
chatline.h
V 22
file 2k8.0.r7939/74301
K 9
citydlg.c
V 24
file 2k9.0.r13948/157348
K 9
citydlg.h
V 22
file 2ka.0.r7939/67918
K 9
cityrep.c
V 22
file 2kb.0.r7939/78333
K 9
cityrep.h
V 22
file 2kc.0.r7939/80015
K 8
colors.c
V 22
file 2kd.0.r11941/5347
K 8
colors.h
V 22
file 2ke.0.r11941/5582
K 12
connectdlg.c
V 22
file 2kf.0.r11941/7635
K 12
connectdlg.h
V 22
file 2kg.0.r7939/80350
K 9
dialogs.c
V 23
file 2kh.0.r13227/32269
K 9
dialogs.h
V 22
file 2ki.0.r7939/80688
K 10
diplodlg.c
V 22
file 2kj.0.r7939/64892
K 10
diplodlg.h
V 22
file 2kk.0.r7939/67247
K 9
finddlg.c
V 22
file 2kl.0.r7939/69930
K 9
finddlg.h
V 22
file 2km.0.r7939/70941
K 9
gotodlg.c
V 24
file 2kn.0.r14120/192526
K 9
gotodlg.h
V 22
file 2ko.0.r7939/67583
K 10
graphics.c
V 23
file 2kp.0.r10141/54754
K 10
graphics.h
V 22
file 2kq.0.r7939/68252
K 10
gui_main.c
V 24
file 2kr.0.r14120/193009
K 10
gui_main.h
V 22
file 2ks.0.r11943/1292
K 10
gui_text.c
V 24
file 2mr.0.r13948/157832
K 10
gui_text.h
V 22
file 2ms.0.r11941/8598
K 9
helpdlg.c
V 22
file 2kt.0.r7939/71611
K 9
helpdlg.h
V 22
file 2ku.0.r7939/72285
K 10
inteldlg.c
V 22
file 2kv.0.r7939/66910
K 10
inteldlg.h
V 22
file 2kw.0.r7939/69594
K 9
mapctrl.c
V 21
file 2kx.0.r12159/863
K 9
mapctrl.h
V 22
file 2ky.0.r7939/69259
K 9
mapview.c
V 24
file 2kz.0.r14120/192766
K 9
mapview.h
V 21
file 2l0.0.r11943/817
K 6
menu.c
V 22
file 2l1.0.r7939/75312
K 6
menu.h
V 22
file 2l2.0.r7939/76324
K 12
messagedlg.c
V 22
file 2l3.0.r7939/76990
K 12
messagedlg.h
V 22
file 2l4.0.r7939/79008
K 12
messagewin.c
V 23
file 2l5.0.r9577/142349
K 12
messagewin.h
V 22
file 2l6.0.r7939/75986
K 7
pages.c
V 22
file 2qc.0.r11943/1528
K 7
pages.h
V 22
file 2qd.0.r8639/25123
K 8
plrdlg.c
V 23
file 2l7.0.r9577/141628
K 8
plrdlg.h
V 22
file 2l8.0.r7939/73967
K 10
ratesdlg.c
V 22
file 2l9.0.r7939/68588
K 10
ratesdlg.h
V 22
file 2la.0.r7939/70605
K 10
repodlgs.c
V 22
file 2lb.0.r7939/71947
K 10
repodlgs.h
V 22
file 2lc.0.r7939/72955
K 14
spaceshipdlg.c
V 22
file 2ld.0.r7939/75645
K 14
spaceshipdlg.h
V 22
file 2le.0.r7939/77329
K 8
sprite.c
V 23
file 2yg.0.r11958/37010
K 8
sprite.h
V 23
file 2yh.0.r10141/56198
K 8
themes.c
V 24
file 3cc.0.r12670/122700
K 7
wldlg.c
V 22
file 2lf.0.r7939/76656
K 7
wldlg.h
V 22
file 2lg.0.r7939/77669
END
ENDREP
id: 2k2.0.r14120/195766
type: dir
pred: 2k2.0.r13948/160586
count: 89
text: 14120 193253 2500 2500 93adb5a01a23cd2f7ce854ad27f66566
props: 11108 13191 78 0 667fe0aa2722f6798d567486294a1d2e
cpath: /trunk/client/gui-ftwl
copyroot: 0 /

id: hl.0.r14120/196000
type: file
pred: hl.0.r13948/161053
count: 384
text: 14120 49768 108623 160406 a462835d6c55a8646fa65c62c366326c
props: 11096 3792 112 0 71c6b453a620995957914f193a952f13
cpath: /trunk/client/tilespec.c
copyroot: 0 /

id: n0.0.r14120/196239
type: file
pred: n0.0.r11749/1167
count: 4
text: 14120 21768 1212 1198 ff7ffe884c9462962cb1c7424289db09
props: 5491 32851 110 0 fd27c383f48a4fbbd90a59fbcfc8b3be
cpath: /trunk/client/gui-stub/gotodlg.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file mj.0.r13602/40054
K 8
canvas.c
V 22
file 2y0.0.r11749/2105
K 8
canvas.h
V 23
file 2y1.0.r10095/12720
K 10
chatline.c
V 21
file ml.0.r7930/39139
K 10
chatline.h
V 21
file mm.0.r5491/41569
K 9
citydlg.c
V 23
file mn.0.r13948/161531
K 9
citydlg.h
V 21
file mo.0.r5491/35843
K 9
cityrep.c
V 22
file mp.0.r10144/11456
K 9
cityrep.h
V 21
file mq.0.r5491/46587
K 8
colors.c
V 22
file mr.0.r10458/11165
K 8
colors.h
V 22
file ms.0.r10458/11524
K 12
connectdlg.c
V 21
file mt.0.r11749/2576
K 12
connectdlg.h
V 21
file mu.0.r5491/46943
K 9
dialogs.c
V 22
file mv.0.r13227/35948
K 9
dialogs.h
V 20
file mw.0.r8956/1107
K 10
diplodlg.c
V 21
file mx.0.r10144/8226
K 10
diplodlg.h
V 21
file my.0.r5491/35128
K 9
finddlg.c
V 21
file mz.0.r5491/37629
K 9
finddlg.h
V 22
file 2dc.0.r5989/44093
K 9
gotodlg.c
V 23
file n0.0.r14120/196239
K 9
gotodlg.h
V 21
file n1.0.r5491/35486
K 10
graphics.c
V 22
file n2.0.r10141/65831
K 10
graphics.h
V 21
file n3.0.r5491/36199
K 10
gui_main.c
V 22
file n4.0.r11434/22292
K 10
gui_main.h
V 21
file n5.0.r5491/41925
K 9
helpdlg.c
V 21
file n6.0.r10144/9660
K 9
helpdlg.h
V 21
file n7.0.r5491/39423
K 10
inteldlg.c
V 21
file n8.0.r7847/24779
K 10
inteldlg.h
V 22
file 2dd.0.r5989/43421
K 9
mapctrl.c
V 21
file n9.0.r7018/49625
K 9
mapctrl.h
V 21
file na.0.r5491/37272
K 9
mapview.c
V 20
file nb.0.r12524/749
K 9
mapview.h
V 21
file nc.0.r5491/38349
K 6
menu.c
V 22
file nd.0.r10144/11100
K 6
menu.h
V 21
file ne.0.r5491/43723
K 12
messagedlg.c
V 21
file nf.0.r5491/44434
K 12
messagedlg.h
V 22
file 2de.0.r5989/44428
K 12
messagewin.c
V 21
file ng.0.r9098/29017
K 12
messagewin.h
V 21
file nh.0.r5491/43363
K 7
pages.c
V 22
file 2qi.0.r11749/2340
K 7
pages.h
V 22
file 2qj.0.r8639/28697
K 8
plrdlg.c
V 21
file ni.0.r9098/28662
K 8
plrdlg.h
V 21
file nj.0.r5491/41213
K 10
ratesdlg.c
V 21
file nk.0.r5491/36557
K 10
ratesdlg.h
V 22
file 2df.0.r5989/43757
K 10
repodlgs.c
V 22
file nl.0.r10144/10019
K 10
repodlgs.h
V 21
file nm.0.r5491/40138
K 14
spaceshipdlg.c
V 21
file nn.0.r5491/42999
K 14
spaceshipdlg.h
V 21
file no.0.r5491/44796
K 8
sprite.c
V 22
file 2y2.0.r11749/1632
K 8
sprite.h
V 23
file 2y3.0.r10095/12384
K 8
themes.c
V 23
file 34y.0.r10945/24922
K 7
wldlg.c
V 21
file qj.0.r5491/44077
K 7
wldlg.h
V 21
file qk.0.r5491/45158
END
ENDREP
id: mh.0.r14120/198778
type: dir
pred: mh.0.r13948/164069
count: 135
text: 14120 196478 2287 2287 9b8a18aec35756a11c05f050edf4a885
props: 11108 13796 68 0 fbaef5f6348d6ae4b0cc177104ca4ad2
cpath: /trunk/client/gui-stub
copyroot: 0 /

id: hc.0.r14120/199011
type: file
pred: hc.0.r13356/43734
count: 115
text: 14120 162952 70 15087 cd56e0410853123c90888ac0d3fe8503
props: 10997 68 112 0 8869376353a720fe76c0d512d1b8c326
cpath: /trunk/client/clinet.c
copyroot: 0 /

id: 2f.0.r14120/199241
type: file
pred: 2f.0.r13565/626
count: 252
text: 14120 0 1447 24401 87b73cb3c8bf381b10ebe0679e8e8f72
props: 11057 49359 112 0 8c6f7f683a6ec7c52de63742b923ac5a
cpath: /trunk/client/civclient.c
copyroot: 0 /

id: d5.0.r14120/199472
type: file
pred: d5.0.r14022/13984
count: 184
text: 14120 5263 5038 34158 749538f3c798d980b506ea8870b9d80a
props: 11057 49717 112 0 a13a5521476fb3b00a5e0433e6f85ac7
cpath: /trunk/client/climisc.c
copyroot: 0 /

id: hz.0.r14120/199706
type: file
pred: hz.0.r13464/16418
count: 41
text: 14120 10332 20 2754 b71acce2cea104992d26c875ea463c4c
props: 10540 16234 111 0 2e2357461112b5dbc5fe4daab6abde1a
cpath: /trunk/client/civclient.h
copyroot: 0 /

id: dc.0.r14120/199939
type: file
pred: dc.0.r13984/57
count: 156
text: 14120 14117 1118 25134 36ef7a79b3dbab335389f3feea7be1a4
props: 10965 83 112 0 b4bb2e29c9087472d2e44c6eab39b6d6
cpath: /trunk/client/options.c
copyroot: 0 /

PLAIN
K 11
Makefile.am
V 22
file 5f.0.r13602/42819
K 6
agents
V 22
dir zf.0.r14120/173162
K 11
attribute.c
V 22
file xh.0.r13068/20176
K 11
attribute.h
V 19
file xi.0.r4715/844
K 7
audio.c
V 22
file 139.0.r13665/8100
K 7
audio.h
V 22
file 13a.0.r10416/6162
K 12
audio_none.c
V 23
file 13d.0.r6129/145164
K 12
audio_none.h
V 22
file 13e.0.r4452/27228
K 11
audio_sdl.c
V 23
file 13f.0.r13354/72177
K 11
audio_sdl.h
V 22
file 13g.0.r4452/26570
K 17
chatline_common.c
V 23
file 14q.0.r9577/151065
K 17
chatline_common.h
V 23
file 14r.0.r9577/151422
K 16
citydlg_common.c
V 23
file z4.0.r13948/135771
K 16
citydlg_common.h
V 22
file z5.0.r13913/49887
K 13
cityrepdata.c
V 22
file mb.0.r13913/49650
K 13
cityrepdata.h
V 21
file mc.0.r9153/21475
K 11
civclient.c
V 23
file 2f.0.r14120/199241
K 11
civclient.h
V 23
file hz.0.r14120/199706
K 8
climap.c
V 23
file 197.0.r11057/48047
K 8
climap.h
V 23
file 198.0.r13918/12587
K 9
climisc.c
V 23
file d5.0.r14120/199472
K 9
climisc.h
V 22
file i0.0.r13567/45363
K 8
clinet.c
V 23
file hc.0.r14120/199011
K 8
clinet.h
V 22
file i1.0.r12484/13649
K 15
colors_common.c
V 23
file 33a.0.r13898/17124
K 15
colors_common.h
V 23
file 33b.0.r13898/17360
K 19
connectdlg_common.c
V 21
file 2fw.0.r14052/180
K 19
connectdlg_common.h
V 23
file 2fx.0.r12637/24311
K 9
control.c
V 23
file gz.0.r14120/173391
K 9
control.h
V 22
file i2.0.r14114/11485
K 8
editor.c
V 24
file 3bg.0.r13948/164774
K 8
editor.h
V 23
file 3bh.0.r12771/15162
K 11
ggzclient.c
V 24
file 394.0.r12670/122138
K 11
ggzclient.h
V 24
file 395.0.r12670/122419
K 6
goto.c
V 23
file vu.0.r13948/149947
K 6
goto.h
V 22
file vv.0.r13899/36140
K 8
gui-ftwl
V 23
dir 2k2.0.r14120/195766
K 11
gui-gtk-2.0
V 22
dir zs.0.r14120/177721
K 7
gui-sdl
V 23
dir 16t.0.r14120/192293
K 8
gui-stub
V 22
dir mh.0.r14120/198778
K 9
gui-win32
V 22
dir np.0.r14120/184891
K 7
gui-xaw
V 22
dir 9o.0.r14120/181435
K 10
helpdata.c
V 23
file h1.0.r13948/160819
K 10
helpdata.h
V 23
file i3.0.r13297/482753
K 7
include
V 22
dir b8.0.r13297/466152
K 16
mapctrl_common.c
V 24
file 15m.0.r13948/161288
K 16
mapctrl_common.h
V 23
file 15n.0.r11378/41712
K 16
mapview_common.c
V 23
file z2.0.r13948/164301
K 16
mapview_common.h
V 22
file z3.0.r13906/25384
K 19
messagewin_common.c
V 24
file 14s.0.r13948/157105
K 19
messagewin_common.h
V 24
file 14t.0.r13297/482271
K 9
options.c
V 23
file dc.0.r14120/199939
K 9
options.h
V 22
file i4.0.r13227/13625
K 17
overview_common.c
V 24
file 2yk.0.r13948/136010
K 17
overview_common.h
V 21
file 2yl.0.r10927/997
K 10
packhand.c
V 22
file n.0.r14120/185124
K 10
packhand.h
V 23
file i5.0.r13297/471299
K 15
plrdlg_common.c
V 23
file 14u.0.r13567/44890
K 15
plrdlg_common.h
V 23
file 14v.0.r10581/10242
K 17
repodlgs_common.c
V 24
file 11i.0.r13948/141804
K 17
repodlgs_common.h
V 24
file 11j.0.r13297/458984
K 9
reqtree.c
V 21
file 2ym.0.r14067/239
K 9
reqtree.h
V 23
file 2yn.0.r13481/22674
K 9
servers.c
V 23
file 33x.0.r13356/43957
K 9
servers.h
V 22
file 33y.0.r11098/4793
K 6
text.c
V 21
file 2g3.0.r13955/167
K 6
text.h
V 23
file 2g4.0.r13604/24667
K 15
themes_common.c
V 23
file 352.0.r13227/35243
K 15
themes_common.h
V 23
file 353.0.r13227/35479
K 10
tilespec.c
V 23
file hl.0.r14120/196000
K 10
tilespec.h
V 22
file i6.0.r13913/67548
END
ENDREP
id: d.0.r14120/203425
type: dir
pred: d.0.r14114/14954
count: 4235
text: 14120 200168 3244 3244 edf05db5f7312f4ecaa6c3bf46c38a3d
props: 12883 2898 109 0 732f4656541fb514e4368d9517bdf317
cpath: /trunk/client
copyroot: 0 /

PLAIN
K 9
ABOUT-NLS
V 22
file fu.0.r13215/85704
K 7
AUTHORS
V 19
file 5u.0.r12982/94
K 7
COPYING
V 19
file 1h.0.r9643/400
K 9
ChangeLog
V 21
file 6l.0.r13892/2383
K 7
INSTALL
V 20
file 6.0.r13294/2509
K 11
Makefile.am
V 21
file 59.0.r13780/5863
K 4
NEWS
V 20
file 6m.0.r13825/202
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 21
dir 8.0.r13948/134696
K 10
autogen.sh
V 22
file 12o.0.r12319/1997
K 9
bootstrap
V 21
dir 2p5.0.r13975/1420
K 6
client
V 21
dir d.0.r14120/203425
K 6
common
V 21
dir p.0.r14120/172309
K 12
config.mac.h
V 20
file hb.0.r6045/5982
K 12
configure.ac
V 20
file 149.0.r14086/62
K 4
data
V 19
dir w.0.r14090/4017
K 6
debian
V 20
dir 5w.0.r13441/7348
K 12
dependencies
V 22
dir 2yu.0.r13977/13832
K 11
diff_ignore
V 19
file qq.0.r13200/42
K 3
doc
V 20
dir k7.0.r14099/5111
K 4
intl
V 21
dir f4.0.r11105/23499
K 2
m4
V 21
dir 12p.0.r14090/1806
K 6
manual
V 22
dir 2m2.0.r13602/20217
K 2
po
V 22
dir fs.0.r14024/231397
K 7
scripts
V 22
dir 2yo.0.r14022/10306
K 6
server
V 21
dir z.0.r14120/168987
K 10
stamp-h.in
V 19
file 80.0.r1125/241
K 5
tests
V 21
dir 2g9.0.r13445/1146
K 7
utility
V 20
dir 1c.0.r14062/2056
K 10
version.in
V 23
file 2lo.0.r13910/13507
K 3
vms
V 21
dir u9.0.r11105/70719
K 5
win32
V 22
dir 2eu.0.r13730/30247
END
ENDREP
id: 3.0.r14120/204907
type: dir
pred: 3.0.r14115/4624
count: 11424
text: 14120 203647 1247 1247 3fba58f1bb7903a08007a5e7a7e226ef
props: 11109 0 255 0 8cbc80e0da9c47b05b8ffee17ea9b0f1
cpath: /trunk
copyroot: 0 /

PLAIN
K 8
branches
V 19
dir 1.0.r14119/5643
K 4
tags
V 19
dir 2.0.r14073/2842
K 5
trunk
V 21
dir 3.0.r14120/204907
K 7
website
V 18
dir 3ge.0.r12388/0
END
ENDREP
id: 0.0.r14120/205281
type: dir
pred: 0.0.r14119/5957
count: 14120
text: 14120 205119 149 149 26d56e56e8d2d3c85e26d46844a73bca
cpath: /
copyroot: 0 /

13.0.t14119-1 modify true false /trunk/server/maphand.c

2kz.0.t14119-1 modify true false /trunk/client/gui-ftwl/mapview.c

vg.0.t14119-1 modify true false /trunk/server/srv_main.c

hl.0.t14119-1 modify true false /trunk/client/tilespec.c

188.0.t14119-1 modify true false /trunk/client/gui-sdl/menu.c

n.0.t14119-1 modify true false /trunk/client/packhand.c

bm.0.t14119-1 modify true false /trunk/client/gui-xaw/gui_main.c

vh.0.t14119-1 modify true false /trunk/server/srv_main.h

2dw.0.t14119-1 modify true false /trunk/server/connecthand.c

hc.0.t14119-1 modify true false /trunk/client/clinet.c

4s.0.t14119-1 modify true false /trunk/server/meta.c

2f.0.t14119-1 modify true false /trunk/client/civclient.c

4g.0.t14119-1 modify true false /trunk/server/citytools.c

390.0.t14119-1 modify true false /trunk/client/gui-sdl/themespec.c

d5.0.t14119-1 modify true false /trunk/client/climisc.c

hz.0.t14119-1 modify true false /trunk/client/civclient.h

2kr.0.t14119-1 modify true false /trunk/client/gui-ftwl/gui_main.c

17a.0.t14119-1 modify true false /trunk/client/gui-sdl/dialogs.c

15.0.t14119-1 modify true false /trunk/server/sernet.c

dc.0.t14119-1 modify true false /trunk/client/options.c

10k.0.t14119-1 modify true false /trunk/client/gui-gtk-2.0/gui_main.c

4y.0.t14119-1 modify true false /trunk/server/sernet.h

n0.0.t14119-1 modify true false /trunk/client/gui-stub/gotodlg.c

zh.0.t14119-1 modify true false /trunk/client/agents/agents.c

18d.0.t14119-1 modify true false /trunk/client/gui-sdl/optiondlg.c

4z.0.t14119-1 modify true false /trunk/server/stdinhand.c

184.0.t14119-1 modify true false /trunk/client/gui-sdl/mapctrl.c

10z.0.t14119-1 modify true false /trunk/client/gui-gtk-2.0/menu.c

186.0.t14119-1 modify true false /trunk/client/gui-sdl/mapview.c

y3.0.t14119-1 modify true false /trunk/client/gui-win32/gui_main.c

vl.0.t14119-1 modify true false /trunk/server/savegame.c

4u.0.t14119-1 modify true false /trunk/server/plrhand.c

gz.0.t14119-1 modify true false /trunk/client/control.c

2qm.0.t14119-1 modify true false /trunk/client/gui-xaw/pages.c

18i.0.t14119-1 modify true false /trunk/client/gui-sdl/repodlgs.c

108.0.t14119-1 modify true false /trunk/client/gui-gtk-2.0/dialogs.c

yg.0.t14119-1 modify true false /trunk/client/gui-win32/menu.c

3v.0.t14119-1 modify true false /trunk/common/game.h

16y.0.t14119-1 modify true false /trunk/client/gui-sdl/chatline.c

17o.0.t14119-1 modify true false /trunk/client/gui-sdl/gui_main.c

2kn.0.t14119-1 modify true false /trunk/client/gui-ftwl/gotodlg.c


205281 205432
