X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fworldmap%2Flevel.hpp;h=9d9db4f3c1ddb7350ffd3bb6d8cd03e08eed1c96;hb=12a28b64dcce9c7ff706451b4f3aecd201cc8a5f;hp=ce59cd2774a1faa613f0113c1a84cbc3a2db111a;hpb=cb941f239a04ee0588c99bfcdcd6aff62e1fbc98;p=supertux.git diff --git a/src/worldmap/level.hpp b/src/worldmap/level.hpp index ce59cd277..9d9db4f3c 100644 --- a/src/worldmap/level.hpp +++ b/src/worldmap/level.hpp @@ -1,13 +1,11 @@ -// $Id$ -// // SuperTux // Copyright (C) 2004 Ingo Ruhnke // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,21 +13,22 @@ // GNU General Public License for more details. // // 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 __LEVEL_TILE_HPP__ -#define __LEVEL_TILE_HPP__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_WORLDMAP_LEVEL_HPP +#define HEADER_SUPERTUX_WORLDMAP_LEVEL_HPP #include #include + #include "math/vector.hpp" -#include "game_object.hpp" -#include "statistics.hpp" +#include "supertux/game_object.hpp" +#include "supertux/statistics.hpp" +#include "video/surface.hpp" class Sprite; -namespace WorldMapNS -{ +namespace WorldMapNS { class LevelTile : public GameObject { @@ -39,11 +38,15 @@ public: virtual void draw(DrawingContext& context); virtual void update(float elapsed_time); - + + /** return Surface of level picture or 0 if no picture is available */ + const Surface* get_picture(); + +public: 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; @@ -53,11 +56,18 @@ public: /** Script that is run when the level is successfully finished */ std::string extro_script; - /** If false, disables the auto walking after finishing a level */ - bool auto_path; +private: + std::string basedir; + bool picture_cached; + Surface* picture; + +private: + LevelTile(const LevelTile&); + LevelTile& operator=(const LevelTile&); }; -} +} // namespace WorldMapNS #endif +/* EOF */