#include "object/endsequence.hpp"
#include "supertux/screen.hpp"
+#include "supertux/player_status.hpp"
#include "util/currenton.hpp"
#include "video/surface.hpp"
class Level;
class Sector;
class Statistics;
+class PlayerStatus;
class DrawingContext;
class CodeController;
class Menu;
public Currenton<GameSession>
{
public:
- GameSession(const std::string& levelfile, Statistics* statistics = NULL);
+ GameSession(const std::string& levelfile, PlayerStatus* player_status, Statistics* statistics = NULL);
~GameSession();
void record_demo(const std::string& filename);
Level* get_current_level()
{ return level.get(); }
+ PlayerStatus* get_player_status()
+ { return player_status; }
+
void start_sequence(const std::string& sequencename);
/**
* resources for the current level/world
*/
std::string get_working_directory();
- void restart_level();
+ int restart_level();
void toggle_pause();
+ void abort_level();
/**
* Enters or leaves level editor mode
HSQUIRRELVM run_script(std::istream& in, const std::string& sourcename);
void on_escape_press();
- void process_menu();
- std::auto_ptr<Level> level;
- std::auto_ptr<Surface> statistics_backdrop;
+ std::unique_ptr<Level> level;
+ SurfacePtr statistics_backdrop;
// scripts
typedef std::vector<HSQOBJECT> ScriptList;
std::string newspawnpoint;
Statistics* best_level_statistics;
+ PlayerStatus* player_status;
std::ostream* capture_demo_stream;
std::string capture_file;
std::istream* playback_demo_stream;
CodeController* demo_controller;
- std::auto_ptr<Menu> game_menu;
-
float play_time; /**< total time in seconds that this session ran interactively */
bool edit_mode; /**< true if GameSession runs in level editor mode */
bool levelintro_shown; /**< true if the LevelIntro screen was already shown */
+
+ int coins_at_start; /** How many coins does the player have at the start */
+ BonusType bonus_at_start; /** What bonuses does the player have at the start */
+ int max_fire_bullets_at_start; /** How many fire bullets does the player have */
+ int max_ice_bullets_at_start; /** How many ice bullets does the player have */
private:
GameSession(const GameSession&);