27 , game_config_(game_config)
56 const std::map<t_translation::t_terrain,terrain_type>::const_iterator
i =
62 return default_terrain;
67 const std::map<t_translation::t_terrain,terrain_type>::const_iterator
i =
75 return i->second.mvt_type();
81 const std::map<t_translation::t_terrain, terrain_type>::const_iterator
i =
89 return i->second.def_type();
95 const std::map<t_translation::t_terrain,terrain_type>::const_iterator
i =
103 return i->second.union_type();
141 assert(!underlying.empty());
143 if(underlying.size() > 1 || underlying[0] !=
terrain) {
145 t_translation::t_list::const_iterator
i = underlying.begin();
147 while (++i != underlying.end()) {
159 const std::map<t_translation::t_terrain, terrain_type>::const_iterator base_iter =
161 const std::map<t_translation::t_terrain, terrain_type>::const_iterator overlay_iter =
168 terrain_type new_terrain(base_iter->second, overlay_iter->second);
170 tcodeToTerrain_.insert(std::pair<t_translation::t_terrain, terrain_type>(
171 new_terrain.
number(), new_terrain));
186 else if(mode ==
BASE) {
child_itors child_range(const std::string &key)
const t_translation::t_list & underlying_union_terrain(const t_translation::t_terrain &terrain) const
const t_terrain NONE_TERRAIN
t_translation::t_terrain merge_terrains(const t_translation::t_terrain &old_t, const t_translation::t_terrain &new_t, const tmerge_mode mode, bool replace_if_failed=false)
Tries to merge old and new terrain using the merge_settings config Relevant parameters are "layer" an...
const t_string & name() const
const t_string & editor_name() const
t_translation::t_terrain number() const
const terrain_type & get_terrain_info(const t_translation::t_terrain &terrain) const
Get the corresponding terrain_type information object for a given type of terrain.
bool try_merge_terrains(const t_translation::t_terrain &terrain)
Tries to find out if "terrain" can be created by combining two existing terrains Will add the resulti...
t_translation::t_terrain default_base() const
std::string default_terrain
std::string get_terrain_editor_string(const t_translation::t_terrain &terrain) const
static const ::config * terrain
The terrain used to create the cache.
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...
const std::map< t_translation::t_terrain, terrain_type > & map() const
const t_translation::t_list & underlying_def_terrain(const t_translation::t_terrain &terrain) const
const t_translation::t_list & list() const
Game configuration data as global variables.
std::string get_terrain_string(const t_translation::t_terrain &terrain) const
Get a formatted terrain name – terrain (underlying, terrains)
t_translation::t_terrain terrain_with_default_base() const
std::string get_underlying_terrain_string(const t_translation::t_terrain &terrain) const
t_translation::t_list terrainList_
void create_terrain_maps(const config::const_child_itors &cfgs, t_translation::t_list &terrain_list, std::map< t_translation::t_terrain, terrain_type > &letter_to_terrain)
terrain_type_data(const config &game_config)
A config object defines a single node in a WML file, with access to child nodes.
const t_string & description() const
std::map< t_translation::t_terrain, terrain_type > tcodeToTerrain_
const config & game_config_
GLsizei const GLcharARB ** string
std::vector< t_terrain > t_list
const t_translation::t_list & underlying_mvt_terrain(const t_translation::t_terrain &terrain) const