[Super-tux-commit] supertux/src player.cpp,1.153,1.154 player.h,1.82,1.83
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-08-17 23:23:21
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3051/src Modified Files: player.cpp player.h Log Message: Changed next action behavior. Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.153 retrieving revision 1.154 diff -u -d -r1.153 -r1.154 --- player.cpp 17 Aug 2004 23:06:27 -0000 1.153 +++ player.cpp 17 Aug 2004 23:23:11 -0000 1.154 @@ -95,12 +95,12 @@ } void -TuxBodyParts::start_animation(int loops, std::string next_action) +TuxBodyParts::one_time_animation() { -head->start_animation(loops, next_action); -body->start_animation(loops, next_action); -arms->start_animation(loops, next_action); -feet->start_animation(loops, next_action); +head->start_animation(1); +body->start_animation(1); +arms->start_animation(1); +feet->start_animation(1); } void @@ -826,12 +826,12 @@ if (dir == RIGHT) { tux_body->set_action("idle-right"); - tux_body->start_animation(1, "stand-right"); + tux_body->one_time_animation(); } else { tux_body->set_action("idle-left"); - tux_body->start_animation(1, "stand-left"); + tux_body->one_time_animation(); } idle_timer.start(IDLE_TIME); } Index: player.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.h,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- player.h 17 Aug 2004 23:06:27 -0000 1.82 +++ player.h 17 Aug 2004 23:23:11 -0000 1.83 @@ -110,7 +110,7 @@ ~TuxBodyParts() { }; void set_action(std::string action); - void start_animation(int loops, std::string next_action = ""); + void one_time_animation(); void draw(DrawingContext& context, const Vector& pos, int layer, Uint32 drawing_effect = NONE_EFFECT); |