#include <string>
#include <vector>
+class PlayerStatus;
+
class World
{
+public:
+ static World* current()
+ {
+ return current_;
+ }
+
private:
- std::vector<std::string> levels;
- std::string basedir;
- std::string savegame_filename;
- /// squirrel table that saves persistent state (about the world)
- HSQOBJECT state_table;
- HSQOBJECT world_thread;
static World* current_;
public:
void save_state();
void load_state();
- const std::string& get_level_filename(unsigned int i) const;
unsigned int get_num_levels() const;
+ const std::string& get_level_filename(unsigned int i) const;
const std::string& get_basedir() const;
+ const std::string& get_title() const;
+ /** returns player status */
+ PlayerStatus* get_player_status() const { return player_status.get(); }
- static World* current()
- {
- return current_;
- }
void run();
+private:
+ std::vector<std::string> levels;
+ std::string basedir;
+ std::string savegame_filename;
+ /// squirrel table that saves persistent state (about the world)
+ HSQOBJECT state_table;
+ HSQOBJECT world_thread;
std::string title;
std::string description;
+ std::auto_ptr<PlayerStatus> player_status;
+
+public:
bool hide_from_contribs;
bool is_levelset;
};