Author: alink
Date: Mon Apr 16 23:07:48 2007
New Revision: 16870

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16870&view=rev
Log:
Remove my frame-shift of flag animations (didn't work well with some 
custom flags), planning to replace it with a cleaner time-shift.

Modified:
    trunk/data/game.cfg
    trunk/src/display.cpp

Modified: trunk/data/game.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/game.cfg?rev=16870&r1=16869&r2=16870&view=diff
==============================================================================
--- trunk/data/game.cfg (original)
+++ trunk/data/game.cfg Mon Apr 16 23:07:48 2007
@@ -90,7 +90,6 @@
     partmoved_ball_image="misc/ball-partmoved.png"
     enemy_ball_image="misc/ball-enemy.png"
     ally_ball_image="misc/ball-ally.png"
-    # use preferably the same time duration for each frame 
     
flag_image="flags/flag-1.png:150,flags/flag-2.png:150,flags/flag-3.png:150,flags/flag-4.png:150"
     flag_rgb=green
 

Modified: trunk/src/display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=16870&r1=16869&r2=16870&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Mon Apr 16 23:07:48 2007
@@ -109,7 +109,6 @@
        image::set_zoom(zoom_);
 
        //inits the flag list
-       //Note the local shifts of flag animation will look better if the tempo 
is regular
        flags_.reserve(teams_.size());
        for(size_t i = 0; i != teams_.size(); ++i) {
                std::string flag;
@@ -150,8 +149,7 @@
                }
                flags_.push_back(temp_anim);
 
-               
//flags_.back().start_animation(rand()%flags_.back().get_end_time(), true);
-               flags_.back().start_animation(0, true);
+               
flags_.back().start_animation(rand()%flags_.back().get_end_time(), true);
        }
 
        //clear the screen contents
@@ -1856,9 +1854,7 @@
        for(size_t i = 0; i != teams_.size(); ++i) {
                if(teams_[i].owns_village(loc) && (!fogged(x,y) || 
!shrouded(x,y) && !teams_[currentTeam_].is_enemy(i+1))) {
                        flags_[i].update_last_draw_time();
-                       // we apply a frame shift to flag animation to avoid 
repetion
-                       // x+y*2 garantee that adjacant villages have a 1-3 
frames difference (on 4)
-                       return 
image::get_image(flags_[i].get_next_frame(x+y*2));
+                       return image::get_image(flags_[i].get_current_frame());
                }
        }
 


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

Reply via email to