blind commit, please test: use squirrel datatypes
[supertux.git] / src / object / platform.cpp
index cbe0188..b0b2a3b 100644 (file)
@@ -1,7 +1,7 @@
 //  $Id$
 //
 //  SuperTux
-//  Copyright (C) 2005 Marek Moeckel <wansti@gmx.de>
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  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.
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
 #include <config.h>
 
 #include "platform.hpp"
 
 #include <stdexcept>
-#include "msg.hpp"
+#include "log.hpp"
 #include "video/drawing_context.hpp"
 #include "resources.hpp"
 #include "player.hpp"
@@ -37,12 +37,12 @@ Platform::Platform(const lisp::Lisp& reader)
   std::string sprite_name;
   reader.get("sprite", sprite_name);
   if(sprite_name == "")
-    throw new std::runtime_error("No sprite specified in platform object"); 
+    throw std::runtime_error("No sprite specified in platform object"); 
   sprite.reset(sprite_manager->create(sprite_name));
 
   const lisp::Lisp* pathLisp = reader.get_lisp("path");
   if(pathLisp == NULL)
-    throw new std::runtime_error("No path specified for platform");
+    throw std::runtime_error("No path specified for platform");
   path.reset(new Path());
   path->read(*pathLisp);
   walker.reset(new PathWalker(path.get()));
@@ -69,7 +69,7 @@ Platform::collision(GameObject& other, const CollisionHit& hit)
       //Tux is standing on the platform
       //Player* player = (Player*) &other;
       //player->add_velocity(speed * 1.5);
-      return TEST;
+      return PASS_MOVEMENT;
     }
   }
   if(other.get_flags() & FLAG_SOLID) {