terrain_type Class Reference

#include <terrain.hpp>

Collaboration diagram for terrain_type:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 terrain_type ()
 terrain_type (const config &cfg)
 terrain_type (const terrain_type &base, const terrain_type &overlay)
const std::string & minimap_image () const
const std::string & minimap_image_overlay () const
const std::string & editor_image () const
const t_stringname () const
const std::string & id () const
t_translation::t_terrain number () const
const t_translation::t_listmvt_type () const
const t_translation::t_listdef_type () const
const t_translation::t_listunion_type () const
bool is_nonnull () const
int light_modification () const
int unit_height_adjust () const
double unit_submerge () const
int gives_healing () const
bool is_village () const
bool is_castle () const
bool is_keep () const
const t_stringincome_description () const
const t_stringincome_description_ally () const
const t_stringincome_description_enemy () const
const t_stringincome_description_own () const
const std::string & editor_group () const
bool is_overlay () const
bool is_combined () const
t_translation::t_terrain default_base () const
t_translation::t_terrain terrain_with_default_base () const

Private Attributes

std::string minimap_image_
 The image used in the minimap.
std::string minimap_image_overlay_
std::string editor_image_
 The image used in the editor pallete if not defined in WML it will be initialized with the value of minimap_image_.
std::string id_
t_string name_
t_translation::t_terrain number_
t_translation::t_list mvt_type_
t_translation::t_list def_type_
t_translation::t_list union_type_
int height_adjust_
double submerge_
int light_modification_
int heals_
t_string income_description_
t_string income_description_ally_
t_string income_description_enemy_
t_string income_description_own_
std::string editor_group_
bool village_
bool castle_
bool keep_
bool overlay_
bool combined_
t_translation::t_terrain editor_default_base_


Detailed Description

Definition at line 25 of file terrain.hpp.


Constructor & Destructor Documentation

terrain_type::terrain_type (  ) 

Definition at line 31 of file terrain.cpp.

terrain_type::terrain_type ( const config cfg  ) 

Todo:
reenable these validations. The problem is that all MP scenarios/campaigns share the same namespace and one rogue scenario can avoid the player to create a MP game. So every scenario/campaign should get it's own namespace to be save.

Definition at line 58 of file terrain.cpp.

References _, t_translation::t_terrain::base, combined_, def_type_, editor_image_, t_string::empty(), height_adjust_, income_description_, income_description_ally_, income_description_enemy_, income_description_own_, minimap_image_, t_translation::MINUS, missing_mandatory_wml_key(), mvt_type_, name_, t_translation::NO_LAYER, t_translation::NONE_TERRAIN, number_, overlay_, t_translation::PLUS, t_translation::read_list(), halo::remove(), union_type_, VALIDATE, village_, and t_translation::write_terrain_code().

terrain_type::terrain_type ( const terrain_type base,
const terrain_type overlay 
)


Member Function Documentation

const std::string& terrain_type::minimap_image (  )  const [inline]

Definition at line 33 of file terrain.hpp.

References minimap_image_.

Referenced by game_display::draw(), display::get_fog_shroud_graphics(), and image::getMinimap().

const std::string& terrain_type::minimap_image_overlay (  )  const [inline]

Definition at line 34 of file terrain.hpp.

References minimap_image_overlay_.

Referenced by image::getMinimap().

const std::string& terrain_type::editor_image (  )  const [inline]

Definition at line 35 of file terrain.hpp.

References editor_image_.

Referenced by map_editor::terrain_palette::draw().

const t_string& terrain_type::name (  )  const [inline]

const std::string& terrain_type::id (  )  const [inline]

Definition at line 37 of file terrain.hpp.

References id_.

Referenced by terrain_callable::get_value(), and help::unit_topic_generator::operator()().

t_translation::t_terrain terrain_type::number (  )  const [inline]

const t_translation::t_list& terrain_type::mvt_type (  )  const [inline]

Definition at line 43 of file terrain.hpp.

References mvt_type_.

const t_translation::t_list& terrain_type::def_type (  )  const [inline]

Definition at line 44 of file terrain.hpp.

References def_type_.

const t_translation::t_list& terrain_type::union_type (  )  const [inline]

Definition at line 45 of file terrain.hpp.

References union_type_.

Referenced by help::unit_topic_generator::operator()().

bool terrain_type::is_nonnull (  )  const [inline]

int terrain_type::light_modification (  )  const [inline]

Definition at line 49 of file terrain.hpp.

References light_modification_.

int terrain_type::unit_height_adjust (  )  const [inline]

Definition at line 51 of file terrain.hpp.

References height_adjust_.

Referenced by unit::overlaps(), and unit::redraw_unit().

double terrain_type::unit_submerge (  )  const [inline]

Definition at line 52 of file terrain.hpp.

References submerge_.

Referenced by unit::overlaps(), and unit::redraw_unit().

int terrain_type::gives_healing (  )  const [inline]

Definition at line 54 of file terrain.hpp.

References heals_.

Referenced by gamemap::gives_healing().

