- Added images for ducking big Super Tux.
[supertux.git] / src / scene.cpp
index fccff6f..238039e 100644 (file)
@@ -17,7 +17,8 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#include <stdlib.h>
+#include <cstdlib>
+
 #include "scene.h"
 #include "defines.h"
 
@@ -27,9 +28,18 @@ PlayerStatus::PlayerStatus()
   : score(0),
     distros(0),
     lives(START_LIVES),
-    score_multiplier(1),
-    bonus(NO_BONUS)
+    bonus(NO_BONUS),
+    score_multiplier(1)
+{
+}
+
+void PlayerStatus::reset()
 {
+  score = 0;
+  distros = 0;
+  lives = START_LIVES;
+  bonus = NO_BONUS;
+  score_multiplier = 1;
 }
 
 std::string bonus_to_string(PlayerStatus::BonusType b)
@@ -41,7 +51,9 @@ std::string bonus_to_string(PlayerStatus::BonusType b)
     case PlayerStatus::GROWUP_BONUS:
       return "growup";
     case PlayerStatus::FLOWER_BONUS:
-      return "icflower";
+      return "iceflower";
+    default:
+      return "none";
     }
 }
 
@@ -57,9 +69,6 @@ PlayerStatus::BonusType string_to_bonus(const std::string& str)
     return PlayerStatus::NO_BONUS;
 }
 
-// FIXME: Move this into a view class
-float scroll_x;
-
 unsigned int global_frame_counter;
 
 // EOF //