// SuperTux
-// Copyright (C) 2004 Ingo Ruhnke <grumbel@gmx.de>
+// Copyright (C) 2004 Ingo Ruhnke <grumbel@gmail.com>
// Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
//
// This program is free software: you can redistribute it and/or modify
#include "worldmap/teleporter.hpp"
class Sprite;
-class Menu;
class GameObject;
class TileMap;
+class PlayerStatus;
-namespace WorldMapNS {
+namespace worldmap {
class Tux;
class LevelTile;
WEST_EAST_WAY
};
-std::string direction_to_string(Direction d);
-Direction string_to_direction(const std::string& d);
-Direction reverse_dir(Direction d);
-
/**
* Screen that runs a WorldMap, which lets the player choose a Level.
*/
Tux* tux;
+ PlayerStatus* player_status;
+
TileSet *tileset;
bool free_tileset;
static WorldMap* current_;
- std::auto_ptr<Menu> worldmap_menu;
-
Vector camera_offset;
std::string name;
bool panning;
public:
- WorldMap(const std::string& filename, const std::string& force_spawnpoint = "");
+ WorldMap(const std::string& filename, PlayerStatus* player_status, const std::string& force_spawnpoint = "");
~WorldMap();
void add_object(GameObject* object);
/** returns current Tux incarnation */
Tux* get_tux() { return tux; }
+ /** returns player status */
+ PlayerStatus* get_player_status() { return player_status; }
+
LevelTile* at_level();
SpecialTile* at_special_tile();
SpriteChange* at_sprite_change(const Vector& pos);
private:
void get_level_title(LevelTile& level);
+ void get_level_target_time(LevelTile& level);
void draw_status(DrawingContext& context);
void calculate_total_stats();
Vector get_camera_pos_for_tux();
void clamp_camera_position(Vector& c);
+ Vector last_position;
+ float last_target_time;
private:
WorldMap(const WorldMap&);
WorldMap& operator=(const WorldMap&);
};
-} // namespace WorldMapNS
+} // namespace worldmap
#endif