[Super-tux-commit] supertux/lib/special sprite.cpp,1.15,1.16
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-08-18 18:26:49
|
Update of /cvsroot/super-tux/supertux/lib/special In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10214/lib/special Modified Files: sprite.cpp Log Message: Round frame on checking for last frame, so that the last frame is used. Index: sprite.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/special/sprite.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- sprite.cpp 18 Aug 2004 10:32:26 -0000 1.15 +++ sprite.cpp 18 Aug 2004 18:26:40 -0000 1.16 @@ -119,7 +119,7 @@ { frame = 0; last_tick = SDL_GetTicks(); -animation_reversed = true; +animation_reversed = false; next_action.clear(); } @@ -157,7 +157,7 @@ if(animation_reversed) { float excedent = frame - 0; - if(excedent < 0 || excedent >= get_frames()) + if((int)excedent < 0 || excedent >= get_frames()) { // last case can happen when not used reverse_animation() frame = get_frames() - 1; if(animation_loops > 0) @@ -177,7 +177,7 @@ else { float excedent = frame - action->surfaces.size(); - if(excedent >= 0) + if((int)excedent >= 0) { frame = 0; if(animation_loops > 0) |