Merged changes from branches/supertux-milestone2-grumbel/ to trunk/supertux/
[supertux.git] / src / worldmap / level.cpp
index 59984ff..90383ba 100644 (file)
@@ -1,13 +1,11 @@
-//  $Id$
-//
 //  SuperTux
 //  Copyright (C) 2004 Ingo Ruhnke <grumbel@gmx.de>
 //  Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
 //
-//  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
 //  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.
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <config.h>
 
-#include <stddef.h>
 #include <physfs.h>
-#include "worldmap/level.hpp"
-#include "sprite/sprite_manager.hpp"
+#include <stddef.h>
+
 #include "sprite/sprite.hpp"
+#include "sprite/sprite_manager.hpp"
+#include "util/file_system.hpp"
+#include "util/log.hpp"
 #include "video/drawing_context.hpp"
-#include "log.hpp"
-#include "file_system.hpp"
+#include "worldmap/level.hpp"
 
-namespace WorldMapNS
-{
+namespace WorldMapNS {
 
-LevelTile::LevelTile(const std::string& basedir, const lisp::Lisp* lisp)
-  : solved(false), auto_play(false), basedir(basedir), picture_cached(false),
-    picture(0)
+LevelTile::LevelTile(const std::string& basedir, const lisp::Lisp* lisp) :
+  solved(false), 
+  auto_play(false), 
+  basedir(basedir), 
+  picture_cached(false),
+  picture(0)
 {
   lisp->get("name", name);
   lisp->get("x", pos.x);
@@ -42,14 +42,14 @@ LevelTile::LevelTile(const std::string& basedir, const lisp::Lisp* lisp)
 
   std::string spritefile = "images/worldmap/common/leveldot.sprite";
   lisp->get("sprite", spritefile);
-  sprite.reset(sprite_manager->create(spritefile));
+  sprite = sprite_manager->create(spritefile);
 
   lisp->get("extro-script", extro_script);
 
   if (!PHYSFS_exists((basedir + name).c_str()))
   {
     log_warning << "level file '" << name
-      << "' does not exist and will not be added to the worldmap" << std::endl;
+                << "' does not exist and will not be added to the worldmap" << std::endl;
     return;
   }
 }
@@ -84,3 +84,5 @@ LevelTile::get_picture()
 }
 
 }
+
+/* EOF */