Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9803) PATCH rm map.grasssize parameter
Home

[Freeciv-Dev] (PR#9803) PATCH rm map.grasssize parameter

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9803) PATCH rm map.grasssize parameter
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Tue, 24 Aug 2004 23:51:14 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9803 >

Not used and useless parameter deleted

Marcelo
diff -ruN -Xfreeciv/diff_ignore freeciv/common/map.c freeciv_/common/map.c
--- freeciv/common/map.c        2004-08-13 17:59:12.000000000 +0200
+++ freeciv_/common/map.c       2004-08-25 06:43:50.722524616 +0200
@@ -197,7 +197,6 @@
   map.riches                = MAP_DEFAULT_RICHES;
   map.huts                  = MAP_DEFAULT_HUTS;
   map.landpercent           = MAP_DEFAULT_LANDMASS;
-  map.grasssize             = MAP_DEFAULT_GRASS;
   map.swampsize             = MAP_DEFAULT_SWAMPS;
   map.deserts               = MAP_DEFAULT_DESERTS;
   map.mountains             = MAP_DEFAULT_MOUNTAINS;
diff -ruN -Xfreeciv/diff_ignore freeciv/common/map.h freeciv_/common/map.h
--- freeciv/common/map.h        2004-08-24 19:23:43.000000000 +0200
+++ freeciv_/common/map.h       2004-08-25 06:44:04.485432336 +0200
@@ -163,7 +163,6 @@
   int riches;
   int huts;
   int landpercent;
-  int grasssize;
   int swampsize;
   int deserts;
   int mountains;
@@ -640,10 +639,6 @@
 #define MAP_MIN_MOUNTAINS        10
 #define MAP_MAX_MOUNTAINS        100
 
-#define MAP_DEFAULT_GRASS       35
-#define MAP_MIN_GRASS           20
-#define MAP_MAX_GRASS           100
-
 #define MAP_DEFAULT_SWAMPS       5
 #define MAP_MIN_SWAMPS           0
 #define MAP_MAX_SWAMPS           100
diff -ruN -Xfreeciv/diff_ignore freeciv/server/mapgen.c freeciv_/server/mapgen.c
--- freeciv/server/mapgen.c     2004-08-24 19:23:44.000000000 +0200
+++ freeciv_/server/mapgen.c    2004-08-25 06:47:56.447168792 +0200
@@ -48,7 +48,6 @@
 #define do_in_map_pos_end                                                   \
   }                                                                         \
 }
-
 /* Wrapper for easy access.  It's a macro so it can be a lvalue. */
 #define hmap(x, y) (height_map[map_pos_to_index(x, y)])
 #define hnat(x, y) (height_map[native_pos_to_index((x), (y))])
@@ -1676,16 +1675,13 @@
   int total;
   int polar = 5; /* FIXME: convert to a server option */
 
-  total = map.mountains + map.deserts + map.forestsize + map.swampsize 
-    + map.grasssize;
+  total = map.mountains + map.deserts + map.forestsize + map.swampsize;
 
-  if (total != 100 - polar) {
+  if (total > 100 - polar) {
     map.forestsize = map.forestsize * (100 - polar) / total;
     map.swampsize = map.swampsize * (100 - polar) / total;
     map.mountains = map.mountains * (100 - polar) / total;
     map.deserts = map.deserts * (100 - polar) / total;
-    map.grasssize = 100 - map.forestsize - map.swampsize - map.mountains 
-      - polar - map.deserts;
   }
 }
 
diff -ruN -Xfreeciv/diff_ignore freeciv/server/savegame.c 
freeciv_/server/savegame.c
--- freeciv/server/savegame.c   2004-08-24 16:59:27.000000000 +0200
+++ freeciv_/server/savegame.c  2004-08-25 06:46:34.191673528 +0200
@@ -3053,8 +3053,6 @@
       map.generator = secfile_lookup_int(file, "map.generator");
       map.seed = secfile_lookup_int(file, "map.seed");
       map.landpercent = secfile_lookup_int(file, "map.landpercent");
-      map.grasssize =
-       secfile_lookup_int_default(file, MAP_DEFAULT_GRASS, "map.grasssize");
       map.swampsize = secfile_lookup_int(file, "map.swampsize");
       map.deserts = secfile_lookup_int(file, "map.deserts");
       map.riverlength = secfile_lookup_int(file, "map.riverlength");
diff -ruN -Xfreeciv/diff_ignore freeciv/server/stdinhand.c 
freeciv_/server/stdinhand.c
--- freeciv/server/stdinhand.c  2004-08-24 19:23:45.000000000 +0200
+++ freeciv_/server/stdinhand.c 2004-08-25 06:44:30.350500248 +0200
@@ -367,11 +367,6 @@
          N_("Amount of river squares"), "", NULL,
          MAP_MIN_RIVERS, MAP_MAX_RIVERS, MAP_DEFAULT_RIVERS)
 
-  GEN_INT("grass", map.grasssize,
-         SSET_MAP_GEN, SSET_ECOLOGY, SSET_SITUATIONAL, SSET_TO_CLIENT,
-         N_("Amount of grass squares"), "", NULL,
-         MAP_MIN_GRASS, MAP_MAX_GRASS, MAP_DEFAULT_GRASS)
-
   GEN_INT("forests", map.forestsize,
          SSET_MAP_GEN, SSET_ECOLOGY, SSET_SITUATIONAL, SSET_TO_CLIENT,
          N_("Amount of forest squares"), "", NULL, 

[Prev in Thread] Current Thread [Next in Thread]