From 56e4ac91328b4b3540fd089bd143394714b8d2fe Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Thu, 22 Apr 2004 20:41:40 +0000 Subject: [PATCH] Made a START_LIVES definition (in defines.h) that has the lives that the players start with. i have made them to be 4, since the worldmap is so hard... SVN-Revision: 653 --- src/defines.h | 4 ++++ src/scene.cpp | 3 ++- src/worldmap.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/defines.h b/src/defines.h index e2cb949de..936216f68 100644 --- a/src/defines.h +++ b/src/defines.h @@ -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 diff --git a/src/scene.cpp b/src/scene.cpp index de44f220e..fc290771e 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -19,13 +19,14 @@ #include #include "scene.h" +#include "defines.h" PlayerStatus player_status; PlayerStatus::PlayerStatus() : score(0), distros(0), - lives(3), + lives(START_LIVES), score_multiplier(1) { } diff --git a/src/worldmap.cpp b/src/worldmap.cpp index f595490b3..1b073543e 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -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)) -- 2.11.0