From 83ea08c2e563e20498bfbf3b9956a229d3baf813 Mon Sep 17 00:00:00 2001 From: Ali El Gariani Date: Mon, 16 Apr 2007 21:07:48 +0000 Subject: [PATCH] Remove my frame-shift of flag animations (didn't work well with some custom flags), planning to replace it with a cleaner time-shift. --- data/game.cfg | 1 - src/display.cpp | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/data/game.cfg b/data/game.cfg index c9f108a90a6..0601207a479 100644 --- a/data/game.cfg +++ b/data/game.cfg @@ -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 diff --git a/src/display.cpp b/src/display.cpp index 56097bbaa14..11f949652aa 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -109,7 +109,6 @@ display::display(unit_map& units, CVideo& video, const gamemap& map, 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 @@ display::display(unit_map& units, CVideo& video, const gamemap& map, } 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 @@ surface display::get_flag(t_translation::t_letter terrain, int x, int y) 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()); } }