projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #453 (Menu frame lingers)
[supertux.git]
/
src
/
worldmap
/
worldmap.hpp
diff --git
a/src/worldmap/worldmap.hpp
b/src/worldmap/worldmap.hpp
index
431c96c
..
87c83a9
100644
(file)
--- a/
src/worldmap/worldmap.hpp
+++ b/
src/worldmap/worldmap.hpp
@@
-69,6
+69,9
@@
Direction reverse_dir(Direction d);
*/
class WorldMap : public Screen
{
*/
class WorldMap : public Screen
{
+ static Color level_title_color;
+ static Color message_color;
+ static Color teleporter_message_color;
private:
Tux* tux;
private:
Tux* tux;
@@
-119,6
+122,10
@@
private:
bool in_level;
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();
public:
WorldMap(const std::string& filename, const std::string& force_spawnpoint = "");
~WorldMap();
@@
-162,6
+169,9
@@
public:
*/
void finished_level(Level* level);
*/
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);
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
*/
/**
* 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
/**
* returns the width (in tiles) of a worldmap
@@
-218,6
+228,9
@@
private:
void load(const std::string& filename);
void on_escape_press();
void load(const std::string& filename);
void on_escape_press();
+
+ Vector get_camera_pos_for_tux();
+ void clamp_camera_position(Vector& c);
};
} // namespace WorldMapNS
};
} // namespace WorldMapNS