Author: cazfi
Date: Wed Apr  2 00:30:56 2014
New Revision: 24744

URL: http://svn.gna.org/viewcvs/freeciv?rev=24744&view=rev
Log:
Removed obsolete definition of oceanic city gfx tags from city styles. Oceanic
cities can now be defined with their own complete city styles.

See patch #4638

Modified:
    trunk/client/packhand.c
    trunk/client/tilespec.c
    trunk/common/city.h
    trunk/common/packets.def
    trunk/data/alien/cities.ruleset
    trunk/data/civ1/cities.ruleset
    trunk/data/civ2/cities.ruleset
    trunk/data/civ2civ3/cities.ruleset
    trunk/data/classic/cities.ruleset
    trunk/data/experimental/cities.ruleset
    trunk/data/multiplayer/cities.ruleset
    trunk/fc_version
    trunk/server/ruleset.c

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/client/packhand.c     (original)
+++ trunk/client/packhand.c     Wed Apr  2 00:30:56 2014
@@ -3646,8 +3646,6 @@
   names_set(&cs->name, NULL, packet->name, packet->rule_name);
   sz_strlcpy(cs->graphic, packet->graphic);
   sz_strlcpy(cs->graphic_alt, packet->graphic_alt);
-  sz_strlcpy(cs->oceanic_graphic, packet->oceanic_graphic);
-  sz_strlcpy(cs->oceanic_graphic_alt, packet->oceanic_graphic_alt);
   sz_strlcpy(cs->citizens_graphic, packet->citizens_graphic);
   sz_strlcpy(cs->citizens_graphic_alt, packet->citizens_graphic_alt);
 

Modified: trunk/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/client/tilespec.c     (original)
+++ trunk/client/tilespec.c     Wed Apr  2 00:30:56 2014
@@ -195,8 +195,6 @@
   struct {
     int land_num_thresholds;
     struct city_style_threshold *land_thresholds;
-    int oceanic_num_thresholds;
-    struct city_style_threshold *oceanic_thresholds;
   } *styles;
   int num_styles;
 };
@@ -2293,14 +2291,8 @@
 
   fc_assert_ret_val(style < city_sprite->num_styles, NULL);
 
-  if (is_ocean_tile(pcity->tile)
-      && city_sprite->styles[style].oceanic_num_thresholds != 0) {
-    num_thresholds = city_sprite->styles[style].oceanic_num_thresholds;
-    thresholds = city_sprite->styles[style].oceanic_thresholds;
-  } else {
-    num_thresholds = city_sprite->styles[style].land_num_thresholds;
-    thresholds = city_sprite->styles[style].land_thresholds;
-  }
+  num_thresholds = city_sprite->styles[style].land_num_thresholds;
+  thresholds = city_sprite->styles[style].land_thresholds;
 
   if (num_thresholds == 0) {
     return NULL;
@@ -2383,10 +2375,6 @@
       load_city_thresholds_sprites(t, tag, city_styles[style].graphic,
                                    city_styles[style].graphic_alt,
                                    
&city_sprite->styles[style].land_thresholds);
-    city_sprite->styles[style].oceanic_num_thresholds =
-      load_city_thresholds_sprites(t, tag, city_styles[style].oceanic_graphic,
-                                   city_styles[style].oceanic_graphic_alt,
-                                   
&city_sprite->styles[style].oceanic_thresholds);
   }
 
   return city_sprite;
@@ -2407,9 +2395,6 @@
   for (style = 0; style < city_sprite->num_styles; style++) {
     if (city_sprite->styles[style].land_thresholds) {
       free(city_sprite->styles[style].land_thresholds);
-    }
-    if (city_sprite->styles[style].oceanic_thresholds) {
-      free(city_sprite->styles[style].oceanic_thresholds);
     }
   }
   free(city_sprite->styles);

Modified: trunk/common/city.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/city.h?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/common/city.h (original)
+++ trunk/common/city.h Wed Apr  2 00:30:56 2014
@@ -440,8 +440,6 @@
   struct name_translation name;
   char graphic[MAX_LEN_NAME];
   char graphic_alt[MAX_LEN_NAME];
-  char oceanic_graphic[MAX_LEN_NAME];
-  char oceanic_graphic_alt[MAX_LEN_NAME];
   char citizens_graphic[MAX_LEN_NAME];
   char citizens_graphic_alt[MAX_LEN_NAME];
   struct requirement_vector reqs;

Modified: trunk/common/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/packets.def?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/common/packets.def    (original)
+++ trunk/common/packets.def    Wed Apr  2 00:30:56 2014
@@ -1423,8 +1423,6 @@
   REQUIREMENT reqs[MAX_NUM_REQS:reqs_count];
   STRING graphic[MAX_LEN_NAME];
   STRING graphic_alt[MAX_LEN_NAME];
-  STRING oceanic_graphic[MAX_LEN_NAME];
-  STRING oceanic_graphic_alt[MAX_LEN_NAME];
 end
 
 PACKET_RULESET_BUILDING = 150; sc, lsend

Modified: trunk/data/alien/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/alien/cities.ruleset     (original)
+++ trunk/data/alien/cities.ruleset     Wed Apr  2 00:30:56 2014
@@ -104,8 +104,6 @@
 ;                 ruleset has been released.
 ; graphic     = group of tiles to use, see cities spec for
 ;               more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)
