Fix for #453 (Menu frame lingers)
[supertux.git] / src / worldmap / worldmap.hpp
index 431c96c..87c83a9 100644 (file)
@@ -69,6 +69,9 @@ Direction reverse_dir(Direction d);
  */
 class WorldMap : public Screen
 {
+  static Color level_title_color;
+  static Color message_color;
+  static Color teleporter_message_color;
 private:
   Tux* tux;
 
@@ -119,6 +122,10 @@ private:
 
   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();
@@ -162,6 +169,9 @@ public:
    */
   void finished_level(Level* level);
 
+  /** returns current Tux incarnation */
+  Tux* get_tux() { return tux; }
+
   LevelTile* at_level();
   SpecialTile* at_special_tile();
   SpriteChange* at_sprite_change(const Vector& pos);
@@ -199,7 +209,7 @@ public:
   /**
    * 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
@@ -218,6 +228,9 @@ private:
 
   void load(const std::string& filename);
   void on_escape_press();
+
+  Vector get_camera_pos_for_tux();
+  void clamp_camera_position(Vector& c);
 };
 
 } // namespace WorldMapNS