[Freeciv-Dev] (PR#6007) Civ3 feature: Different sea types
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6007 >
LAST CHANGE
FIX 2 macros in terrains.h to use TER_OCEANIC insteaf T_OCEAN
isotrident terrains a more clear
Marcelo
diff -ruN -Xfreeciv/diff_ignore freeciv/common/terrain.h
freeciv_/common/terrain.h
--- freeciv/common/terrain.h 2004-06-26 01:29:59.000000000 +0200
+++ freeciv_/common/terrain.h 2004-08-21 19:54:20.655234144 +0200
@@ -63,7 +63,9 @@
/* Changing this breaks savegame and network compatability. */
enum tile_terrain_type {
T_ARCTIC, T_DESERT, T_FOREST, T_GRASSLAND, T_HILLS, T_JUNGLE,
- T_MOUNTAINS, T_OCEAN, T_PLAINS, T_UNUSED, T_SWAMP, T_TUNDRA, T_UNKNOWN,
+ T_MOUNTAINS, T_OCEAN, T_PLAINS, T_DEEPOCEAN, T_SWAMP, T_TUNDRA,
+ T_ABYSS, /* with T_OCEAN and T_DEEPOCEAN this do a 3 level oceanic relief */
+ T_UNKNOWN, /* this must be before T_LAST */
T_LAST, /* last terrain type */
T_ANY /* A special flag that matches "any" terrain type. */
};
@@ -117,8 +119,10 @@
/* Terrain-specific functions. */
#define is_ocean(x) (terrain_has_flag((x), TER_OCEANIC))
#define is_ocean_near_tile(x, y) is_terrain_flag_near_tile(x, y, TER_OCEANIC)
-#define adjacent_ocean_tiles4(x, y) adjacent_terrain_tiles4(x, y, T_OCEAN)
-#define count_ocean_near_tile(x,y) count_terrain_near_tile(x,y, T_OCEAN)
+#define adjacent_ocean_tiles4(x, y) \
+ adjacent_terrain_flag_tiles4(x, y, TER_OCEANIC)
+#define count_ocean_near_tile(x,y) \
+ count_terrain_flag_near_tile(x,y, TER_OCEANIC)
/* This iterator iterates over all terrain types. */
#define terrain_type_iterate(id) \
diff -ruN -Xfreeciv/diff_ignore freeciv/data/civ1/buildings.ruleset
freeciv_/data/civ1/buildings.ruleset
--- freeciv/data/civ1/buildings.ruleset 2004-07-14 00:52:17.000000000 +0200
+++ freeciv_/data/civ1/buildings.ruleset 2004-08-20 23:00:30.000000000
+0200
@@ -302,7 +302,7 @@
bldg_req = "None"
graphic = "b.coastal_defense"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -444,7 +444,7 @@
bldg_req = "None"
graphic = "b.harbour"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -658,7 +658,7 @@
bldg_req = "None"
graphic = "b.offshore_platform"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -750,7 +750,7 @@
bldg_req = "None"
graphic = "b.port_facility"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
diff -ruN -Xfreeciv/diff_ignore freeciv/data/civ1/terrain.ruleset
freeciv_/data/civ1/terrain.ruleset
--- freeciv/data/civ1/terrain.ruleset 2004-07-09 19:33:55.000000000 +0200
+++ freeciv_/data/civ1/terrain.ruleset 2004-08-20 23:00:30.000000000 +0200
@@ -484,21 +484,21 @@
inconvenient.\
")
-[terrain_unused_0]
-terrain_name = "unused"
-graphic = "-"
-graphic_alt = "-"
-movement_cost = 0
-defense_bonus = 00
-food = 0
+[terrain_deepocean]
+terrain_name = _("Deep Ocean")
+graphic = "deepocean"
+graphic_alt = "ocean"
+movement_cost = 1
+defense_bonus = 10
+food = 1
shield = 0
-trade = 0
-special_1_name = "none"
-graphic_special_1 = "-"
+trade = 2
+special_1_name = _("Fish")
+graphic_special_1 = "ts.fish"
graphic_special_1a = "-"
-food_special_1 = 0
+food_special_1 = 3
shield_special_1 = 0
-trade_special_1 = 0
+trade_special_1 = 2
special_2_name = "none"
graphic_special_2 = "-"
graphic_special_2a = "-"
@@ -506,7 +506,7 @@
shield_special_2 = 0
trade_special_2 = 0
road_trade_incr = 0
-road_time = 2
+road_time = 0
irrigation_result = "no"
irrigation_food_incr = 0
irrigation_time = 0
@@ -515,7 +515,13 @@
mining_time = 0
transform_result = "no"
transform_time = 0
-helptext = ""
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
[terrain_swamp]
terrain_name = _("Swamp")
@@ -589,3 +595,42 @@
Tundra are broad, cold regions, fit for some agriculture and little\
else.\
")
+
+[terrain_abyss]
+terrain_name = _("Abyss")
+graphic = "Abyss"
+graphic_alt = "ocean"
+movement_cost = 1
+defense_bonus = 10
+food = 1
+shield = 0
+trade = 2
+special_1_name = _("Fish")
+graphic_special_1 = "ts.fish"
+graphic_special_1a = "-"
+food_special_1 = 3
+shield_special_1 = 0
+trade_special_1 = 2
+special_2_name = "none"
+graphic_special_2 = "-"
+graphic_special_2a = "-"
+food_special_2 = 0
+shield_special_2 = 0
+trade_special_2 = 0
+road_trade_incr = 0
+road_time = 0
+irrigation_result = "no"
+irrigation_food_incr = 0
+irrigation_time = 0
+mining_result = "no"
+mining_shield_incr = 0
+mining_time = 0
+transform_result = "no"
+transform_time = 0
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
diff -ruN -Xfreeciv/diff_ignore freeciv/data/civ2/buildings.ruleset
freeciv_/data/civ2/buildings.ruleset
--- freeciv/data/civ2/buildings.ruleset 2004-07-14 00:52:17.000000000 +0200
+++ freeciv_/data/civ2/buildings.ruleset 2004-08-20 23:00:30.000000000
+0200
@@ -283,7 +283,7 @@
bldg_req = "None"
graphic = "b.coastal_defense"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -425,7 +425,7 @@
name = _("Harbour")
tech_req = "Seafaring"
bldg_req = "None"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
graphic = "b.harbour"
graphic_alt = "-"
;spec_gate =
@@ -645,7 +645,7 @@
bldg_req = "None"
graphic = "b.offshore_platform"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -738,7 +738,7 @@
bldg_req = "None"
graphic = "b.port_facility"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
diff -ruN -Xfreeciv/diff_ignore freeciv/data/civ2/terrain.ruleset
freeciv_/data/civ2/terrain.ruleset
--- freeciv/data/civ2/terrain.ruleset 2004-07-09 19:33:55.000000000 +0200
+++ freeciv_/data/civ2/terrain.ruleset 2004-08-20 23:00:30.000000000 +0200
@@ -497,27 +497,27 @@
inconvenient.\
")
-[terrain_unused_0]
-terrain_name = "unused"
-graphic = "-"
-graphic_alt = "-"
-movement_cost = 0
-defense_bonus = 00
-food = 0
+[terrain_deepocean]
+terrain_name = _("Deep Ocean")
+graphic = "deepocean"
+graphic_alt = "ocean"
+movement_cost = 1
+defense_bonus = 10
+food = 1
shield = 0
-trade = 0
-special_1_name = "none"
-graphic_special_1 = "-"
+trade = 2
+special_1_name = _("Fish")
+graphic_special_1 = "ts.fish"
graphic_special_1a = "-"
-food_special_1 = 0
+food_special_1 = 3
shield_special_1 = 0
-trade_special_1 = 0
-special_2_name = "none"
-graphic_special_2 = "-"
+trade_special_1 = 2
+special_2_name = _("Whales")
+graphic_special_2 = "ts.whales"
graphic_special_2a = "-"
-food_special_2 = 0
-shield_special_2 = 0
-trade_special_2 = 0
+food_special_2 = 2
+shield_special_2 = 2
+trade_special_2 = 3
road_trade_incr = 0
road_time = 0
irrigation_result = "no"
@@ -528,6 +528,13 @@
mining_time = 0
transform_result = "no"
transform_time = 0
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
[terrain_swamp]
terrain_name = _("Swamp")
@@ -602,3 +609,42 @@
Tundra are broad, cold regions, fit for some agriculture and little\
else.\
")
+
+[terrain_abyss]
+terrain_name = _("Abyss")
+graphic = "abyss"
+graphic_alt = "ocean"
+movement_cost = 1
+defense_bonus = 10
+food = 1
+shield = 0
+trade = 2
+special_1_name = _("Fish")
+graphic_special_1 = "ts.fish"
+graphic_special_1a = "-"
+food_special_1 = 3
+shield_special_1 = 0
+trade_special_1 = 2
+special_2_name = _("Whales")
+graphic_special_2 = "ts.whales"
+graphic_special_2a = "-"
+food_special_2 = 2
+shield_special_2 = 2
+trade_special_2 = 3
+road_trade_incr = 0
+road_time = 0
+irrigation_result = "no"
+irrigation_food_incr = 0
+irrigation_time = 0
+mining_result = "no"
+mining_shield_incr = 0
+mining_time = 0
+transform_result = "no"
+transform_time = 0
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
\ Pas de fin de ligne à la fin du fichier.
diff -ruN -Xfreeciv/diff_ignore freeciv/data/default/buildings.ruleset
freeciv_/data/default/buildings.ruleset
--- freeciv/data/default/buildings.ruleset 2004-07-14 18:40:57.000000000
+0200
+++ freeciv_/data/default/buildings.ruleset 2004-08-20 23:00:30.000000000
+0200
@@ -330,7 +330,7 @@
bldg_req = "None"
graphic = "b.coastal_defense"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -476,7 +476,7 @@
bldg_req = "None"
graphic = "b.harbour"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -701,7 +701,7 @@
bldg_req = "None"
graphic = "b.offshore_platform"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
@@ -797,7 +797,7 @@
bldg_req = "None"
graphic = "b.port_facility"
graphic_alt = "-"
-terr_gate = "Ocean"
+terr_gate = "Ocean", "Deep Ocean", "Abyss"
;spec_gate =
equiv_range = "City"
;equiv_dupl =
diff -ruN -Xfreeciv/diff_ignore freeciv/data/default/terrain.ruleset
freeciv_/data/default/terrain.ruleset
--- freeciv/data/default/terrain.ruleset 2004-08-20 10:11:37.000000000
+0200
+++ freeciv_/data/default/terrain.ruleset 2004-08-20 23:00:30.000000000
+0200
@@ -1,5 +1,5 @@
-; Modifying this file:
+; Modifying this file:
; You should not modify this file except to make bugfixes or
; for other "maintenance". If you want to make custom changes,
; you should create a new datadir subdirectory and copy this file
@@ -542,27 +542,27 @@
inconvenient.\
")
-[terrain_unused_0]
-terrain_name = "unused"
-graphic = "-"
-graphic_alt = "-"
-movement_cost = 0
-defense_bonus = 00
-food = 0
+[terrain_deepocean]
+terrain_name = _("Deep Ocean")
+graphic = "deepocean"
+graphic_alt = "ocean"
+movement_cost = 1
+defense_bonus = 10
+food = 1
shield = 0
-trade = 0
-special_1_name = "none"
-graphic_special_1 = "-"
+trade = 2
+special_1_name = _("Fish")
+graphic_special_1 = "ts.fish"
graphic_special_1a = "-"
-food_special_1 = 0
+food_special_1 = 3
shield_special_1 = 0
-trade_special_1 = 0
-special_2_name = "none"
-graphic_special_2 = "-"
+trade_special_1 = 2
+special_2_name = _("Whales")
+graphic_special_2 = "ts.whales"
graphic_special_2a = "-"
-food_special_2 = 0
-shield_special_2 = 0
-trade_special_2 = 0
+food_special_2 = 2
+shield_special_2 = 2
+trade_special_2 = 3
road_trade_incr = 0
road_time = 0
irrigation_result = "no"
@@ -573,11 +573,19 @@
mining_time = 0
transform_result = "no"
transform_time = 0
-rail_time = 0
-airbase_time = 0
-fortress_time = 0
-clean_pollution_time = 0
-clean_fallout_time = 0
+rail_time = 3
+airbase_time = 3
+fortress_time = 3
+clean_pollution_time = 3
+clean_fallout_time = 3
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+On deep ocean some naval unit can be in danger.\
+")
[terrain_swamp]
terrain_name = _("Swamp")
@@ -662,3 +670,48 @@
Tundra are broad, cold regions, fit for some agriculture and little\
else.\
")
+
+[terrain_abyss]
+terrain_name = _("Abyss")
+graphic = "abyss"
+graphic_alt = "ocean"
+movement_cost = 1
+defense_bonus = 10
+food = 1
+shield = 0
+trade = 2
+special_1_name = _("Fish")
+graphic_special_1 = "ts.fish"
+graphic_special_1a = "-"
+food_special_1 = 3
+shield_special_1 = 0
+trade_special_1 = 2
+special_2_name = _("Whales")
+graphic_special_2 = "ts.whales"
+graphic_special_2a = "-"
+food_special_2 = 2
+shield_special_2 = 2
+trade_special_2 = 3
+road_trade_incr = 0
+road_time = 0
+irrigation_result = "no"
+irrigation_food_incr = 0
+irrigation_time = 0
+mining_result = "no"
+mining_shield_incr = 0
+mining_time = 0
+transform_result = "no"
+transform_time = 0
+rail_time = 3
+airbase_time = 3
+fortress_time = 3
+clean_pollution_time = 3
+clean_fallout_time = 3
+flags = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+in so deep oceans some naval unit can be in danger.\
+")
diff -ruN -Xfreeciv/diff_ignore freeciv/data/isotrident/terrain1.spec
freeciv_/data/isotrident/terrain1.spec
--- freeciv/data/isotrident/terrain1.spec 2004-03-24 07:18:19.000000000
+0100
+++ freeciv_/data/isotrident/terrain1.spec 2004-08-20 23:00:30.000000000
+0200
@@ -53,6 +53,9 @@
9, 0, "t.jungle1"
+ 10, 0, "t.deepocean1"
+ 10, 1, "t.abyss1"
+
; Terrain special resources:
0, 2, "ts.oasis"
diff -ruN -Xfreeciv/diff_ignore freeciv/data/isotrident.tilespec
freeciv_/data/isotrident.tilespec
--- freeciv/data/isotrident.tilespec 2004-06-27 18:52:17.000000000 +0200
+++ freeciv_/data/isotrident.tilespec 2004-08-20 23:00:30.000000000 +0200
@@ -129,6 +129,11 @@
num_layers = 1
layer0_match_type = "other"
+[terrain_deepocean]
+is_blended = 1
+num_layers = 1
+layer0_match_type = "other"
+
[terrain_swamp]
is_blended = 1
num_layers = 1
@@ -138,3 +143,8 @@
is_blended = 1
num_layers = 1
layer0_match_type = "other"
+
+[terrain_abyss]
+is_blended = 1
+num_layers = 1
+layer0_match_type = "other"
diff -ruN -Xfreeciv/diff_ignore freeciv/server/savegame.c
freeciv_/server/savegame.c
--- freeciv/server/savegame.c 2004-08-18 20:11:05.000000000 +0200
+++ freeciv_/server/savegame.c 2004-08-20 23:00:30.000000000 +0200
@@ -83,7 +83,7 @@
line[nat_x] = (GET_XY_CHAR); \
if (!my_isprint(line[nat_x] & 0x7f)) { \
die("Trying to write invalid map " \
- "data: '%c' %d", line[nat_x], line[nat_x]); \
+ "data: %d '%c' ", line[nat_x], line[nat_x]); \
} \
} \
line[map.xsize] = '\0'; \
@@ -180,7 +180,7 @@
"startunits turn_last_built improvement_order technology_order"
static const char hex_chars[] = "0123456789abcdef";
-static const char terrain_chars[] = "adfghjm prstu";
+static const char terrain_chars[] = "adfghjm p.st:u";
/***************************************************************
This returns an ascii hex value of the given half-byte of the binary
diff -ruN -Xfreeciv/diff_ignore freeciv/server/stLr2K07 freeciv_/server/stLr2K07
--- freeciv/server/stLr2K07 1970-01-01 01:00:00.000000000 +0100
+++ freeciv_/server/stLr2K07 2004-08-20 23:00:30.000000000 +0200
@@ -0,0 +1 @@
+!<arch>
|
|