Functions | |
unit_animation_component & | unit::anim_comp () const |
std::string | unit::absolute_image () const |
The name of the file to game_display (used in menus). More... | |
std::string | unit::default_anim_image () const |
The default image to use for animation frames with no defined image. More... | |
std::string | unit::image_halo () const |
Get the unit's halo image. More... | |
void | unit::set_image_halo (const std::string &halo) |
Set the unit's halo image. More... | |
std::string | unit::image_ellipse () const |
Get the unit's ellipse image. More... | |
void | unit::set_image_ellipse (const std::string &ellipse) |
Set the unit's ellipse image. More... | |
const std::string & | unit::flag_rgb () const |
Get the source color palette to use when recoloring the unit's image. More... | |
std::string | unit::TC_image_mods () const |
Constructs a recolor (RC) IPF string for this unit's team color. More... | |
const std::string & | unit::effect_image_mods () const |
Gets any IPF image mods applied by effects. More... | |
std::string | unit::image_mods () const |
Gets an IPF string containing all IPF image mods. More... | |
const std::vector< std::string > & | unit::overlays () const |
Get the unit's overlay images. More... | |
color_t | unit::hp_color () const |
Color for this unit's current hitpoints. More... | |
static color_t | unit::hp_color_max () |
color_t | unit::hp_color (int hitpoints) const |
Color for this unit's hitpoints. More... | |
color_t | unit::xp_color () const |
Color for this unit's XP. More... | |
static color_t | unit::xp_color (int xp_to_advance, bool can_advance, bool has_amla) |
std::string unit::absolute_image | ( | ) | const |
The name of the file to game_display (used in menus).
Definition at line 2491 of file unit.cpp.
References unit_type::icon(), unit_type::image(), and unit::type().
Referenced by unit::big_profile(), gui2::dialogs::unit_recall::pre_show(), REPORT_GENERATOR(), gui2::unit_preview_pane::set_displayed_unit(), unit::small_profile(), and unit_box_at().
|
inline |
Definition at line 1547 of file unit.hpp.
Referenced by battle_context::choose_defender_weapon(), wb::ghost_owner_unit(), editor::editor_action_unit_replace::perform_without_undo(), unit_drawer::redraw_unit(), and wb::unghost_owner_unit().
std::string unit::default_anim_image | ( | ) | const |
The default image to use for animation frames with no defined image.
Definition at line 2496 of file unit.cpp.
References unit_type::icon(), unit_type::image(), and unit::type().
Referenced by unit_animation_component::invalidate(), and unit_drawer::redraw_unit().
|
inline |
const std::string & unit::flag_rgb | ( | ) | const |
Get the source color palette to use when recoloring the unit's image.
Definition at line 1120 of file unit.cpp.
References unit::flag_rgb_, and game_config::unit_rgb.
color_t unit::hp_color | ( | ) | const |
Color for this unit's current hitpoints.
Definition at line 1163 of file unit.cpp.
References unit::hitpoints(), hp_color_impl(), and unit::max_hitpoints().
Referenced by gui2::dialogs::unit_list::pre_show(), unit_drawer::redraw_unit(), gui2::unit_preview_pane::set_displayed_unit(), unit_hp(), and unit_weapons().
color_t unit::hp_color | ( | int | hitpoints | ) | const |
Color for this unit's hitpoints.
hitpoints | The number of hitpoints the color represents. |
Definition at line 1168 of file unit.cpp.
References unit::hitpoints(), and hp_color_impl().
|
static |
Definition at line 1173 of file unit.cpp.
References hp_color_impl().
Referenced by gui2::unit_preview_pane::set_displayed_type().
|
inline |
Get the unit's ellipse image.
Definition at line 1568 of file unit.hpp.
Referenced by unit_drawer::redraw_unit().
|
inline |
std::string unit::image_mods | ( | ) | const |
Gets an IPF string containing all IPF image mods.
Definition at line 2672 of file unit.cpp.
Referenced by unit_animation_component::invalidate(), gui2::dialogs::unit_advance::pre_show(), gui2::dialogs::unit_recall::pre_show(), unit_drawer::redraw_unit(), REPORT_GENERATOR(), gui2::unit_preview_pane::set_displayed_unit(), and unit_box_at().
|
inline |
Get the unit's overlay images.
Definition at line 1602 of file unit.hpp.
Referenced by unit::init(), gui2::dialogs::unit_recall::pre_show(), and gui2::unit_preview_pane::set_displayed_unit().
|
inline |
Set the unit's ellipse image.
Definition at line 1574 of file unit.hpp.
References game_config::flag_rgb.
Referenced by unit::advance_to(), unit::apply_builtin_effect(), and unit::init().
void unit::set_image_halo | ( | const std::string & | halo | ) |
Set the unit's halo image.
Definition at line 2724 of file unit.cpp.
Referenced by unit::advance_to(), unit::apply_builtin_effect(), and unit::init().
std::string unit::TC_image_mods | ( | ) | const |
Constructs a recolor (RC) IPF string for this unit's team color.
Definition at line 2667 of file unit.cpp.
References game_config::flag_rgb, and team::get_side_color_id().
Referenced by unit_animation_component::invalidate(), and unit_drawer::redraw_unit().
color_t unit::xp_color | ( | ) | const |
Color for this unit's XP.
See also hp_color
Definition at line 1217 of file unit.cpp.
References unit::advances_to(), unit::experience_to_advance(), and unit::get_modification_advances().
Referenced by gui2::dialogs::unit_list::pre_show(), gui2::dialogs::unit_recall::pre_show(), unit_drawer::redraw_unit(), gui2::unit_preview_pane::set_displayed_type(), gui2::unit_preview_pane::set_displayed_unit(), and unit_xp().
|
static |
Definition at line 1178 of file unit.cpp.
References game_config::kill_experience.