Author: ilor
Date: Wed Sep 17 17:38:48 2008
New Revision: 29517

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29517&view=rev
Log:
set_colour_adjustment-related improvements

Modified:
    trunk/src/image.cpp
    trunk/src/image.hpp

Modified: trunk/src/image.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/image.cpp?rev=29517&r1=29516&r2=29517&view=diff
==============================================================================
--- trunk/src/image.cpp (original)
+++ trunk/src/image.cpp Wed Sep 17 17:38:48 2008
@@ -557,6 +557,21 @@
        }
 }
 
+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)

Modified: trunk/src/image.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/image.hpp?rev=29517&r1=29516&r2=29517&view=diff
==============================================================================
--- trunk/src/image.hpp (original)
+++ trunk/src/image.hpp Wed Sep 17 17:38:48 2008
@@ -23,6 +23,8 @@
 #include <string>
 #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 @@
        ///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


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to