Direction reverse_dir(Direction d);
/**
- * Screen that displays a worldmap
+ * Screen that runs a WorldMap, which lets the player choose a Level.
*/
class WorldMap : public Screen
{
private:
Tux* tux;
+ TileSet *tileset;
+ bool free_tileset;
+
static WorldMap* current_;
std::auto_ptr<Menu> worldmap_menu;
GameObjects game_objects;
std::list<TileMap*> solid_tilemaps;
- std::auto_ptr<TileManager> tile_manager;
-
public:
/** Variables to deal with the passive map messages */
Timer passive_message_timer;
bool in_level;
+ /* variables to track panning to a spawn point */
+ Vector pan_pos;
+ bool panning;
+
public:
WorldMap(const std::string& filename, const std::string& force_spawnpoint = "");
~WorldMap();
/**
* moves Tux to the given spawnpoint
*/
- void move_to_spawnpoint(const std::string& spawnpoint);
+ void move_to_spawnpoint(const std::string& spawnpoint, bool pan =false);
/**
* returns the width (in tiles) of a worldmap
void load(const std::string& filename);
void on_escape_press();
+
+ Vector get_camera_pos_for_tux();
+ void clamp_camera_position(Vector& c);
};
} // namespace WorldMapNS