mail[Wesnoth-commits] r13494 - in /trunk: changelog src/unit_frame.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by jeremy . rosen on September 10, 2006 - 12:37:
Author: boucman
Date: Sun Sep 10 12:36:59 2006
New Revision: 13494

URL: http://svn.gna.org/viewcvs/wesnoth?rev=13494&view=rev
Log:
add blend with and blend color parameter

Modified:
    trunk/changelog
    trunk/src/unit_frame.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=13494&r1=13493&r2=13494&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Sep 10 12:36:59 2006
@@ -47,6 +47,8 @@
    continuously in an animation
    * alpha blending is our first progressive parameter
    * new parameter in frames, offset. It allows to specify the position
+   * new parameter in frames blend_color and blend_ratio, to mix a color in
+   the anim
    relative to the faced hex
    * units can now have a recruit animation that will be played on unit
    recruit.

Modified: trunk/src/unit_frame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.cpp?rev=13494&r1=13493&r2=13494&view=diff
==============================================================================
--- trunk/src/unit_frame.cpp (original)
+++ trunk/src/unit_frame.cpp Sun Sep 10 12:36:59 2006
@@ -13,6 +13,7 @@
 
 #include <global.hpp>
 #include <unit_frame.hpp>
+#include <display.hpp>
 progressive_string::progressive_string(const std::string & data,int duration)
 {
                const std::vector<std::string> first_pass = 
utils::split(data);
@@ -232,7 +233,8 @@
        halo_ = progressive_string(cfg["halo"],end_time_-begin_time_);
        halo_x_ = progressive_int(cfg["halo_x"],end_time_ -begin_time_);
        halo_y_ = progressive_int(cfg["halo_y"],end_time_ -begin_time_);
-       blend_with_= 0;
+       std::vector<std::string> tmp_blend=utils::split(cfg["blend_color"]);
+       if(tmp_blend.size() ==3) blend_with_= 
display::rgb(atoi(tmp_blend[0].c_str()),atoi(tmp_blend[1].c_str()),atoi(tmp_blend[2].c_str()));
        blend_ratio_ = 
progressive_double(cfg["blend_ratio"],end_time_-begin_time_);
        highlight_ratio_ = 
progressive_double(cfg["alpha"].empty()?"1.0":cfg["alpha"],end_time_-begin_time_);
        offset_ = 
progressive_double(cfg["offset"].empty()?"-20":cfg["offset"],end_time_-begin_time_);




Related Messages


Powered by MHonArc, Updated Sun Sep 10 16:20:31 2006