X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fplatform.cpp;h=b0b2a3b1c1bce0c23d44d778b89598f36cc6388e;hb=fe138b9ec292ca9679b43cf5c4555f0193bab25d;hp=cbe01888aac259152ee11e8c0d44bca1104c6099;hpb=02288dc76442bd6616a200a2d22c0954d2fc8180;p=supertux.git diff --git a/src/object/platform.cpp b/src/object/platform.cpp index cbe01888a..b0b2a3b1c 100644 --- a/src/object/platform.cpp +++ b/src/object/platform.cpp @@ -1,7 +1,7 @@ // $Id$ // // SuperTux -// Copyright (C) 2005 Marek Moeckel +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -12,17 +12,17 @@ // 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 #include "platform.hpp" #include -#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) {