X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap%2Fworldmap.hpp;h=87c83a9385fbb5914748c8b5a6a9746aac243946;hb=5667d7e94d85f968ab914bc457edd689fc907253;hp=431c96cf199420a642afab1e1ce853482134f281;hpb=0d4be1a5fadf30244c41188f114f83c818ece9bc;p=supertux.git diff --git a/src/worldmap/worldmap.hpp b/src/worldmap/worldmap.hpp index 431c96cf1..87c83a938 100644 --- a/src/worldmap/worldmap.hpp +++ b/src/worldmap/worldmap.hpp @@ -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