bool terrain_type::is_village (  )  const [inline]

Definition at line 55 of file terrain.hpp.

References village_.

Referenced by gamemap::is_village().

bool terrain_type::is_castle (  )  const [inline]

Definition at line 56 of file terrain.hpp.

References castle_.

Referenced by gamemap::is_castle().

bool terrain_type::is_keep (  )  const [inline]

Definition at line 57 of file terrain.hpp.

References keep_.

Referenced by gamemap::is_keep().

const t_string& terrain_type::income_description (  )  const [inline]

Definition at line 61 of file terrain.hpp.

References income_description_.

Referenced by reports::generate_report().

const t_string& terrain_type::income_description_ally (  )  const [inline]

Definition at line 62 of file terrain.hpp.

References income_description_ally_.

Referenced by reports::generate_report().

const t_string& terrain_type::income_description_enemy (  )  const [inline]

Definition at line 63 of file terrain.hpp.

References income_description_enemy_.

Referenced by reports::generate_report().

const t_string& terrain_type::income_description_own (  )  const [inline]

Definition at line 64 of file terrain.hpp.

References income_description_own_.

Referenced by reports::generate_report().

const std::string& terrain_type::editor_group (  )  const [inline]

Definition at line 66 of file terrain.hpp.

References editor_group_.

Referenced by map_editor::terrain_palette::terrain_palette().

bool terrain_type::is_overlay (  )  const [inline]

Definition at line 68 of file terrain.hpp.

References overlay_.

bool terrain_type::is_combined (  )  const [inline]

Definition at line 69 of file terrain.hpp.

References combined_.

Referenced by image::getMinimap(), and map_editor::terrain_palette::terrain_palette().

t_translation::t_terrain terrain_type::default_base (  )  const [inline]

Definition at line 71 of file terrain.hpp.

References editor_default_base_.

Referenced by map_editor::terrain_palette::draw(), and gamemap::merge_terrains().

t_translation::t_terrain terrain_type::terrain_with_default_base (  )  const


Member Data Documentation

std::string terrain_type::minimap_image_ [private]

The image used in the minimap.

Definition at line 76 of file terrain.hpp.

Referenced by minimap_image(), and terrain_type().

std::string terrain_type::minimap_image_overlay_ [private]

Definition at line 77 of file terrain.hpp.

Referenced by minimap_image_overlay(), and terrain_type().

std::string terrain_type::editor_image_ [private]

The image used in the editor pallete if not defined in WML it will be initialized with the value of minimap_image_.

Definition at line 81 of file terrain.hpp.

Referenced by editor_image(), and terrain_type().

std::string terrain_type::id_ [private]

Definition at line 82 of file terrain.hpp.

Referenced by id(), and terrain_type().

Definition at line 83 of file terrain.hpp.

Referenced by name(), and terrain_type().

Definition at line 89 of file terrain.hpp.

Referenced by is_nonnull(), number(), terrain_type(), and terrain_with_default_base().

Definition at line 90 of file terrain.hpp.

Referenced by mvt_type(), and terrain_type().

Definition at line 91 of file terrain.hpp.

Referenced by def_type(), and terrain_type().

Definition at line 92 of file terrain.hpp.

Referenced by terrain_type(), and union_type().

Definition at line 94 of file terrain.hpp.

Referenced by terrain_type(), and unit_height_adjust().

double terrain_type::submerge_ [private]

Definition at line 96 of file terrain.hpp.

Referenced by terrain_type(), and unit_submerge().

Definition at line 98 of file terrain.hpp.

Referenced by light_modification(), and terrain_type().

int terrain_type::heals_ [private]

Definition at line 98 of file terrain.hpp.

Referenced by gives_healing(), and terrain_type().

Definition at line 100 of file terrain.hpp.

Referenced by income_description(), and terrain_type().

Definition at line 101 of file terrain.hpp.

Referenced by income_description_ally(), and terrain_type().

Definition at line 102 of file terrain.hpp.

Referenced by income_description_enemy(), and terrain_type().

Definition at line 103 of file terrain.hpp.

Referenced by income_description_own(), and terrain_type().

std::string terrain_type::editor_group_ [private]

Definition at line 105 of file terrain.hpp.

Referenced by editor_group(), and terrain_type().

bool terrain_type::village_ [private]

Definition at line 107 of file terrain.hpp.

Referenced by is_village(), and terrain_type().

bool terrain_type::castle_ [private]

Definition at line 107 of file terrain.hpp.

Referenced by is_castle(), and terrain_type().

bool terrain_type::keep_ [private]

Definition at line 107 of file terrain.hpp.

Referenced by is_keep(), and terrain_type().

bool terrain_type::overlay_ [private]

Definition at line 109 of file terrain.hpp.

Referenced by is_overlay(), terrain_type(), and terrain_with_default_base().

bool terrain_type::combined_ [private]

Definition at line 109 of file terrain.hpp.

Referenced by is_combined(), and terrain_type().

Definition at line 110 of file terrain.hpp.

Referenced by default_base(), and terrain_with_default_base().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs