#include "global.hpp"
#include "actions/attack.hpp"
#include "attack_prediction.hpp"
#include "font.hpp"
#include "game_preferences.hpp"
#include "gettext.hpp"
#include "language.hpp"
#include "map/map.hpp"
#include "marked-up_text.hpp"
#include "mouse_events.hpp"
#include "reports.hpp"
#include "strftime.hpp"
#include "team.hpp"
#include "text.hpp"
#include "tod_manager.hpp"
#include "units/unit.hpp"
#include "units/helper.hpp"
#include "whiteboard/manager.hpp"
#include <boost/shared_ptr.hpp>
#include <cassert>
#include <ctime>
Go to the source code of this file.
Classes | |
struct | report_generator_helper |
Macros | |
#define | REPORT_GENERATOR(n, cn) |
Typedefs | |
typedef std::map< std::string, reports::generator_function > | static_report_generators |
Variables | |
static static_report_generators | static_generators |
static char const * | naps = "</span>" |
#define REPORT_GENERATOR | ( | n, | |
cn | |||
) |
Definition at line 104 of file reports.cpp.
typedef std::map<std::string, reports::generator_function> static_report_generators |
Definition at line 93 of file reports.cpp.
|
static |
Definition at line 51 of file reports.cpp.
References config::add_child().
Referenced by add_status(), image_report(), REPORT_GENERATOR(), unit_advancement_options(), and unit_side().
|
static |
Definition at line 78 of file reports.cpp.
References add_image(), and translation::gettext().
Referenced by unit_status().
|
static |
Definition at line 42 of file reports.cpp.
References config::add_child().
Referenced by attack_info(), text_report(), unit_abilities(), unit_side(), unit_traits(), and unit_weapons().
|
static |
Definition at line 649 of file reports.cpp.
References _(), attack_type::accuracy(), attack_type::accuracy_parry_description(), add_text(), unit::alignment(), font::bad_dmg_color, t_string::base_str(), combat_modifier(), attack_type::damage(), flush(), team::fogged(), unit::get_state(), font::good_dmg_color, unit::hitpoints(), i, font::inactive_details_color, int(), team::is_enemy(), unit::is_fearless(), utils::join(), reports::context::map(), unit::max_hitpoints(), attack_type::modified_attacks(), attack_type::modified_damage(), attack_type::name(), naps, attack_type::num_attacks(), attack_type::parry(), display::playing_side(), attack_type::range(), round_damage(), reports::context::screen(), attack_type::set_specials_context(), attack_type::set_specials_context_for_listing(), unit::side(), utils::signed_percent(), utils::signed_value(), game_config::sounds::status::slowed, font::span_color(), attack_type::special_tooltips(), unit::STATE_SLOWED, string_table, swarm_blows(), reports::context::teams(), attack_type::type(), under_leadership(), reports::context::units(), schema_validation::valid, display::viewing_team(), font::weapon_color, font::weapon_details_color, font::weapon_details_sep, and font::weapon_numbers_sep.
Referenced by unit_weapons().
|
static |
Definition at line 86 of file reports.cpp.
Referenced by attack_info(), set_scontext_synced::do_final_checkup(), lua_kernel_base::get_log(), gui2::tlua_interpreter::lua_model::lua_model(), replay::process_error(), and unit_weapons().
Definition at line 842 of file reports.cpp.
Referenced by unit_weapons().
|
static |
Definition at line 828 of file reports.cpp.
Referenced by unit_weapons().
|
static |
Definition at line 118 of file reports.cpp.
References reports::context::dc(), display_context::get_visible_unit(), reports::context::screen(), display::selected_hex(), display::show_everything(), reports::context::teams(), and display::viewing_team().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 111 of file reports.cpp.
References reports::context::dc(), display::displayed_unit_hex(), display_context::get_visible_unit(), reports::context::screen(), display::show_everything(), reports::context::teams(), and display::viewing_team().
Referenced by REPORT_GENERATOR(), and unit_box_at().
|
static |
Definition at line 125 of file reports.cpp.
References font::GRAY_COLOR, naps, display::playing_side(), reports::context::screen(), font::span_color(), text_report(), and display::viewing_side().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 68 of file reports.cpp.
References add_image().
Referenced by REPORT_GENERATOR(), time_of_day_at(), and unit_box_at().
REPORT_GENERATOR | ( | unit_name | , |
rc | |||
) |
Definition at line 150 of file reports.cpp.
References get_visible_unit(), and unit_name().
REPORT_GENERATOR | ( | selected_unit_name | , |
rc | |||
) |
Definition at line 155 of file reports.cpp.
References get_selected_unit(), and unit_name().
REPORT_GENERATOR | ( | unit_type | , |
rc | |||
) |
Definition at line 171 of file reports.cpp.
References get_visible_unit(), and unit_type().
REPORT_GENERATOR | ( | selected_unit_type | , |
rc | |||
) |
Definition at line 176 of file reports.cpp.
References get_selected_unit(), and unit_type().
REPORT_GENERATOR | ( | unit_race | , |
rc | |||
) |
Definition at line 190 of file reports.cpp.
References get_visible_unit(), and unit_race().
REPORT_GENERATOR | ( | selected_unit_race | , |
rc | |||
) |
Definition at line 195 of file reports.cpp.
References get_selected_unit(), and unit_race().
REPORT_GENERATOR | ( | unit_side | , |
rc | |||
) |
Definition at line 221 of file reports.cpp.
References get_visible_unit(), and unit_side().
REPORT_GENERATOR | ( | selected_unit_side | , |
rc | |||
) |
Definition at line 226 of file reports.cpp.
References get_selected_unit(), and unit_side().
REPORT_GENERATOR | ( | unit_level | , |
rc | |||
) |
Definition at line 246 of file reports.cpp.
References get_visible_unit(), and unit_level().
REPORT_GENERATOR | ( | selected_unit_level | , |
rc | |||
) |
Definition at line 251 of file reports.cpp.
References get_selected_unit(), and unit_level().
REPORT_GENERATOR | ( | unit_amla | , |
rc | |||
) |
Definition at line 257 of file reports.cpp.
References add_image(), unit::amla_icons(), and get_visible_unit().
REPORT_GENERATOR | ( | unit_traits | , |
rc | |||
) |
Definition at line 288 of file reports.cpp.
References get_visible_unit(), and unit_traits().
REPORT_GENERATOR | ( | selected_unit_traits | , |
rc | |||
) |
Definition at line 293 of file reports.cpp.
References get_selected_unit(), and unit_traits().
REPORT_GENERATOR | ( | unit_status | , |
rc | |||
) |
Definition at line 322 of file reports.cpp.
References get_visible_unit(), and unit_status().
REPORT_GENERATOR | ( | selected_unit_status | , |
rc | |||
) |
Definition at line 327 of file reports.cpp.
References get_selected_unit(), and unit_status().
REPORT_GENERATOR | ( | unit_alignment | , |
rc | |||
) |
Definition at line 354 of file reports.cpp.
References get_visible_unit(), and unit_alignment().
REPORT_GENERATOR | ( | selected_unit_alignment | , |
rc | |||
) |
Definition at line 359 of file reports.cpp.
References get_selected_unit(), and unit_alignment().
REPORT_GENERATOR | ( | unit_abilities | , |
rc | |||
) |
Definition at line 399 of file reports.cpp.
References get_visible_unit(), and unit_abilities().
REPORT_GENERATOR | ( | selected_unit_abilities | , |
rc | |||
) |
Definition at line 404 of file reports.cpp.
References get_selected_unit(), and unit_abilities().
REPORT_GENERATOR | ( | unit_hp | , |
rc | |||
) |
Definition at line 453 of file reports.cpp.
References get_visible_unit(), and unit_hp().
REPORT_GENERATOR | ( | selected_unit_hp | , |
rc | |||
) |
Definition at line 458 of file reports.cpp.
References get_selected_unit(), and unit_hp().
REPORT_GENERATOR | ( | unit_xp | , |
rc | |||
) |
Definition at line 475 of file reports.cpp.
References get_visible_unit(), and unit_xp().
REPORT_GENERATOR | ( | selected_unit_xp | , |
rc | |||
) |
Definition at line 480 of file reports.cpp.
References get_selected_unit(), and unit_xp().
REPORT_GENERATOR | ( | unit_advancement_options | , |
rc | |||
) |
Definition at line 496 of file reports.cpp.
References get_visible_unit(), and unit_advancement_options().
REPORT_GENERATOR | ( | selected_unit_advancement_options | , |
rc | |||
) |
Definition at line 501 of file reports.cpp.
References get_selected_unit(), and unit_advancement_options().
REPORT_GENERATOR | ( | unit_defense | , |
rc | |||
) |
Definition at line 548 of file reports.cpp.
References get_visible_unit(), and unit_defense().
REPORT_GENERATOR | ( | selected_unit_defense | , |
rc | |||
) |
Definition at line 554 of file reports.cpp.
References get_selected_unit(), and unit_defense().
REPORT_GENERATOR | ( | unit_vision | , |
rc | |||
) |
Definition at line 571 of file reports.cpp.
References get_visible_unit(), and unit_vision().
REPORT_GENERATOR | ( | selected_unit_vision | , |
rc | |||
) |
Definition at line 576 of file reports.cpp.
References get_selected_unit(), and unit_vision().
REPORT_GENERATOR | ( | unit_moves | , |
rc | |||
) |
Definition at line 638 of file reports.cpp.
References get_visible_unit(), and unit_moves().
REPORT_GENERATOR | ( | selected_unit_moves | , |
rc | |||
) |
Definition at line 643 of file reports.cpp.
References get_selected_unit(), and unit_moves().
REPORT_GENERATOR | ( | unit_weapons | , |
rc | |||
) |
Definition at line 1000 of file reports.cpp.
References get_visible_unit(), and unit_weapons().
REPORT_GENERATOR | ( | highlighted_unit_weapons | , |
rc | |||
) |
Definition at line 1007 of file reports.cpp.
References get_selected_unit(), get_visible_unit(), unit_weapons(), and map_location::valid().
REPORT_GENERATOR | ( | selected_unit_weapons | , |
rc | |||
) |
Definition at line 1025 of file reports.cpp.
References get_selected_unit(), get_visible_unit(), unit_weapons(), and map_location::valid().
REPORT_GENERATOR | ( | unit_image | , |
rc | |||
) |
Definition at line 1044 of file reports.cpp.
References unit::absolute_image(), get_visible_unit(), unit::image_mods(), and image_report().
REPORT_GENERATOR | ( | selected_unit_image | , |
rc | |||
) |
Definition at line 1050 of file reports.cpp.
References unit::absolute_image(), get_selected_unit(), unit::image_mods(), and image_report().
REPORT_GENERATOR | ( | selected_unit_profile | , |
rc | |||
) |
Definition at line 1057 of file reports.cpp.
References get_selected_unit(), image_report(), and unit::small_profile().
REPORT_GENERATOR | ( | unit_profile | , |
rc | |||
) |
Definition at line 1063 of file reports.cpp.
References get_visible_unit(), image_report(), and unit::small_profile().
REPORT_GENERATOR | ( | tod_stats | , |
rc | |||
) |
Definition at line 1070 of file reports.cpp.
References i, text_report(), and map_location::valid().
REPORT_GENERATOR | ( | time_of_day | , |
rc | |||
) |
Definition at line 1138 of file reports.cpp.
References time_of_day_at(), and map_location::valid().
REPORT_GENERATOR | ( | unit_box | , |
rc | |||
) |
Definition at line 1219 of file reports.cpp.
References unit_box_at().
REPORT_GENERATOR | ( | turn | , |
rc | |||
) |
Definition at line 1226 of file reports.cpp.
References text_report().
REPORT_GENERATOR | ( | gold | , |
rc | |||
) |
Definition at line 1235 of file reports.cpp.
References font::BAD_COLOR, font::GRAY_COLOR, utils::half_signed_value(), naps, font::span_color(), and text_report().
REPORT_GENERATOR | ( | villages | , |
rc | |||
) |
Definition at line 1258 of file reports.cpp.
References gray_inactive(), team::shrouded(), team::uses_shroud(), and team_data::villages.
REPORT_GENERATOR | ( | num_units | , |
rc | |||
) |
Definition at line 1278 of file reports.cpp.
References gray_inactive().
REPORT_GENERATOR | ( | upkeep | , |
rc | |||
) |
Definition at line 1283 of file reports.cpp.
References team_data::expenses, gray_inactive(), and team_data::upkeep.
REPORT_GENERATOR | ( | expenses | , |
rc | |||
) |
Definition at line 1293 of file reports.cpp.
References team_data::expenses, and gray_inactive().
REPORT_GENERATOR | ( | income | , |
rc | |||
) |
Definition at line 1301 of file reports.cpp.
References font::BAD_COLOR, font::GRAY_COLOR, naps, team_data::net_income, font::span_color(), text_report(), and utils::unicode_minus.
REPORT_GENERATOR | ( | terrain_info | , |
rc | |||
) |
Definition at line 1339 of file reports.cpp.
References display::get_singleton(), gamemap::get_terrain(), gamemap::get_terrain_info(), gamemap::get_terrain_string(), terrain_type::icon_image(), terrain_type::id(), t_translation::OFF_MAP_USER, gamemap::on_board(), gui2::terrain, and gamemap::underlying_union_terrain().
REPORT_GENERATOR | ( | terrain | , |
rc | |||
) |
Definition at line 1386 of file reports.cpp.
References team::fogged(), gamemap::get_terrain(), gamemap::get_terrain_info(), gamemap::get_terrain_string(), gamemap::get_underlying_terrain_string(), terrain_type::income_description(), terrain_type::income_description_ally(), terrain_type::income_description_enemy(), terrain_type::income_description_own(), team::is_enemy(), gamemap::is_village(), t_translation::OFF_MAP_USER, gamemap::on_board(), team::shrouded(), gui2::terrain, and text_report().
REPORT_GENERATOR | ( | zoom_level | , |
rc | |||
) |
Definition at line 1424 of file reports.cpp.
References text_report().
REPORT_GENERATOR | ( | position | , |
rc | |||
) |
Definition at line 1435 of file reports.cpp.
References unit::defense_modifier(), get_visible_unit(), unit::movement_cost(), t_translation::OFF_MAP_USER, gamemap::on_board(), team::shrouded(), gui2::terrain, text_report(), and movetype::UNREACHABLE.
REPORT_GENERATOR | ( | side_playing | , |
rc | |||
) |
Definition at line 1477 of file reports.cpp.
References game_config::images::flag_icon, team::flag_icon(), game_config::flag_rgb, team::get_side_color_index(), image_report(), and team::side_name().
REPORT_GENERATOR | ( | observers | , |
rc | |||
) |
Definition at line 1489 of file reports.cpp.
References _(), image_report(), and game_config::images::observer.
REPORT_GENERATOR | ( | report_clock | ) |
Definition at line 1525 of file reports.cpp.
References _(), util::strftime(), text_report(), and preferences::use_twelve_hour_clock_format().
REPORT_GENERATOR | ( | report_countdown | , |
rc | |||
) |
Definition at line 1538 of file reports.cpp.
References team::countdown_time(), font::GRAY_COLOR, naps, font::span_color(), and text_report().
|
static |
Definition at line 60 of file reports.cpp.
References add_text().
Referenced by gray_inactive(), REPORT_GENERATOR(), unit_alignment(), unit_defense(), unit_hp(), unit_level(), unit_moves(), unit_name(), unit_race(), unit_type(), unit_vision(), and unit_xp().
|
static |
Definition at line 1097 of file reports.cpp.
References _(), time_of_day::bonus_modified, team::fogged(), tod_manager::get_illuminated_time_of_day(), tod_manager::get_time_of_day(), time_of_day::id, time_of_day::image, image_report(), time_of_day::lawful_bonus, reports::context::map(), time_of_day::name, reports::context::screen(), team::shrouded(), utils::signed_percent(), reports::context::teams(), reports::context::tod(), reports::context::units(), and display::viewing_team().
Referenced by REPORT_GENERATOR().
Definition at line 366 of file reports.cpp.
References _(), unit::ability_tooltips(), add_text(), filesystem::base_name(), i, font::inactive_ability_color, naps, and font::span_color().
Referenced by REPORT_GENERATOR().
Definition at line 486 of file reports.cpp.
References add_image(), and unit::advancement_icons().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 333 of file reports.cpp.
References _(), unit::alignment(), unit_type::alignment_description(), font::bad_dmg_color, combat_modifier(), display::displayed_unit_hex(), unit::gender(), font::good_dmg_color, unit::is_fearless(), reports::context::map(), naps, reports::context::screen(), utils::signed_percent(), font::span_color(), string_table, text_report(), reports::context::units(), and font::weapon_color.
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 1145 of file reports.cpp.
References _(), unit::absolute_image(), time_of_day::bonus_modified, time_of_day::color, team::fogged(), tod_manager::get_illuminated_time_of_day(), gamemap::get_terrain(), gamemap::get_terrain_info(), tod_manager::get_time_of_day(), get_visible_unit(), terrain_type::id(), time_of_day::image, unit::image_mods(), image_report(), time_of_day::lawful_bonus, reports::context::map(), time_of_day::name, reports::context::screen(), team::shrouded(), utils::signed_percent(), reports::context::teams(), gui2::terrain, reports::context::tod(), gamemap::underlying_union_terrain(), reports::context::units(), and display::viewing_team().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 507 of file reports.cpp.
References _(), unit::defense_modifier(), terrain_type::description(), gamemap::get_terrain_info(), int_to_color(), reports::context::map(), t_translation::MINUS, naps, gamemap::on_board(), t_translation::PLUS, game_config::red_to_green(), font::span_color(), gui2::terrain, text_report(), and gamemap::underlying_def_terrain().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 411 of file reports.cpp.
References _(), display::displayed_unit_hex(), unit::get_base_resistances(), translation::gettext(), unit::hitpoints(), unit::hp_color(), unit::max_hitpoints(), naps, unit::resistance_against(), unit_helper::resistance_color(), reports::context::screen(), utils::signed_percent(), font::span_color(), and text_report().
Referenced by REPORT_GENERATOR().
Definition at line 232 of file reports.cpp.
References _(), unit::advances_to_translated(), utils::join(), unit::level(), and text_report().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 582 of file reports.cpp.
References _(), create_color(), preferences::encountered_terrains(), t_translation::FOGGED, gamemap::get_terrain_info(), lg::info(), int(), terrain_type::is_nonnull(), reports::context::map(), unit::movement_cost(), unit::movement_left(), terrain_type::name(), naps, terrain_type::number(), t_translation::OFF_MAP_USER, display::playing_side(), reports::context::screen(), unit::side(), font::span_color(), gui2::terrain, text_report(), unit::total_movement(), utils::unicode_figure_dash, terrain_type::union_type(), and t_translation::VOID_TERRAIN.
Referenced by game_logic::ai_function_symbol_table::ai_function_symbol_table(), ai::formula_ai::can_reach_unit(), and REPORT_GENERATOR().
Definition at line 133 of file reports.cpp.
References _(), font::escape_text(), unit::name(), and text_report().
Referenced by ai::ai_recruit(), and REPORT_GENERATOR().
Definition at line 182 of file reports.cpp.
References _(), unit::gender(), unit_race::id(), unit_race::name(), unit::race(), and text_report().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 201 of file reports.cpp.
References add_image(), add_text(), game_config::images::flag_icon, team::flag_icon(), game_config::flag_rgb, team::get_side_color_index(), report(), unit::side(), team::side_name(), and reports::context::teams().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 299 of file reports.cpp.
References add_status(), display::displayed_unit_hex(), unit::get_state(), unit::invisible(), reports::context::map(), N_, gamemap::on_board(), reports::context::screen(), unit::STATE_PETRIFIED, unit::STATE_POISONED, and unit::STATE_SLOWED.
Referenced by REPORT_GENERATOR().
Definition at line 269 of file reports.cpp.
References _(), add_text(), unit::get_traits_list(), i, unit::trait_descriptions(), and unit::trait_names().
Referenced by REPORT_GENERATOR().
Definition at line 161 of file reports.cpp.
References _(), unit_type::show_variations_in_help(), text_report(), unit::type(), unit::type_id(), unit::type_name(), and unit::unit_description().
Referenced by actions::check_recruit_location(), REPORT_GENERATOR(), and unit_type_data::set_config().
Definition at line 561 of file reports.cpp.
References _(), text_report(), unit::total_movement(), and unit::vision().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 855 of file reports.cpp.
References _(), add_text(), attack_info(), unit::attacks(), font::bad_dmg_color, game_config::blue_to_white(), battle_context_unit_stats::chance_to_hit, battle_context_unit_stats::damage, combatant::fight(), flush(), format_hp(), format_prob(), unit::get_location(), font::good_dmg_color, unit::hp_color(), combatant::hp_dist, i, int_to_color(), attack_type::name(), naps, battle_context_unit_stats::num_blows, game_config::red_to_green(), sort(), font::span_color(), utils::unicode_en_dash, reports::context::units(), font::weapon, battle_context_unit_stats::weapon, font::weapon_color, font::weapon_details_color, and font::weapon_numbers_sep.
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 981 of file reports.cpp.
References schema_validation::at(), attack_info(), unit::attacks(), display::displayed_unit_hex(), and reports::context::screen().
Definition at line 464 of file reports.cpp.
References _(), unit::experience(), unit_experience_accelerator::get_acceleration(), unit::max_experience(), naps, font::span_color(), text_report(), and unit::xp_color().
Referenced by REPORT_GENERATOR().
|
static |
Definition at line 109 of file reports.cpp.
Referenced by attack_info(), gray_inactive(), REPORT_GENERATOR(), unit_abilities(), unit_alignment(), unit_defense(), unit_hp(), unit_moves(), unit_weapons(), and unit_xp().
|
static |
Definition at line 94 of file reports.cpp.
Referenced by reports::generate_report(), report_generator_helper::report_generator_helper(), and reports::report_list().