@@ -116,8 +114,6 @@
 name        = _("?citystyle:Human")
 graphic     = "city.human"
 graphic_alt = "city.classical"
-oceanic_graphic      = "city.ocean"
-oceanic_graphic_alt  = "city.classical"
 citizens_graphic     = "human"
 citizens_graphic_alt = "ancient"
 reqs = { "type", "name", "range"
@@ -128,11 +124,20 @@
 name        = _("?citystyle:Dual")
 graphic     = "city.dual"
 graphic_alt = "city.modern"
-oceanic_graphic      = "city.ocean"
-oceanic_graphic_alt  = "city.modern"
 citizens_graphic     = "dual"
 citizens_graphic_alt = "modern"
 reqs =
    { "type", "name", "range"
      "Tech", "Alien Rights", "Player"
    }
+
+[citystyle_oceanic]
+name        = _("?citystyle:Oceanic")
+graphic     = "city.ocean"
+graphic_alt = "city.modern"
+citizens_graphic     = "dual"
+citizens_graphic_alt = "modern"
+reqs =
+   { "type", "name", "range"
+     "TerrainClass", "Oceanic", "Local"
+   }

Modified: trunk/data/civ1/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/civ1/cities.ruleset      (original)
+++ trunk/data/civ1/cities.ruleset      Wed Apr  2 00:30:56 2014
@@ -114,8 +114,6 @@
 ;                 ruleset has been released.
 ; graphic              = group of tiles to use, see cities spec for
 ;                        more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)

Modified: trunk/data/civ2/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/civ2/cities.ruleset      (original)
+++ trunk/data/civ2/cities.ruleset      Wed Apr  2 00:30:56 2014
@@ -114,8 +114,6 @@
 ;                 ruleset has been released.
 ; graphic              = group of tiles to use, see cities spec for
 ;                        more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)

Modified: trunk/data/civ2civ3/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/civ2civ3/cities.ruleset  (original)
+++ trunk/data/civ2civ3/cities.ruleset  Wed Apr  2 00:30:56 2014
@@ -113,8 +113,6 @@
 ;                 ruleset has been released.
 ; graphic              = group of tiles to use, see cities spec for
 ;                        more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)

Modified: trunk/data/classic/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/classic/cities.ruleset   (original)
+++ trunk/data/classic/cities.ruleset   Wed Apr  2 00:30:56 2014
@@ -113,8 +113,6 @@
 ;                 ruleset has been released.
 ; graphic              = group of tiles to use, see cities spec for
 ;                        more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)

Modified: trunk/data/experimental/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/experimental/cities.ruleset      (original)
+++ trunk/data/experimental/cities.ruleset      Wed Apr  2 00:30:56 2014
@@ -115,8 +115,6 @@
 ;                 ruleset has been released.
 ; graphic              = group of tiles to use, see cities spec for
 ;                        more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)

Modified: trunk/data/multiplayer/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/cities.ruleset?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/data/multiplayer/cities.ruleset       (original)
+++ trunk/data/multiplayer/cities.ruleset       Wed Apr  2 00:30:56 2014
@@ -112,8 +112,6 @@
 ;                 ruleset has been released.
 ; graphic              = group of tiles to use, see cities spec for
 ;                        more info on city tiles
-; oceanic_graphic      = group of tiles to use for oceanic cities. If this
-;                        is omitted, same graphics as for land cities is used
 ; citizens_graphic     = group of citizens tiles to use, see citizens/small
 ;                        spec for more info on citizens tiles
 ; reqs        = requirements for this city style (see README.effects)

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Wed Apr  2 00:30:56 2014
@@ -52,7 +52,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2014.Apr.02"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2014.Apr.02b"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=24744&r1=24743&r2=24744&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Wed Apr  2 00:30:56 2014
@@ -4645,13 +4645,6 @@
                  secfile_lookup_str(file, "%s.graphic", sec_name));
       sz_strlcpy(city_styles[i].graphic_alt, 
                  secfile_lookup_str(file, "%s.graphic_alt", sec_name));
-      sz_strlcpy(city_styles[i].oceanic_graphic, 
-                 secfile_lookup_str_default(file, "",
-                                            "%s.oceanic_graphic", sec_name));
-      sz_strlcpy(city_styles[i].oceanic_graphic_alt, 
-                 secfile_lookup_str_default(file, "",
-                                            "%s.oceanic_graphic_alt",
-                                            sec_name));
       sz_strlcpy(city_styles[i].citizens_graphic,
                  secfile_lookup_str_default(file, "-", 
                                             "%s.citizens_graphic", sec_name));
@@ -6230,8 +6223,6 @@
     sz_strlcpy(city_p.rule_name, rule_name(&city_styles[k].name));
     sz_strlcpy(city_p.graphic, city_styles[k].graphic);
     sz_strlcpy(city_p.graphic_alt, city_styles[k].graphic_alt);
-    sz_strlcpy(city_p.oceanic_graphic, city_styles[k].oceanic_graphic);
-    sz_strlcpy(city_p.oceanic_graphic_alt, city_styles[k].oceanic_graphic_alt);
     sz_strlcpy(city_p.citizens_graphic, city_styles[k].citizens_graphic);
     sz_strlcpy(city_p.citizens_graphic_alt,
                         city_styles[k].citizens_graphic_alt);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to