Made a START_LIVES definition (in defines.h) that has the lives that the players...
authorRicardo Cruz <rick2@aeiou.pt>
Thu, 22 Apr 2004 20:41:40 +0000 (20:41 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Thu, 22 Apr 2004 20:41:40 +0000 (20:41 +0000)
i have made them to be 4, since the worldmap is so hard...

SVN-Revision: 653

src/defines.h
src/scene.cpp
src/worldmap.cpp

index e2cb949..936216f 100644 (file)
@@ -65,6 +65,10 @@ enum DyingType {
 #define RUN_SPEED 1.5
 #define JUMP_SPEED 1.2
 
+/* gameplay related defines */
+
+#define START_LIVES 4
+
 #define MAX_BULLETS 1
 
 #define GRAVITY 1.0
index de44f22..fc29077 100644 (file)
 
 #include <stdlib.h>
 #include "scene.h"
+#include "defines.h"
 
 PlayerStatus player_status;
 
 PlayerStatus::PlayerStatus()
   : score(0),
     distros(0),
-    lives(3),
+    lives(START_LIVES),
     score_multiplier(1)
 {
 }
index f595490..1b07354 100644 (file)
@@ -820,7 +820,7 @@ WorldMap::loadgame(const std::string& filename)
       reader.read_int("distros", &player_status.distros);
 
       if (player_status.lives < 0)
-        player_status.lives = 3;
+        player_status.lives = START_LIVES;
 
       lisp_object_t* tux_cur = 0;
       if (reader.read_lisp("tux", &tux_cur))