Defines | Functions | Variables

unit_types.cpp File Reference

Handle unit-type specific attributes, animations, advancement. More...

#include "global.hpp"
#include "unit_types.hpp"
#include "foreach.hpp"
#include "game_config.hpp"
#include "gettext.hpp"
#include "loadscreen.hpp"
#include "log.hpp"
#include "map.hpp"
Include dependency graph for unit_types.cpp:

Go to the source code of this file.

Defines

#define ERR_CF   LOG_STREAM(err, log_config)
#define WRN_CF   LOG_STREAM(warn, log_config)
#define LOG_CONFIG   LOG_STREAM(info, log_config)
#define DBG_CF   LOG_STREAM(debug, log_config)
#define DBG_UT   LOG_STREAM(debug, log_unit)

Functions

int movement_cost_internal (std::map< t_translation::t_terrain, int > &move_costs, const config &cfg, const unit_movement_type *parent, const gamemap &map, t_translation::t_terrain terrain, int recurse_count)
const defense_rangedefense_range_modifier_internal (defense_cache &defense_mods, const config &cfg, const unit_movement_type *parent, const gamemap &map, t_translation::t_terrain terrain, int recurse_count)
int defense_modifier_internal (defense_cache &defense_mods, const config &cfg, const unit_movement_type *parent, const gamemap &map, t_translation::t_terrain terrain, int recurse_count)
static const unit_racedummy_race ()
static void advancement_tree_internal (const std::string &id, std::set< std::string > &tree)
void adjust_profile (std::string &small, std::string &big, std::string const &def)

Variables

static lg::log_domain log_config ("config")
static lg::log_domain log_unit ("unit")
unit_type_data unit_types

Detailed Description

Handle unit-type specific attributes, animations, advancement.

Definition in file unit_types.cpp.


Define Documentation

#define DBG_CF   LOG_STREAM(debug, log_config)

Definition at line 37 of file unit_types.cpp.

Referenced by unit_type_data::find().

#define DBG_UT   LOG_STREAM(debug, log_unit)
#define ERR_CF   LOG_STREAM(err, log_config)
#define LOG_CONFIG   LOG_STREAM(info, log_config)

Definition at line 36 of file unit_types.cpp.

Referenced by unit_type::add_advancement(), and unit_type_data::set_config().

#define WRN_CF   LOG_STREAM(warn, log_config)

Function Documentation

void adjust_profile ( std::string &  small,
std::string &  big,
std::string const &  def 
)

Definition at line 1433 of file unit_types.cpp.

References file_exists().

Referenced by unit::add_modification(), unit_type::build_help_index(), and unit::unit().

Here is the call graph for this function:

Here is the caller graph for this function:

static void advancement_tree_internal ( const std::string &  id,
std::set< std::string > &  tree 
) [static]

Definition at line 1088 of file unit_types.cpp.

References unit_type::advances_to(), unit_type_data::find(), and unit_types.

Referenced by unit_type::advancement_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

int defense_modifier_internal ( defense_cache defense_mods,
const config cfg,
const unit_movement_type parent,
const gamemap map,
t_translation::t_terrain  terrain,
int  recurse_count 
)

Definition at line 541 of file unit_types.cpp.

References defense_range_modifier_internal(), defense_range::max_, and defense_range::min_.

Referenced by unit_movement_type::defense_modifier(), and unit::defense_modifier().

Here is the call graph for this function:

Here is the caller graph for this function:

const defense_range& defense_range_modifier_internal ( defense_cache defense_mods,
const config cfg,
const unit_movement_type parent,
const gamemap map,
t_translation::t_terrain  terrain,
int  recurse_count 
)
static const unit_race& dummy_race (  )  [static]

Definition at line 550 of file unit_types.cpp.

Referenced by unit_type::build_full(), and unit_type::build_help_index().

Here is the caller graph for this function:

int movement_cost_internal ( std::map< t_translation::t_terrain, int > &  move_costs,
const config cfg,
const unit_movement_type parent,
const gamemap map,
t_translation::t_terrain  terrain,
int  recurse_count 
)

Variable Documentation

lg::log_domain log_config("config") [static]
lg::log_domain log_unit("unit") [static]

Definition at line 1431 of file unit_types.cpp.

Referenced by unit::add_modification(), advancement_tree_internal(), unit_type::advances_from(), unit::advances_to_translated(), ai::testing_ai_default::recruitment_phase::analyze_potential_recruit_combat(), ai::ai_default_recruitment_stage::analyze_potential_recruit_combat(), ai::ai_default_recruitment_stage::analyze_potential_recruit_movements(), wb::recruit::create_corresponding_unit(), events::menu_handler::create_unit(), events::menu_handler::create_unit_2(), events::console_handler::do_create(), events::console_handler::do_discover(), ai::ai_default_recruitment_stage::do_play_stage(), events::menu_handler::do_recruit(), do_replay_handle(), mp::wait::leader_preview_pane::draw_contents(), ai::testing_ai_default::recruitment_phase::execute(), test_utils::game_config_manager::game_config_manager(), help::generate_ability_topics(), mp::wait::generate_menu(), help::generate_races_sections(), unit::generate_traits(), help::generate_unit_topics(), help::generate_weapon_special_topics(), get_advanced_unit(), ai::ai_default_recruitment_stage::get_combat_score_vs(), dialogs::unit_types_preview_pane::get_details(), get_unit_type(), ai::formula_ai::get_value(), unit_type::hide_help(), impl_race_get(), impl_unit_type_get(), LuaKernel::initialize(), intf_add_known_unit(), intf_get_traits(), intf_transform_unit(), help::make_unit_link(), team::minimum_recruit_price(), help::unit_topic_generator::operator()(), ai::testing_ai_default::potential_recruit_converter::operator()(), ai::unit_combat_score_getter::operator()(), leader_list_manager::populate_leader_combo(), gui2::tunit_create::pre_show(), wb::recruit::recruit(), events::menu_handler::recruit(), ai::testing_ai_default::recruitment_phase::recruit_usage(), ai::ai_default_recruitment_stage::recruit_usage(), mp::connect::side::resolve_random(), unit::set_advances_to(), unit::set_recruits(), game_controller::set_unit_data(), editor::unit_palette::setup(), mp::connect::side::side(), unit::unit(), attack::unit_killed(), leader_list_manager::update_gender_list(), and unit::write().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:11:03 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs