+ std::string name;
+ std::string music;
+
+ typedef std::vector<GameObject*> GameObjects;
+ GameObjects game_objects;
+ TileMap* solids;
+
+ TileManager* tile_manager;
+
+public:
+ struct SpecialTile
+ {
+ Vector pos;
+
+ /** Optional flags: */
+
+ /** Position to swap to player */
+ Vector teleport_dest;
+
+ /** Message to show in the Map */
+ std::string map_message;
+ bool passive_message;
+
+ /** Hide special tile */
+ bool invisible;
+
+ /** Only applies actions (ie. passive messages) when going to that direction */
+ bool apply_action_north;
+ bool apply_action_east;
+ bool apply_action_south;
+ bool apply_action_west;
+ };
+
+ struct Level
+ {
+ Vector pos;
+
+ std::string name;
+ std::string title;
+ bool solved;
+
+ /** Statistics for level tiles */
+ Statistics statistics;
+
+ /** Optional flags: */
+
+ /** Check if this level should be vertically flipped */
+ bool vertical_flip;
+
+ /** Script that is run when the level is successfully finished */
+ std::string extro_script;
+
+ /** Go to this world */
+ std::string next_worldmap;
+
+ /** Quit the worldmap */
+ bool quit_worldmap;
+
+ /** If false, disables the auto walking after finishing a level */
+ bool auto_path;
+
+ // Directions which are walkable from this level
+ bool north;
+ bool east;
+ bool south;
+ bool west;
+ };
+
+ /** Variables to deal with the passive map messages */
+ Timer passive_message_timer;
+ std::string passive_message;
+
+private:
+ std::string map_filename;
+ std::string levels_path;
+
+ typedef std::vector<SpecialTile> SpecialTiles;
+ SpecialTiles special_tiles;
+ typedef std::vector<Level> Levels;
+ Levels levels;
+ typedef std::vector<SpawnPoint*> SpawnPoints;
+ SpawnPoints spawn_points;
+
+ MusicRef song;
+
+ Vector offset;
+ std::string savegame_file;
+
+ std::string intro_script;
+ bool intro_displayed;
+
+ void get_level_title(Level& level);
+
+ void draw_status(DrawingContext& context);
+
+ // to avoid calculating total stats all the time. This way only
+ // when need, it is calculated.
+ Statistics total_stats;
+ void calculate_total_stats();