#include <SDL_types.h>
#include <string>
#include <vector>
#include <map>
Go to the source code of this file.
Namespaces | |
namespace | t_translation |
Classes | |
struct | t_translation::t_terrain |
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separated by a caret and each group consists of 2 to 4 characters if no second layer is defined it is stored as 0xFFFFFFFF, if the second layer is empty (needed for matching) the layer has the value 0. More... | |
struct | t_translation::t_match |
This structure can be used for matching terrain strings. More... | |
struct | t_translation::coordinate |
Contains an x and y coordinate used for starting positions in maps. More... | |
struct | t_translation::error |
Typedefs | |
typedef Uint32 | t_translation::t_layer |
typedef std::vector< t_terrain > | t_translation::t_list |
typedef std::vector < std::vector< t_terrain > > | t_translation::t_map |
Functions | |
bool | t_translation::operator< (const t_terrain &a, const t_terrain &b) |
bool | t_translation::operator== (const t_terrain &a, const t_terrain &b) |
bool | t_translation::operator!= (const t_terrain &a, const t_terrain &b) |
t_terrain | t_translation::operator & (const t_terrain &a, const t_terrain &b) |
t_terrain | t_translation::operator| (const t_terrain &a, const t_terrain &b) |
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. | |
std::ostream & | t_translation::operator<< (std::ostream &s, const t_terrain &a) |
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_list &dest) |
Tests whether a specific terrain matches a list of expressions. | |
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_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_layer | t_translation::WILDCARD = 0x2A000000 |
const t_layer | t_translation::NO_LAYER = 0xFFFFFFFF |
const t_terrain | t_translation::NONE_TERRAIN = t_terrain() |
const t_layer | t_translation::TB_STAR = '*' << 24 |
const t_layer | t_translation::TB_DOT = '.' << 24 |
Definition in file terrain_translation.hpp.
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |