X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fpneumatic_platform.cpp;h=839ddda7db2d33dadd444f680f5ddd3dfa2e58a3;hb=78ac7aef674f518549f96160c6354b589553f952;hp=79d319845cf7860bb6d4f3efd33bece88f8731f1;hpb=0c8cbb609357b90e2457fb2ffd0a40c37f767599;p=supertux.git diff --git a/src/object/pneumatic_platform.cpp b/src/object/pneumatic_platform.cpp index 79d319845..839ddda7d 100644 --- a/src/object/pneumatic_platform.cpp +++ b/src/object/pneumatic_platform.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - PneumaticPlatform // Copyright (C) 2007 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 @@ -14,43 +12,43 @@ // 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. - -#include +// along with this program. If not, see . -#include "pneumatic_platform.hpp" +#include "object/pneumatic_platform.hpp" -#include -#include "log.hpp" -#include "video/drawing_context.hpp" -#include "resources.hpp" -#include "player.hpp" -#include "path.hpp" -#include "path_walker.hpp" -#include "sprite/sprite.hpp" -#include "lisp/lisp.hpp" -#include "object_factory.hpp" -#include "sector.hpp" +#include "object/player.hpp" #include "object/portable.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" -PneumaticPlatform::PneumaticPlatform(const lisp::Lisp& reader) - : MovingSprite(reader, LAYER_OBJECTS, COLGROUP_STATIC), - master(0), slave(0), start_y(0), offset_y(0), speed_y(0) +PneumaticPlatform::PneumaticPlatform(const Reader& reader) : + MovingSprite(reader, LAYER_OBJECTS, COLGROUP_STATIC), + master(0), + slave(0), + start_y(0), + offset_y(0), + speed_y(0), + contacts() { start_y = get_pos().y; } -PneumaticPlatform::PneumaticPlatform(PneumaticPlatform* master) - : MovingSprite(*master), - master(master), slave(this), start_y(master->start_y), offset_y(-master->offset_y), speed_y(0) +PneumaticPlatform::PneumaticPlatform(PneumaticPlatform* master) : + MovingSprite(*master), + master(master), + slave(this), + start_y(master->start_y), + offset_y(-master->offset_y), + speed_y(0), + contacts() { set_pos(get_pos() + Vector(master->get_bbox().get_width(), 0)); master->master = master; master->slave = this; } -PneumaticPlatform::~PneumaticPlatform() { +PneumaticPlatform::~PneumaticPlatform() +{ if ((this == master) && (master)) { slave->master = 0; slave->slave = 0; @@ -115,3 +113,4 @@ PneumaticPlatform::update(float elapsed_time) IMPLEMENT_FACTORY(PneumaticPlatform, "pneumatic-platform"); +/* EOF */