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"
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_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) |
| 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_race & | dummy_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 |
Handle unit-type specific attributes, animations, advancement.
Definition in file unit_types.cpp.
| #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) |
Definition at line 40 of file unit_types.cpp.
Referenced by unit_type_data::add_advancement(), unit_type::add_advancement(), unit_type::build_created(), unit_type::build_full(), unit_type_data::build_unit_type(), and unit_type_data::set_config().
| #define ERR_CF LOG_STREAM(err, log_config) |
Definition at line 34 of file unit_types.cpp.
Referenced by unit_type::build_full(), defense_range_modifier_internal(), unit_type_data::find_config(), movement_cost_internal(), and unit_type_data::set_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) |
Definition at line 35 of file unit_types.cpp.
Referenced by unit_type::add_advancement(), defense_range_modifier_internal(), and movement_cost_internal().
| 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().


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


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


| 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 | |||
| ) |
Definition at line 454 of file unit_types.cpp.
References check(), config::child(), unit_movement_type::defense_range_modifier(), defense_range_modifier_internal(), ERR_CF, gamemap::get_terrain_info(), defense_range::max_, defense_range::min_, t_translation::MINUS, t_translation::PLUS, gamemap::underlying_def_terrain(), t_translation::write_terrain_code(), and WRN_CF.
Referenced by defense_modifier_internal(), unit_movement_type::defense_range_modifier(), and defense_range_modifier_internal().


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

| 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 | |||
| ) |
Definition at line 372 of file unit_types.cpp.
References ERR_CF, config::get(), gamemap::get_terrain_info(), t_translation::MINUS, unit_movement_type::movement_cost(), movement_cost_internal(), t_translation::PLUS, gamemap::underlying_mvt_terrain(), unit_movement_type::UNREACHABLE, t_translation::write_terrain_code(), and WRN_CF.
Referenced by unit::jamming_cost(), unit_movement_type::movement_cost(), unit::movement_cost(), movement_cost_internal(), unit_movement_type::vision_cost(), and unit::vision_cost().


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().
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:11:03 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |