29 :
r(std::clamp(
red, -510, 510))
30 ,
g(std::clamp(
green, -510, 510))
31 ,
b(std::clamp(
blue, -510, 510))
34 return r == o.
r &&
g == o.
g &&
b == o.
b;
37 return r == 0 &&
g == 0 &&
b == 0;
80 void write(
config& cfg, std::string textdomain =
"")
const;
113 static void parse_times(
const config& cfg, std::vector<time_of_day>& normal_times);
A config object defines a single node in a WML file, with access to child nodes.
Functions to load and save images from/to disk.
Object which defines a time of day with associated bonuses, image, sounds etc.
static void parse_times(const config &cfg, std::vector< time_of_day > &normal_times)
Parse config and add time of day entries into passed vector.
tod_color color
The color modifications that should be made to the game board to reflect the time of day.
void write(config &cfg, std::string textdomain="") const
int lawful_bonus
The % bonus lawful units receive.
std::string image
The image to be displayed in the game status.
time_of_day()
A default-constructed time of day object shouldn't really be used so this only loads some null values...
bool operator==(const time_of_day &o) const
std::string sounds
List of "ambient" sounds associated with this time_of_day, Played at the beginning of turn.
std::string image_mask
The image that is to be laid over all images while this time of day lasts.
Small struct to store and manipulate ToD color adjusts.
bool operator!=(const tod_color &o) const
tod_color operator+(const tod_color &o) const
tod_color(int red=0, int green=0, int blue=0)
bool operator==(const tod_color &o) const
static map_location::direction s
std::ostream & operator<<(std::ostream &s, const tod_color &tod)