[Freeciv-Dev] (PR#7261) restructure tileset to avoid explicit terrain me
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#7261) restructure tileset to avoid explicit terrain mention |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Thu, 22 Jan 2004 19:07:41 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7261 >
Here's a new patch for this, making the changes suggested.
It still doesn't have documentation.
Also T_RIVER still doesn't work in isotrident.
jason
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.137
diff -u -r1.137 tilespec.c
--- client/tilespec.c 2004/01/20 21:52:07 1.137
+++ client/tilespec.c 2004/01/23 03:07:34
@@ -78,7 +78,6 @@
int num_tiles_explode_unit=0;
-static bool is_mountainous = FALSE;
static int roadstyle;
static int flag_offset_x, flag_offset_y;
@@ -133,6 +132,7 @@
* This hash table maps tilespec tags to struct small_sprites.
*/
static struct hash_table *sprite_hash = NULL;
+static struct hash_table *terrain_hash;
#define TILESPEC_CAPSTR "+tilespec2 duplicates_ok roadstyle"
/*
@@ -265,6 +265,8 @@
***********************************************************************/
static void tilespec_free_toplevel(void)
{
+ int entries;
+
if (city_names_font) {
free(city_names_font);
city_names_font = NULL;
@@ -281,6 +283,16 @@
free(minimap_intro_filename);
minimap_intro_filename = NULL;
}
+
+ for (entries = hash_num_entries(terrain_hash); entries > 0; entries--) {
+ const struct terrain_drawing_data *draw;
+
+ draw = hash_value_by_number(terrain_hash, 0);
+ hash_delete_entry(terrain_hash, draw->name);
+ free(draw->name);
+ free((void *) draw);
+ }
+ hash_free(terrain_hash);
}
/**********************************************************************
@@ -580,8 +592,8 @@
struct section_file the_file, *file = &the_file;
char *fname, *c;
int i;
- int num_spec_files;
- char **spec_filenames;
+ int num_spec_files, num_terrains;
+ char **spec_filenames, **terrains;
char *file_capstr;
bool duplicates_ok;
@@ -635,8 +647,6 @@
UNIT_TILE_WIDTH, UNIT_TILE_HEIGHT,
SMALL_TILE_WIDTH, SMALL_TILE_HEIGHT);
- is_mountainous = secfile_lookup_bool_default(file, FALSE,
- "tilespec.is_mountainous");
roadstyle = secfile_lookup_int_default(file, is_isometric ? 0 : 1,
"tilespec.roadstyle");
flag_offset_x = secfile_lookup_int_default(file, 0,
@@ -660,6 +670,35 @@
minimap_intro_filename = tilespec_gfx_filename(c);
freelog(LOG_DEBUG, "radar file %s", minimap_intro_filename);
+
+ /* Terrain drawing info. */
+ terrains = secfile_get_secnames_prefix(file, "terrain_", &num_terrains);
+ if (num_terrains == 0) {
+ freelog(LOG_FATAL, "No terrain types supported by tileset.");
+ exit(EXIT_FAILURE);
+ }
+
+ terrain_hash = hash_new(hash_fval_string, hash_fcmp_string);
+
+ for (i = 0; i < num_terrains; i++) {
+ struct terrain_drawing_data *terr = fc_malloc(sizeof(*terr));
+
+ memset(terr, 0, sizeof(*terr));
+ terr->name = mystrdup(terrains[i] + strlen("terrain_"));
+ terr->is_blended = secfile_lookup_bool(file, "%s.is_blended",
+ terrains[i]);
+ terr->is_layered = secfile_lookup_bool(file, "%s.is_layered",
+ terrains[i]);
+ terr->match_type = secfile_lookup_int(file, "%s.match_type",
+ terrains[i]);
+
+ if (!hash_insert(terrain_hash, terr->name, terr)) {
+ die("warning: duplicate terrain entry %s.", terrains[i]);
+ }
+ }
+ free(terrains);
+
+
spec_filenames = secfile_lookup_str_vec(file, &num_spec_files,
"tilespec.files");
if (num_spec_files == 0) {
@@ -668,6 +707,7 @@
}
sprite_hash = hash_new(hash_fval_string, hash_fcmp_string);
+
specfile_list_init(&specfiles);
for (i = 0; i < num_spec_files; i++) {
struct specfile *sf = fc_malloc(sizeof(*sf));
@@ -986,21 +1026,6 @@
}
if (is_isometric) {
- for(i=0; i<NUM_DIRECTION_NSEW; i++) {
- my_snprintf(buffer, sizeof(buffer), "tx.s_forest_%s", nsew_str(i));
- SET_SPRITE(tx.spec_forest[i], buffer);
- }
-
- for(i=0; i<NUM_DIRECTION_NSEW; i++) {
- my_snprintf(buffer, sizeof(buffer), "tx.s_mountain_%s", nsew_str(i));
- SET_SPRITE(tx.spec_mountain[i], buffer);
- }
-
- for(i=0; i<NUM_DIRECTION_NSEW; i++) {
- my_snprintf(buffer, sizeof(buffer), "tx.s_hill_%s", nsew_str(i));
- SET_SPRITE(tx.spec_hill[i], buffer);
- }
-
for (i=0; i<4; i++) {
for (j=0; j<8; j++) {
char *dir2 = "udlr";
@@ -1132,59 +1157,67 @@
Set tile_type sprite values; should only happen after
tilespec_load_tiles().
***********************************************************************/
-void tilespec_setup_tile_type(int id)
+void tilespec_setup_tile_type(enum tile_terrain_type terrain)
{
- struct tile_type *tt = get_tile_type(id);
+ struct tile_type *tt = get_tile_type(terrain);
+ struct terrain_drawing_data *draw;
char buffer1[MAX_LEN_NAME+20];
- char buffer2[MAX_LEN_NAME+20];
char *nsew;
int i;
if(tt->terrain_name[0] == '\0') {
- for(i=0; i<NUM_DIRECTION_NSEW; i++) {
- tt->sprite[i] = NULL;
- }
- for(i=0; i<2; i++) {
- tt->special[i].sprite = NULL;
- }
return;
}
- if (is_isometric) {
- my_snprintf(buffer1, sizeof(buffer1), "%s1", tt->graphic_str);
- if (id != T_RIVER) {
- tt->sprite[0] = lookup_sprite_tag_alt(buffer1, NULL, TRUE, "tile_type",
- tt->terrain_name);
- } else {
- tt->sprite[0] = NULL;
+ draw = hash_lookup_data(terrain_hash, tt->graphic_str);
+ if (!draw) {
+ draw = hash_lookup_data(terrain_hash, tt->graphic_alt);
+ if (!draw) {
+ freelog(LOG_FATAL, "No graphics %s or %s for %s terrain.",
+ tt->graphic_str, tt->graphic_alt, tt->terrain_name);
+ exit(-1);
}
- } else {
- for(i=0; i<NUM_DIRECTION_NSEW; i++) {
- nsew = nsew_str(i);
- my_snprintf(buffer1, sizeof(buffer1), "%s_%s", tt->graphic_str, nsew);
- my_snprintf(buffer2, sizeof(buffer2), "%s_%s", tt->graphic_alt, nsew);
+ }
- tt->sprite[i] = lookup_sprite_tag_alt(buffer1, buffer2, TRUE,
"tile_type",
- tt->terrain_name);
+ if (draw->match_type == 0 || draw->is_layered) {
+ /* Load single sprite for this terrain. */
+ my_snprintf(buffer1, sizeof(buffer1), "t.%s1", draw->name);
+ draw->base = lookup_sprite_tag_alt(buffer1, "", TRUE, "tile_type",
+ tt->terrain_name);
+ }
+
+ if (draw->match_type != 0) {
+ /* Load 16 cardinally-blended sprites. */
+ for (i = 0; i < NUM_DIRECTION_NSEW; i++) {
+ nsew = nsew_str(i);
- assert(tt->sprite[i] != NULL);
+ my_snprintf(buffer1, sizeof(buffer1), "t.%s_%s", draw->name, nsew);
+ draw->blend[i] = lookup_sprite_tag_alt(buffer1, "", TRUE,
+ "tile_type", tt->terrain_name);
+ assert(draw->blend[i] != NULL);
/* should probably do something if NULL, eg generic default? */
}
+
+ if (!draw->base) {
+ draw->base = draw->blend[0];
+ }
}
for (i=0; i<2; i++) {
char *name = (i != 0) ? tt->special_2_name : tt->special_1_name;
if (name[0] != '\0') {
- tt->special[i].sprite
+ draw->special[i]
= lookup_sprite_tag_alt(tt->special[i].graphic_str,
tt->special[i].graphic_alt,
name[0] != '\0', "tile_type special", name);
- assert(tt->special[i].sprite != NULL);
+ assert(draw->special[i] != NULL);
} else {
- tt->special[i].sprite = NULL;
+ draw->special[i] = NULL;
}
/* should probably do something if NULL, eg generic default? */
}
+
+ sprites.terrain[terrain] = draw;
}
/**********************************************************************
@@ -1538,36 +1571,15 @@
if (ttype_other == T_UNKNOWN)
return sprites.black_tile;
- if (is_ocean(ttype) || ttype == T_JUNGLE) {
+ if (!sprites.terrain[ttype]->is_blended) {
return NULL;
}
if (is_ocean(ttype_other)) {
return sprites.coast_color;
}
-
- if (ttype_other != T_UNKNOWN && ttype_other != T_LAST)
- return get_tile_type(ttype_other)->sprite[0];
- else
- return NULL;
-}
-
-/**********************************************************************
- Return TRUE iff the two mountainous terrain types should be blended.
- If is_mountainous set, the tileset will be "mountainous" and consider
- adjacent hills and mountains interchangable. If it's unset then
- hills will only blend with hills and mountains only with mountains.
-***********************************************************************/
-static bool can_blend_hills_and_mountains(enum tile_terrain_type ttype,
- enum tile_terrain_type ttype_adjc)
-{
- assert(ttype == T_HILLS || ttype == T_MOUNTAINS);
- if (is_mountainous) {
- return ttype_adjc == T_HILLS || ttype_adjc == T_MOUNTAINS;
- } else {
- return ttype_adjc == ttype;
- }
+ return sprites.terrain[ttype_other]->base;
}
/**************************************************************************
@@ -1902,43 +1914,19 @@
}
}
} else {
- ADD_SPRITE_SIMPLE(get_tile_type(ttype)->sprite[0]);
-
- switch (ttype) {
- case T_HILLS:
- tileno = INDEX_NSEW(can_blend_hills_and_mountains(T_HILLS,
- ttype_near[DIR8_NORTH]),
- can_blend_hills_and_mountains(T_HILLS,
- ttype_near[DIR8_SOUTH]),
- can_blend_hills_and_mountains(T_HILLS,
- ttype_near[DIR8_EAST]),
- can_blend_hills_and_mountains(T_HILLS,
- ttype_near[DIR8_WEST]));
- ADD_SPRITE_SIMPLE(sprites.tx.spec_hill[tileno]);
- break;
-
- case T_FOREST:
- tileno = INDEX_NSEW(ttype_near[DIR8_NORTH] == T_FOREST,
- ttype_near[DIR8_SOUTH] == T_FOREST,
- ttype_near[DIR8_EAST] == T_FOREST,
- ttype_near[DIR8_WEST] == T_FOREST);
- ADD_SPRITE_SIMPLE(sprites.tx.spec_forest[tileno]);
- break;
-
- case T_MOUNTAINS:
- tileno = INDEX_NSEW(can_blend_hills_and_mountains(T_MOUNTAINS,
- ttype_near[DIR8_NORTH]),
- can_blend_hills_and_mountains(T_MOUNTAINS,
- ttype_near[DIR8_SOUTH]),
- can_blend_hills_and_mountains(T_MOUNTAINS,
- ttype_near[DIR8_EAST]),
- can_blend_hills_and_mountains(T_MOUNTAINS,
- ttype_near[DIR8_WEST]));
- ADD_SPRITE_SIMPLE(sprites.tx.spec_mountain[tileno]);
- break;
+ if (sprites.terrain[ttype]->match_type == 0
+ || sprites.terrain[ttype]->is_layered) {
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->base);
+ } else {
+ int match_type = sprites.terrain[ttype]->match_type;
- default:
- break;
+#define BLEND(dir) (sprites.terrain[ttype_near[(dir)]]->match_type)
+ tileno = INDEX_NSEW(BLEND(DIR8_NORTH) == match_type,
+ BLEND(DIR8_SOUTH) == match_type,
+ BLEND(DIR8_EAST) == match_type,
+ BLEND(DIR8_WEST) == match_type);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->blend[tileno]);
+#undef BLEND
}
sprs += fill_irrigation_sprite_array(sprs, tspecial, tspecial_near,
@@ -1988,9 +1976,9 @@
if (draw_specials) {
if (contains_special(tspecial, S_SPECIAL_1)) {
- ADD_SPRITE_SIMPLE(tile_types[ttype].special[0].sprite);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[0]);
} else if (contains_special(tspecial, S_SPECIAL_2)) {
- ADD_SPRITE_SIMPLE(tile_types[ttype].special[1].sprite);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[1]);
}
}
@@ -2000,9 +1988,9 @@
if (draw_specials) {
if (contains_special(tspecial, S_SPECIAL_1)) {
- ADD_SPRITE_SIMPLE(tile_types[ttype].special[0].sprite);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[0]);
} else if (contains_special(tspecial, S_SPECIAL_2)) {
- ADD_SPRITE_SIMPLE(tile_types[ttype].special[1].sprite);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[1]);
}
}
@@ -2130,17 +2118,19 @@
abs_x0>=34 && abs_x0<=36 && abs_y0>=den_y && abs_y0<=den_y+1) {
mysprite = sprites.tx.denmark[abs_y0-den_y][abs_x0-34];
} else {
- tileno = INDEX_NSEW(ttype_near[DIR8_NORTH] == ttype,
- ttype_near[DIR8_SOUTH] == ttype,
- ttype_near[DIR8_EAST] == ttype,
- ttype_near[DIR8_WEST] == ttype);
- if(ttype==T_RIVER) {
- tileno |= INDEX_NSEW(is_ocean(ttype_near[DIR8_NORTH]),
- is_ocean(ttype_near[DIR8_SOUTH]),
- is_ocean(ttype_near[DIR8_EAST]),
- is_ocean(ttype_near[DIR8_WEST]));
+ if (sprites.terrain[ttype]->match_type == 0) {
+ mysprite = sprites.terrain[ttype]->base;
+ } else {
+ int match_type = sprites.terrain[ttype]->match_type;
+
+#define BLEND(dir) (sprites.terrain[ttype_near[(dir)]]->match_type)
+ tileno = INDEX_NSEW(BLEND(DIR8_NORTH) == match_type,
+ BLEND(DIR8_SOUTH) == match_type,
+ BLEND(DIR8_EAST) == match_type,
+ BLEND(DIR8_WEST) == match_type);
+ mysprite = sprites.terrain[ttype]->blend[tileno];
+#undef BLEND
}
- mysprite = get_tile_type(ttype)->sprite[tileno];
}
if (draw_terrain)
@@ -2191,9 +2181,9 @@
if(draw_specials) {
if (contains_special(tspecial, S_SPECIAL_1))
- ADD_SPRITE_SIMPLE(tile_types[ttype].special[0].sprite);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[0]);
else if (contains_special(tspecial, S_SPECIAL_2))
- ADD_SPRITE_SIMPLE(tile_types[ttype].special[1].sprite);
+ ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[1]);
}
if(contains_special(tspecial, S_MINE) && draw_mines) {
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.49
diff -u -r1.49 tilespec.h
--- client/tilespec.h 2004/01/11 17:45:03 1.49
+++ client/tilespec.h 2004/01/23 03:07:34
@@ -18,8 +18,6 @@
#ifndef FC__TILESPEC_H
#define FC__TILESPEC_H
-#include "map.h" /* NUM_DIRECTION_NSEW */
-
#include "citydlg_common.h" /* enum citizen_type */
#include "colors_g.h"
#include "options.h"
@@ -45,7 +43,7 @@
void tilespec_setup_unit_type(int id);
void tilespec_setup_impr_type(int id);
void tilespec_setup_tech_type(int id);
-void tilespec_setup_tile_type(int id);
+void tilespec_setup_tile_type(enum tile_terrain_type terrain);
void tilespec_setup_government(int id);
void tilespec_setup_nation_flag(int id);
void tilespec_setup_city_tiles(int style);
@@ -76,6 +74,8 @@
/* This the way directional indices are now encoded: */
+#define NUM_DIRECTION_NSEW 16
+
#define BIT_NORTH (0x01)
#define BIT_SOUTH (0x02)
#define BIT_EAST (0x04)
@@ -97,6 +97,18 @@
DIR4_NORTH = 0, DIR4_SOUTH, DIR4_EAST, DIR4_WEST
};
+struct terrain_drawing_data {
+ char *name;
+
+ bool is_blended;
+ bool is_layered;
+ int match_type;
+
+ struct Sprite *base;
+ struct Sprite *blend[NUM_DIRECTION_NSEW];
+ struct Sprite *special[2];
+};
+
struct named_sprites {
struct Sprite
*bulb[NUM_TILES_PROGRESS],
@@ -202,15 +214,13 @@
*spec_river[NUM_DIRECTION_NSEW],
*darkness[NUM_DIRECTION_NSEW], /* first unused */
*river_outlet[4], /* indexed by enum direction4 */
- /* for isometric */
- *spec_forest[NUM_DIRECTION_NSEW],
- *spec_mountain[NUM_DIRECTION_NSEW],
- *spec_hill[NUM_DIRECTION_NSEW],
*coast_cape_iso[8][4], /* 4 = up down left right */
/* for non-isometric */
*coast_cape[NUM_DIRECTION_NSEW], /* first unused */
*denmark[2][3]; /* row, column */
} tx; /* terrain extra */
+
+ struct terrain_drawing_data *terrain[MAX_NUM_TERRAINS];
};
extern struct named_sprites sprites;
Index: common/map.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.h,v
retrieving revision 1.169
diff -u -r1.169 map.h
--- common/map.h 2004/01/20 21:52:08 1.169
+++ common/map.h 2004/01/23 03:07:34
@@ -21,10 +21,6 @@
#include "terrain.h"
#include "unit.h"
-struct Sprite; /* opaque; client-gui specific */
-
-#define NUM_DIRECTION_NSEW 16
-
/*
* The value of MOVE_COST_FOR_VALID_SEA_STEP has no particular
* meaning. The value is only used for comparison. The value must be
@@ -75,7 +71,6 @@
char terrain_name_orig[MAX_LEN_NAME]; /* untranslated copy */
char graphic_str[MAX_LEN_NAME];
char graphic_alt[MAX_LEN_NAME];
- struct Sprite *sprite[NUM_DIRECTION_NSEW];
int movement_cost;
int defense_bonus;
@@ -101,7 +96,6 @@
struct {
char graphic_str[MAX_LEN_NAME];
char graphic_alt[MAX_LEN_NAME];
- struct Sprite *sprite;
} special[2];
int road_trade_incr;
Index: common/terrain.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.h,v
retrieving revision 1.11
diff -u -r1.11 terrain.h
--- common/terrain.h 2004/01/22 23:52:21 1.11
+++ common/terrain.h 2004/01/23 03:07:34
@@ -70,6 +70,7 @@
};
#define T_FIRST (T_ARCTIC)
#define T_COUNT (T_UNKNOWN)
+#define MAX_NUM_TERRAINS (T_LAST)
enum terrain_flag_id {
TER_NO_BARBS, /* No barbarians summoned on this terrain. */
Index: data/isotrident.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident.tilespec,v
retrieving revision 1.8
diff -u -r1.8 isotrident.tilespec
--- data/isotrident.tilespec 2003/02/02 00:15:53 1.8
+++ data/isotrident.tilespec 2004/01/23 03:07:34
@@ -53,3 +53,69 @@
"isotrident/nuke.spec",
"isotrident/cities.spec",
"isotrident/morecities.spec"
+
+[terrain_arctic]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_desert]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_forest]
+is_blended = 1
+is_layered = 1
+match_type = 1
+
+[terrain_grassland]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_hills]
+is_blended = 1
+is_layered = 1
+match_type = 2
+
+[terrain_jungle]
+is_blended = 0
+is_layered = 0
+match_type = 0
+
+[terrain_mountains]
+is_blended = 1
+is_layered = 1
+match_type = 3
+
+; ocean has special handling
+[terrain_ocean]
+is_blended = 0
+is_layered = 0
+match_type = 0
+
+[terrain_plains]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_swamp]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_tundra]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_unknown]
+is_blended = 1
+is_layered = 0
+match_type = 0
+
+[terrain_t_river]
+is_blended = 1
+is_layered = 1
+match_type = 5
Index: data/trident.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident.tilespec,v
retrieving revision 1.15
diff -u -r1.15 trident.tilespec
--- data/trident.tilespec 2003/02/02 00:15:53 1.15
+++ data/trident.tilespec 2004/01/23 03:07:34
@@ -51,3 +51,69 @@
"misc/treaty.spec",
"trident/cities.spec",
"trident/explosions.spec"
+
+[terrain_arctic]
+is_blended = 0
+is_layered = 0
+match_type = 1
+
+[terrain_desert]
+is_blended = 0
+is_layered = 0
+match_type = 2
+
+[terrain_forest]
+is_blended = 0
+is_layered = 0
+match_type = 3
+
+[terrain_grassland]
+is_blended = 0
+is_layered = 0
+match_type = 3
+
+[terrain_hills]
+is_blended = 0
+is_layered = 0
+match_type = 4
+
+[terrain_jungle]
+is_blended = 0
+is_layered = 0
+match_type = 5
+
+[terrain_mountains]
+is_blended = 0
+is_layered = 0
+match_type = 6
+
+; ocean has special handling
+[terrain_ocean]
+is_blended = 0
+is_layered = 0
+match_type = 7
+
+[terrain_plains]
+is_blended = 0
+is_layered = 0
+match_type = 8
+
+[terrain_swamp]
+is_blended = 0
+is_layered = 0
+match_type = 9
+
+[terrain_tundra]
+is_blended = 0
+is_layered = 0
+match_type = 10
+
+[terrain_unknown]
+is_blended = 0
+is_layered = 0
+match_type = 11
+
+[terrain_t_river]
+is_blended = 0
+is_layered = 0
+match_type = 7
Index: data/civ1/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ1/terrain.ruleset,v
retrieving revision 1.19
diff -u -r1.19 terrain.ruleset
--- data/civ1/terrain.ruleset 2004/01/22 23:52:21 1.19
+++ data/civ1/terrain.ruleset 2004/01/23 03:07:34
@@ -154,7 +154,7 @@
[terrain_arctic]
terrain_name = _("Arctic")
-graphic = "t.arctic"
+graphic = "arctic"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 10
@@ -192,7 +192,7 @@
[terrain_desert]
terrain_name = _("Desert")
-graphic = "t.desert"
+graphic = "desert"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -228,7 +228,7 @@
[terrain_forest]
terrain_name = _("Forest")
-graphic = "t.forest"
+graphic = "forest"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -264,7 +264,7 @@
[terrain_grassland]
terrain_name = _("Grassland")
-graphic = "t.grassland"
+graphic = "grassland"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -300,7 +300,7 @@
[terrain_hills]
terrain_name = _("Hills")
-graphic = "t.hills"
+graphic = "hills"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 20
@@ -336,7 +336,7 @@
[terrain_jungle]
terrain_name = _("Jungle")
-graphic = "t.jungle"
+graphic = "jungle"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -372,7 +372,7 @@
[terrain_mountains]
terrain_name = _("Mountains")
-graphic = "t.mountains"
+graphic = "mountains"
graphic_alt = "-"
movement_cost = 3
defense_bonus = 30
@@ -408,7 +408,7 @@
[terrain_ocean]
terrain_name = _("Ocean")
-graphic = "t.ocean"
+graphic = "ocean"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -447,7 +447,7 @@
[terrain_plains]
terrain_name = _("Plains")
-graphic = "t.plains"
+graphic = "plains"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -484,7 +484,7 @@
[terrain_river]
terrain_name = _("River")
-graphic = "t.t_river"
+graphic = "t_river"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 15
@@ -524,7 +524,7 @@
[terrain_swamp]
terrain_name = _("Swamp")
-graphic = "t.swamp"
+graphic = "swamp"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -560,7 +560,7 @@
[terrain_tundra]
terrain_name = _("Tundra")
-graphic = "t.tundra"
+graphic = "tundra"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
Index: data/civ2/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ2/terrain.ruleset,v
retrieving revision 1.21
diff -u -r1.21 terrain.ruleset
--- data/civ2/terrain.ruleset 2004/01/22 23:52:21 1.21
+++ data/civ2/terrain.ruleset 2004/01/23 03:07:34
@@ -162,7 +162,7 @@
[terrain_glacier]
terrain_name = _("Glacier")
-graphic = "t.arctic"
+graphic = "arctic"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 10
@@ -200,7 +200,7 @@
[terrain_desert]
terrain_name = _("Desert")
-graphic = "t.desert"
+graphic = "desert"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -236,7 +236,7 @@
[terrain_forest]
terrain_name = _("Forest")
-graphic = "t.forest"
+graphic = "forest"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -272,7 +272,7 @@
[terrain_grassland]
terrain_name = _("Grassland")
-graphic = "t.grassland"
+graphic = "grassland"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -308,7 +308,7 @@
[terrain_hills]
terrain_name = _("Hills")
-graphic = "t.hills"
+graphic = "hills"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 20
@@ -344,7 +344,7 @@
[terrain_jungle]
terrain_name = _("Jungle")
-graphic = "t.jungle"
+graphic = "jungle"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -380,7 +380,7 @@
[terrain_mountains]
terrain_name = _("Mountains")
-graphic = "t.mountains"
+graphic = "mountains"
graphic_alt = "-"
movement_cost = 3
defense_bonus = 30
@@ -416,7 +416,7 @@
[terrain_ocean]
terrain_name = _("Ocean")
-graphic = "t.ocean"
+graphic = "ocean"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -455,7 +455,7 @@
[terrain_plains]
terrain_name = _("Plains")
-graphic = "t.plains"
+graphic = "plains"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -524,7 +524,7 @@
[terrain_swamp]
terrain_name = _("Swamp")
-graphic = "t.swamp"
+graphic = "swamp"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -560,7 +560,7 @@
[terrain_tundra]
terrain_name = _("Tundra")
-graphic = "t.tundra"
+graphic = "tundra"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
Index: data/default/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/terrain.ruleset,v
retrieving revision 1.22
diff -u -r1.22 terrain.ruleset
--- data/default/terrain.ruleset 2004/01/22 23:52:21 1.22
+++ data/default/terrain.ruleset 2004/01/23 03:07:34
@@ -162,7 +162,7 @@
[terrain_glacier]
terrain_name = _("Glacier")
-graphic = "t.arctic"
+graphic = "arctic"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 10
@@ -200,7 +200,7 @@
[terrain_desert]
terrain_name = _("Desert")
-graphic = "t.desert"
+graphic = "desert"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -236,7 +236,7 @@
[terrain_forest]
terrain_name = _("Forest")
-graphic = "t.forest"
+graphic = "forest"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -272,7 +272,7 @@
[terrain_grassland]
terrain_name = _("Grassland")
-graphic = "t.grassland"
+graphic = "grassland"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -308,7 +308,7 @@
[terrain_hills]
terrain_name = _("Hills")
-graphic = "t.hills"
+graphic = "hills"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 20
@@ -344,7 +344,7 @@
[terrain_jungle]
terrain_name = _("Jungle")
-graphic = "t.jungle"
+graphic = "jungle"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -380,7 +380,7 @@
[terrain_mountains]
terrain_name = _("Mountains")
-graphic = "t.mountains"
+graphic = "mountains"
graphic_alt = "-"
movement_cost = 3
defense_bonus = 30
@@ -416,7 +416,7 @@
[terrain_ocean]
terrain_name = _("Ocean")
-graphic = "t.ocean"
+graphic = "ocean"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -455,7 +455,7 @@
[terrain_plains]
terrain_name = _("Plains")
-graphic = "t.plains"
+graphic = "plains"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -524,7 +524,7 @@
[terrain_swamp]
terrain_name = _("Swamp")
-graphic = "t.swamp"
+graphic = "swamp"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -560,7 +560,7 @@
[terrain_tundra]
terrain_name = _("Tundra")
-graphic = "t.tundra"
+graphic = "tundra"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
Index: data/history/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/history/terrain.ruleset,v
retrieving revision 1.6
diff -u -r1.6 terrain.ruleset
--- data/history/terrain.ruleset 2004/01/22 23:52:21 1.6
+++ data/history/terrain.ruleset 2004/01/23 03:07:34
@@ -162,7 +162,7 @@
[terrain_glacier]
terrain_name = _("Glacier")
-graphic = "t.arctic"
+graphic = "arctic"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 10
@@ -200,7 +200,7 @@
[terrain_desert]
terrain_name = _("Desert")
-graphic = "t.desert"
+graphic = "desert"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -236,7 +236,7 @@
[terrain_forest]
terrain_name = _("Forest")
-graphic = "t.forest"
+graphic = "forest"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -272,7 +272,7 @@
[terrain_grassland]
terrain_name = _("Grassland")
-graphic = "t.grassland"
+graphic = "grassland"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -308,7 +308,7 @@
[terrain_hills]
terrain_name = _("Hills")
-graphic = "t.hills"
+graphic = "hills"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 20
@@ -344,7 +344,7 @@
[terrain_jungle]
terrain_name = _("Jungle")
-graphic = "t.jungle"
+graphic = "jungle"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -380,7 +380,7 @@
[terrain_mountains]
terrain_name = _("Mountains")
-graphic = "t.mountains"
+graphic = "mountains"
graphic_alt = "-"
movement_cost = 3
defense_bonus = 30
@@ -416,7 +416,7 @@
[terrain_ocean]
terrain_name = _("Ocean")
-graphic = "t.ocean"
+graphic = "ocean"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -455,7 +455,7 @@
[terrain_plains]
terrain_name = _("Plains")
-graphic = "t.plains"
+graphic = "plains"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
@@ -524,7 +524,7 @@
[terrain_swamp]
terrain_name = _("Swamp")
-graphic = "t.swamp"
+graphic = "swamp"
graphic_alt = "-"
movement_cost = 2
defense_bonus = 15
@@ -560,7 +560,7 @@
[terrain_tundra]
terrain_name = _("Tundra")
-graphic = "t.tundra"
+graphic = "tundra"
graphic_alt = "-"
movement_cost = 1
defense_bonus = 10
Index: data/isotrident/terrain1.spec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident/terrain1.spec,v
retrieving revision 1.1
diff -u -r1.1 terrain1.spec
--- data/isotrident/terrain1.spec 2002/05/02 05:46:59 1.1
+++ data/isotrident/terrain1.spec 2004/01/23 03:07:34
@@ -33,6 +33,9 @@
2, 0, "t.grassland1"
2, 1, "t.grassland2"
+ 2, 0, "t.t_river1"
+ 2, 1, "t.t_river2"
+
3, 0, "t.forest1"
3, 1, "t.forest2"
Index: data/isotrident/terrain2.spec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident/terrain2.spec,v
retrieving revision 1.1
diff -u -r1.1 terrain2.spec
--- data/isotrident/terrain2.spec 2002/05/02 05:47:02 1.1
+++ data/isotrident/terrain2.spec 2004/01/23 03:07:35
@@ -44,60 +44,60 @@
;forrests as overlay
- 4, 0, "tx.s_forest_n0s0e0w0"
- 4, 1, "tx.s_forest_n1s0e0w0"
- 4, 2, "tx.s_forest_n0s0e1w0"
- 4, 3, "tx.s_forest_n1s0e1w0"
- 4, 4, "tx.s_forest_n0s1e0w0"
- 4, 5, "tx.s_forest_n1s1e0w0"
- 4, 6, "tx.s_forest_n0s1e1w0"
- 4, 7, "tx.s_forest_n1s1e1w0"
- 5, 0, "tx.s_forest_n0s0e0w1"
- 5, 1, "tx.s_forest_n1s0e0w1"
- 5, 2, "tx.s_forest_n0s0e1w1"
- 5, 3, "tx.s_forest_n1s0e1w1"
- 5, 4, "tx.s_forest_n0s1e0w1"
- 5, 5, "tx.s_forest_n1s1e0w1"
- 5, 6, "tx.s_forest_n0s1e1w1"
- 5, 7, "tx.s_forest_n1s1e1w1"
+ 4, 0, "t.forest_n0s0e0w0"
+ 4, 1, "t.forest_n1s0e0w0"
+ 4, 2, "t.forest_n0s0e1w0"
+ 4, 3, "t.forest_n1s0e1w0"
+ 4, 4, "t.forest_n0s1e0w0"
+ 4, 5, "t.forest_n1s1e0w0"
+ 4, 6, "t.forest_n0s1e1w0"
+ 4, 7, "t.forest_n1s1e1w0"
+ 5, 0, "t.forest_n0s0e0w1"
+ 5, 1, "t.forest_n1s0e0w1"
+ 5, 2, "t.forest_n0s0e1w1"
+ 5, 3, "t.forest_n1s0e1w1"
+ 5, 4, "t.forest_n0s1e0w1"
+ 5, 5, "t.forest_n1s1e0w1"
+ 5, 6, "t.forest_n0s1e1w1"
+ 5, 7, "t.forest_n1s1e1w1"
;mountains as overlay
- 6, 0, "tx.s_mountain_n0s0e0w0"
- 6, 1, "tx.s_mountain_n1s0e0w0"
- 6, 2, "tx.s_mountain_n0s0e1w0"
- 6, 3, "tx.s_mountain_n1s0e1w0"
- 6, 4, "tx.s_mountain_n0s1e0w0"
- 6, 5, "tx.s_mountain_n1s1e0w0"
- 6, 6, "tx.s_mountain_n0s1e1w0"
- 6, 7, "tx.s_mountain_n1s1e1w0"
- 7, 0, "tx.s_mountain_n0s0e0w1"
- 7, 1, "tx.s_mountain_n1s0e0w1"
- 7, 2, "tx.s_mountain_n0s0e1w1"
- 7, 3, "tx.s_mountain_n1s0e1w1"
- 7, 4, "tx.s_mountain_n0s1e0w1"
- 7, 5, "tx.s_mountain_n1s1e0w1"
- 7, 6, "tx.s_mountain_n0s1e1w1"
- 7, 7, "tx.s_mountain_n1s1e1w1"
+ 6, 0, "t.mountains_n0s0e0w0"
+ 6, 1, "t.mountains_n1s0e0w0"
+ 6, 2, "t.mountains_n0s0e1w0"
+ 6, 3, "t.mountains_n1s0e1w0"
+ 6, 4, "t.mountains_n0s1e0w0"
+ 6, 5, "t.mountains_n1s1e0w0"
+ 6, 6, "t.mountains_n0s1e1w0"
+ 6, 7, "t.mountains_n1s1e1w0"
+ 7, 0, "t.mountains_n0s0e0w1"
+ 7, 1, "t.mountains_n1s0e0w1"
+ 7, 2, "t.mountains_n0s0e1w1"
+ 7, 3, "t.mountains_n1s0e1w1"
+ 7, 4, "t.mountains_n0s1e0w1"
+ 7, 5, "t.mountains_n1s1e0w1"
+ 7, 6, "t.mountains_n0s1e1w1"
+ 7, 7, "t.mountains_n1s1e1w1"
;hills as overlay
- 8, 0, "tx.s_hill_n0s0e0w0"
- 8, 1, "tx.s_hill_n1s0e0w0"
- 8, 2, "tx.s_hill_n0s0e1w0"
- 8, 3, "tx.s_hill_n1s0e1w0"
- 8, 4, "tx.s_hill_n0s1e0w0"
- 8, 5, "tx.s_hill_n1s1e0w0"
- 8, 6, "tx.s_hill_n0s1e1w0"
- 8, 7, "tx.s_hill_n1s1e1w0"
- 9, 0, "tx.s_hill_n0s0e0w1"
- 9, 1, "tx.s_hill_n1s0e0w1"
- 9, 2, "tx.s_hill_n0s0e1w1"
- 9, 3, "tx.s_hill_n1s0e1w1"
- 9, 4, "tx.s_hill_n0s1e0w1"
- 9, 5, "tx.s_hill_n1s1e0w1"
- 9, 6, "tx.s_hill_n0s1e1w1"
- 9, 7, "tx.s_hill_n1s1e1w1"
+ 8, 0, "t.hills_n0s0e0w0"
+ 8, 1, "t.hills_n1s0e0w0"
+ 8, 2, "t.hills_n0s0e1w0"
+ 8, 3, "t.hills_n1s0e1w0"
+ 8, 4, "t.hills_n0s1e0w0"
+ 8, 5, "t.hills_n1s1e0w0"
+ 8, 6, "t.hills_n0s1e1w0"
+ 8, 7, "t.hills_n1s1e1w0"
+ 9, 0, "t.hills_n0s0e0w1"
+ 9, 1, "t.hills_n1s0e0w1"
+ 9, 2, "t.hills_n0s0e1w1"
+ 9, 3, "t.hills_n1s0e1w1"
+ 9, 4, "t.hills_n0s1e0w1"
+ 9, 5, "t.hills_n1s1e0w1"
+ 9, 6, "t.hills_n0s1e1w1"
+ 9, 7, "t.hills_n1s1e1w1"
;river outlets
|
|