*possible* fix for bugs #453 and #373
[supertux.git] / src / worldmap / worldmap.hpp
index 71675ab..8215cda 100644 (file)
@@ -69,9 +69,15 @@ 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;
 
+  TileSet *tileset;
+  bool     free_tileset;
+
   static WorldMap* current_;
 
   std::auto_ptr<Menu> worldmap_menu;
@@ -86,8 +92,6 @@ private:
   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;
@@ -118,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();
@@ -198,7 +206,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
@@ -217,6 +225,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