31 #include <boost/logic/tribool.hpp>
95 frame_builder&
halo(
const std::string&
halo,
const std::string& halo_x,
const std::string& halo_y,
const std::string& halo_mod);
151 const std::chrono::milliseconds& override_duration = std::chrono::milliseconds{0});
153 void override(
const std::chrono::milliseconds&
duration,
154 const std::string& highlight =
"",
155 const std::string& blend_ratio =
"",
157 const std::string& offset =
"",
158 const std::string& layer =
"",
159 const std::string& modifiers =
"");
A config object defines a single node in a WML file, with access to child nodes.
Easily build frame parameters with the serialized constructors.
utils::optional< color_t > blend_with_
std::string image_diagonal_
boost::tribool auto_vflip_
boost::tribool primary_frame_
frame_builder & auto_hflip(const bool auto_hflip)
frame_builder & highlight(const std::string &highlight)
frame_builder & image_diagonal(const std::string &image_diagonal, const std::string &image_mod="")
frame_builder & directional_x(const std::string &directional_x)
frame_builder & submerge(const std::string &submerge)
frame_builder & y(const std::string &y)
frame_builder & primary_frame(const bool primary_frame)
frame_builder & auto_vflip(const bool auto_vflip)
std::string highlight_ratio_
boost::tribool auto_hflip_
std::string drawing_layer_
frame_builder & drawing_layer(const std::string &drawing_layer)
std::string directional_x_
std::string directional_y_
frame_builder & text(const std::string &text, const color_t text_color)
frame_builder & blend(const std::string &blend_ratio, const color_t blend_color)
frame_builder & x(const std::string &x)
utils::optional< color_t > text_color_
frame_builder & offset(const std::string &offset)
frame_builder & directional_y(const std::string &directional_y)
frame_builder & image(const std::string &image, const std::string &image_mod="")
frame_builder & sound(const std::string &sound)
frame_builder & duration(const std::chrono::milliseconds &duration)
Allow easy chained modifications.
frame_builder & halo(const std::string &halo, const std::string &halo_x, const std::string &halo_y, const std::string &halo_mod)
std::chrono::milliseconds duration_
Keep most parameters in a separate class to simplify the handling of the large number of parameters b...
progressive_int directional_x_
boost::tribool auto_hflip_
boost::tribool primary_frame_
progressive_double blend_ratio_
progressive_double highlight_ratio_
progressive_double offset_
boost::tribool auto_vflip_
frame_parameters parameters(const std::chrono::milliseconds ¤t_time) const
Getters for the different parameters.
utils::optional< color_t > blend_with_
std::chrono::milliseconds duration_
progressive_double submerge_
progressive_int drawing_layer_
utils::optional< color_t > text_color_
const std::chrono::milliseconds & duration() const
std::vector< std::string > debug_strings() const
Contents of frame in strings.
progressive_int directional_y_
progressive_image image_diagonal_
frame_parsed_parameters(const frame_builder &builder=frame_builder(), const std::chrono::milliseconds &override_duration=std::chrono::milliseconds{0})
bool does_not_change() const
Generic locator abstracting the location of an image.
Describes a unit's animation sequence.
void redraw(const std::chrono::milliseconds &frame_time, bool on_start_time, bool in_scope_of_frame, const map_location &src, const map_location &dst, halo::handle &halo_id, halo::manager &halo_man, const frame_parameters &animation_val, const frame_parameters &engine_val) const
const std::chrono::milliseconds & duration() const
bool does_not_change() const
std::vector< std::string > debug_strings() const
frame_parameters parameters(const std::chrono::milliseconds ¤t_time) const
frame_parameters end_parameters() const
std::set< map_location > get_overlaped_hex(const std::chrono::milliseconds &frame_time, const map_location &src, const map_location &dst, const frame_parameters &animation_val, const frame_parameters &engine_val) const
frame_parameters merge_parameters(const std::chrono::milliseconds ¤t_time, const frame_parameters &animation_val, const frame_parameters &engine_val=frame_parameters()) const
This function merges the value provided by:
unit_frame(const frame_builder &builder=frame_builder())
frame_parsed_parameters builder_
@ unit_default
Default layer for drawing units.
@ unit_first
Reserve layers to be selected for wml.
constexpr int get_abs_frame_layer(drawing_layer layer)
std::shared_ptr< halo_record > handle
Functions to load and save images from/to disk.
Audio output for sound and music.
rect dst
Location on the final composed sheet.
rect src
Non-transparent portion of the surface to compose.
The basic class for representing 8-bit RGB or RGBA colour values.
All parameters from a frame at a given instant.
utils::optional< color_t > blend_with
boost::tribool auto_hflip
image::locator image_diagonal
boost::tribool primary_frame
std::chrono::milliseconds duration
utils::optional< color_t > text_color
boost::tribool auto_vflip
Encapsulates the map of the game.