The Battle for Wesnoth  1.19.18+dev
Public Member Functions | Public Attributes | List of all members
t_translation::terrain_code Struct Reference

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...

#include <translation.hpp>

Public Member Functions

 terrain_code (const std::string &b, const std::string &o)
 
 terrain_code (const std::string &b, ter_layer o=NO_LAYER)
 
constexpr terrain_code (ter_layer b, ter_layer o)
 
constexpr terrain_code ()=default
 

Public Attributes

ter_layer base = 0
 
ter_layer overlay = NO_LAYER
 

Detailed Description

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.

Definition at line 49 of file translation.hpp.

Constructor & Destructor Documentation

◆ terrain_code() [1/4]

t_translation::terrain_code::terrain_code ( const std::string &  b,
const std::string &  o 
)

Definition at line 158 of file translation.cpp.

◆ terrain_code() [2/4]

t_translation::terrain_code::terrain_code ( const std::string &  b,
ter_layer  o = NO_LAYER 
)
explicit

Definition at line 152 of file translation.cpp.

◆ terrain_code() [3/4]

constexpr t_translation::terrain_code::terrain_code ( ter_layer  b,
ter_layer  o 
)
inlineconstexpr

Definition at line 52 of file translation.hpp.

◆ terrain_code() [4/4]

constexpr t_translation::terrain_code::terrain_code ( )
constexprdefault

Member Data Documentation

◆ base

ter_layer t_translation::terrain_code::base = 0

◆ overlay

ter_layer t_translation::terrain_code::overlay = NO_LAYER

The documentation for this struct was generated from the following files: