28 explicit tod_color(
int red = 0,
int green = 0,
int blue = 0)
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;
113 static void parse_times(
const config& cfg, std::vector<time_of_day>& normal_times);
tod_color(int red=0, int green=0, int blue=0)
Small struct to store and manipulate ToD color adjusts.
std::string image_mask
The image that is to be laid over all images while this time of day lasts.
tod_color color
The color modifications that should be made to the game board to reflect the time of day...
std::string sounds
List of "ambient" sounds associated with this time_of_day, Played at the beginning of turn...
tod_color operator+(const tod_color &o) const
int lawful_bonus
The % bonus lawful units receive.
std::string image
The image to be displayed in the game status.
std::ostream & operator<<(std::ostream &s, const tod_color &tod)
Object which defines a time of day with associated bonuses, image, sounds etc.
void write(std::ostream &out, const configr_of &cfg, unsigned int level)
static map_location::DIRECTION s
bool operator==(const tod_color &o) const
bool operator!=(const tod_color &o) const
bool operator==(const time_of_day &o) const
Functions to load and save images from/to disk.
A config object defines a single node in a WML file, with access to child nodes.