small improvements

This commit is contained in:
Jérémy Rosen 2006-03-26 16:03:56 +00:00
parent 980cf2dd70
commit 3bc3b27066
3 changed files with 3 additions and 4 deletions

View file

@ -1338,7 +1338,7 @@ void display::draw_tile(int x, int y)
unit_map::iterator it = units_.find(loc);
if(it != units_.end()) {
it->second.refresh();;
it->second.refresh();
}
SDL_Rect clip_rect = map_area();

View file

@ -37,7 +37,6 @@ struct unit_frame {
highlight_ratio(highlight) {halo = prepare_halo(in_halo,begin,end);};
explicit unit_frame(const config& cfg);
// int start, end;
int xoffset;
std::string image;
std::string image_diagonal;

View file

@ -387,8 +387,8 @@ bool unit_attack(display& disp, unit_map& units, const gamemap& map,
const double pos = animation_time < attacker.get_animation()->get_first_frame_time()?0.0:
(1.0 - double(animation_time)/double(attacker.get_animation()->get_first_frame_time()));
attacker.set_offset(pos*0.6);
disp.draw_tile(a.x,a.y);
disp.draw_tile(b.x,b.y);
disp.draw_tile(a.x,a.y);
if(leader_loc.valid()) disp.draw_tile(leader_loc.x,leader_loc.y);
disp.update_display();
events::pump();
@ -408,8 +408,8 @@ bool unit_attack(display& disp, unit_map& units, const gamemap& map,
(leader_loc.valid() && !leader->second.get_animation()->animation_finished() )) {
const double pos = (1.0-double(animation_time)/double(end_time));
attacker.set_offset(pos*0.6);
disp.draw_tile(a.x,a.y);
disp.draw_tile(b.x,b.y);
disp.draw_tile(a.x,a.y);
if(leader_loc.valid()) disp.draw_tile(leader_loc.x,leader_loc.y);
disp.update_display();
events::pump();