X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap%2Flevel.hpp;h=eb577f226afd4ffe9bb1cf7ae27913f1d3814da6;hb=5ea541d387f5cc3838894d69d3782a997282df9e;hp=8e79f3edd1f910fc7443eb6dd83121323a7c8295;hpb=112f01454123c94f5627200c6819b219026f0af0;p=supertux.git diff --git a/src/worldmap/level.hpp b/src/worldmap/level.hpp index 8e79f3edd..eb577f226 100644 --- a/src/worldmap/level.hpp +++ b/src/worldmap/level.hpp @@ -1,4 +1,4 @@ -// $Id: worldmap.hpp 3327 2006-04-13 15:02:40Z ravu_al_hemio $ +// $Id$ // // SuperTux // Copyright (C) 2004 Ingo Ruhnke @@ -17,33 +17,34 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __WORLDMAP_LEVEL_HPP__ -#define __WORLDMAP_LEVEL_HPP__ +#ifndef __LEVEL_TILE_HPP__ +#define __LEVEL_TILE_HPP__ #include #include #include "math/vector.hpp" #include "game_object.hpp" #include "statistics.hpp" +#include "video/surface.hpp" class Sprite; namespace WorldMapNS { -class Level : public GameObject +class LevelTile : public GameObject { public: - Level(const std::string& basedir, const lisp::Lisp* lisp); - virtual ~Level(); + LevelTile(const std::string& basedir, const lisp::Lisp* lisp); + virtual ~LevelTile(); virtual void draw(DrawingContext& context); virtual void update(float elapsed_time); - + Vector pos; - std::string name; std::string title; bool solved; + bool auto_play; /**< true if Tux should automatically enter this level if it's unfinished */ std::auto_ptr sprite; @@ -55,9 +56,17 @@ public: /** If false, disables the auto walking after finishing a level */ bool auto_path; + + /** return Surface of level picture or 0 if no picture is available */ + const Surface* get_picture(); + +private: + std::string basedir; + bool picture_cached; + Surface* picture; + }; } #endif -