Routines for terrain-conversion. More...
#include "global.hpp"#include "gettext.hpp"#include "log.hpp"#include "terrain_translation.hpp"#include "serialization/string_utils.hpp"#include "util.hpp"#include "wml_exception.hpp"
Go to the source code of this file.
Namespaces | |
| namespace | t_translation |
Defines | |
| #define | GETTEXT_DOMAIN "wesnoth-lib" |
| #define | ERR_G LOG_STREAM(err, lg::general) |
| #define | WRN_G LOG_STREAM(warn, lg::general) |
Functions | |
| size_t | t_translation::max_map_size () |
| Return the maximum allowed map size (in either dimension), the maximum map area is, therefore, this value squared. | |
| static t_layer | t_translation::get_layer_mask_ (t_layer terrain) |
| Get the mask for a single layer. | |
| static t_terrain | t_translation::get_mask_ (const t_terrain &terrain) |
| Gets a mask for a terrain, this mask is used for wildcard matching. | |
| static t_layer | t_translation::string_to_layer_ (const std::string &str) |
| Converts a string to a layer. | |
| static t_terrain | t_translation::string_to_number_ (std::string str, int &start_position, const t_layer filler) |
| Converts a terrain string to a number. | |
| static t_terrain | t_translation::string_to_number_ (const std::string &str, const t_layer filler=NO_LAYER) |
| static std::string | t_translation::number_to_string_ (t_terrain terrain, const int start_position=-1) |
| Converts a terrain number to a string. | |
| static t_terrain | t_translation::string_to_builder_number_ (std::string str) |
| Converts a terrain string to a number for the builder. | |
| const t_match | t_translation::ALL_FORESTS ("F*,*^F*") |
| t_terrain | t_translation::read_terrain_code (const std::string &str, const t_layer filler=NO_LAYER) |
| Reads a single terrain from a string. | |
| std::string | t_translation::write_terrain_code (const t_terrain &tcode) |
| Writes a single terrain code to a string. | |
| t_list | t_translation::read_list (const std::string &str, const t_layer filler=NO_LAYER) |
| Reads a list of terrains from a string, when reading the. | |
| std::string | t_translation::write_list (const t_list &list) |
| Writes a list of terrains to a string, only writes the new format. | |
| t_map | t_translation::read_game_map (const std::string &str, std::map< int, coordinate > &starting_positions) |
| Reads a gamemap string into a 2D vector. | |
| std::string | t_translation::write_game_map (const t_map &map, std::map< int, coordinate > starting_positions=std::map< int, coordinate >()) |
| Write a gamemap in to a vector string. | |
| bool | t_translation::terrain_matches (const t_terrain &src, const t_terrain &dest) |
| Tests whether a specific terrain matches an expression, for matching rules see above. | |
| bool | t_translation::terrain_matches (const t_terrain &src, const t_list &dest) |
| Tests whether a specific terrain matches a list of expressions. | |
| bool | t_translation::terrain_matches (const t_terrain &src, const t_match &dest) |
| Tests whether a certain terrain matches a list of expressions, for matching rules see above. | |
| bool | t_translation::has_wildcard (const t_terrain &tcode) |
| Tests whether a terrain code contains a wildcard. | |
| bool | t_translation::has_wildcard (const t_list &list) |
| Tests whether a terrain-code list contains at least one item with a wildcard. | |
| t_map | t_translation::read_builder_map (const std::string &str) |
| Reads a builder map. | |
Variables | |
| const t_terrain | t_translation::OFF_MAP_USER = string_to_number_("_off^_usr") |
| const t_terrain | t_translation::VOID_TERRAIN = string_to_number_("_s") |
| const t_terrain | t_translation::FOGGED = string_to_number_("_f") |
| const t_terrain | t_translation::HUMAN_CASTLE = string_to_number_("Ch") |
| const t_terrain | t_translation::HUMAN_KEEP = string_to_number_("Kh") |
| const t_terrain | t_translation::SHALLOW_WATER = string_to_number_("Ww") |
| const t_terrain | t_translation::DEEP_WATER = string_to_number_("Wo") |
| const t_terrain | t_translation::GRASS_LAND = string_to_number_("Gg") |
| const t_terrain | t_translation::FOREST = string_to_number_("Gg^Ff") |
| const t_terrain | t_translation::MOUNTAIN = string_to_number_("Mm") |
| const t_terrain | t_translation::HILL = string_to_number_("Hh") |
| const t_terrain | t_translation::CAVE_WALL = string_to_number_("Xu") |
| const t_terrain | t_translation::CAVE = string_to_number_("Uu") |
| const t_terrain | t_translation::UNDERGROUND_VILLAGE = string_to_number_("Uu^Vu") |
| const t_terrain | t_translation::DWARVEN_CASTLE = string_to_number_("Cud") |
| const t_terrain | t_translation::DWARVEN_KEEP = string_to_number_("Kud") |
| const t_terrain | t_translation::PLUS = string_to_number_("+") |
| const t_terrain | t_translation::MINUS = string_to_number_("-") |
| const t_terrain | t_translation::NOT = string_to_number_("!") |
| const t_terrain | t_translation::STAR = string_to_number_("*") |
| const t_terrain | t_translation::BASE = string_to_number_("_bas") |
| const t_match | t_translation::ALL_HILLS ("!,*^V*,!,H*") |
| const t_match | t_translation::ALL_MOUNTAINS ("!,*^V*,!,M*") |
| const t_match | t_translation::ALL_SWAMPS ("!,*^V*,*^B*,!,S*") |
Routines for terrain-conversion.
Definition in file terrain_translation.cpp.
| #define ERR_G LOG_STREAM(err, lg::general) |
Definition at line 32 of file terrain_translation.cpp.
| #define GETTEXT_DOMAIN "wesnoth-lib" |
Definition at line 21 of file terrain_translation.cpp.
| #define WRN_G LOG_STREAM(warn, lg::general) |
Definition at line 33 of file terrain_translation.cpp.
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:10:28 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |