set_colour_adjustment-related improvements

This commit is contained in:
Tomasz Śniatowski 2008-09-17 16:38:48 +01:00
parent 03c37f1651
commit 66cb412a9b
2 changed files with 28 additions and 0 deletions

View file

@ -557,6 +557,21 @@ void set_colour_adjustment(int r, int g, int b)
}
}
boost::tuple<int, int, int> get_colour_adjustment()
{
return boost::make_tuple(red_adjust, green_adjust, blue_adjust);
}
colour_adjustment_resetter::colour_adjustment_resetter()
: r_(red_adjust), g_(green_adjust), b_(blue_adjust)
{
}
void colour_adjustment_resetter::reset()
{
set_colour_adjustment(r_, g_, b_);
}
void set_team_colors(const std::vector<std::string>* colors)
{
if (colors == NULL)

View file

@ -24,6 +24,8 @@
#include <vector>
#include <list>
#include <boost/tuple/tuple.hpp>
///this module manages the cache of images. With an image name, you can get
///the surface corresponding to that image.
//
@ -197,6 +199,17 @@ namespace image {
///their pixels. i.e. add a certain colour hint to images. useful
///for representing day/night. Invalidates all scaled images.
void set_colour_adjustment(int r, int g, int b);
boost::tuple<int, int, int> get_colour_adjustment();
class colour_adjustment_resetter
{
public:
colour_adjustment_resetter();
void reset();
private:
int r_, g_, b_;
};
///set the team colors used by the TC image modification
///use a vector with one string for each team