#include "global.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "terrain_translation.hpp"
#include "serialization/string_utils.hpp"
#include "wml_exception.hpp"
#include <iostream>
Go to the source code of this file.
Namespaces | |
namespace | t_translation |
Defines | |
#define | ERR_G LOG_STREAM(err, general) |
#define | WRN_G LOG_STREAM(warn, general) |
Functions | |
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, const size_t min_size) |
Converts a terrain number to a string. | |
static std::string | t_translation::number_to_string_ (t_terrain terrain, const int start_position=-1) |
static t_terrain | t_translation::string_to_builder_number_ (std::string str) |
Converts a terrain string to a number for the builder. | |
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") |
Definition in file terrain_translation.cpp.
#define ERR_G LOG_STREAM(err, general) |
Definition at line 27 of file terrain_translation.cpp.
#define WRN_G LOG_STREAM(warn, general) |
Definition at line 28 of file terrain_translation.cpp.
Referenced by gui2::tgrid::add_child(), gui2::tcontrol::get_multi_line_best_size(), t_translation::read_game_map(), gui2::tscrollbar_::recalculate(), and gui2::tgrid::set_rows_cols().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |