Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3061
Modified Files:
gameloop.cpp
Log Message:
- fixed lives status to handle more than 5 lives
Index: gameloop.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- gameloop.cpp 26 Apr 2004 12:19:22 -0000 1.105
+++ gameloop.cpp 26 Apr 2004 12:48:33 -0000 1.106
@@ -121,7 +121,6 @@
world->get_tux()->base.y = best_reset_point.y;
}
}
-
if (st_gl_mode != ST_GL_DEMO_GAME)
{
@@ -674,7 +673,18 @@
white_text->draw("COINS", screen->h, 0, 1);
gold_text->draw(str, 608, 0, 1);
- white_text->draw("LIVES", screen->h, 20, 1);
+ white_text->draw("LIVES", 480, 20);
+ if (player_status.lives >= 5)
+ {
+ sprintf(str, "%dx", player_status.lives);
+ gold_text->draw(str, 585, 20);
+ tux_life->draw(565+(18*3), 20);
+ }
+ else
+ {
+ for(int i= 0; i < player_status.lives; ++i)
+ tux_life->draw(565+(18*i),20);
+ }
if(show_fps)
{
@@ -682,11 +692,6 @@
white_text->draw("FPS", screen->h, 40, 1);
gold_text->draw(str, screen->h + 60, 40, 1);
}
-
- for(int i= 0; i < player_status.lives; ++i)
- {
- tux_life->draw(565+(18*i),20);
- }
}
void
|