X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fbicycle_platform.cpp;h=c66ee3e6f453bc6a8cd33b2c100a459e1ff6ac8b;hb=78ac7aef674f518549f96160c6354b589553f952;hp=4014049ec51526cc8eeee16db88189887baad2ff;hpb=fea3446f05e1e7673607b835c269d3e8d1929ab3;p=supertux.git diff --git a/src/object/bicycle_platform.cpp b/src/object/bicycle_platform.cpp index 4014049ec..c66ee3e6f 100644 --- a/src/object/bicycle_platform.cpp +++ b/src/object/bicycle_platform.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - BicyclePlatform // 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,44 +12,49 @@ // 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 "bicycle_platform.hpp" +#include "object/bicycle_platform.hpp" #include -#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/portable.hpp" -BicyclePlatform::BicyclePlatform(const lisp::Lisp& reader) - : MovingSprite(reader, LAYER_OBJECTS, COLGROUP_STATIC), - master(0), slave(0), radius(128), angle(0), angular_speed(0), momentum(0) +#include "object/player.hpp" +#include "object/portable.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" + +BicyclePlatform::BicyclePlatform(const Reader& reader) : + MovingSprite(reader, LAYER_OBJECTS, COLGROUP_STATIC), + master(0), + slave(0), + center(), + radius(128), + angle(0), + angular_speed(0), + contacts(), + momentum(0) { center = get_pos(); } -BicyclePlatform::BicyclePlatform(BicyclePlatform* master) - : MovingSprite(*master), - master(master), slave(this), center(master->center), radius(master->radius), angle(master->angle + M_PI), angular_speed(0), momentum(0) +BicyclePlatform::BicyclePlatform(BicyclePlatform* master) : + MovingSprite(*master), + master(master), + slave(this), + center(master->center), + radius(master->radius), + angle(master->angle + M_PI), + angular_speed(0), + contacts(), + momentum(0) { set_pos(get_pos() + Vector(master->get_bbox().get_width(), 0)); master->master = master; master->slave = this; } -BicyclePlatform::~BicyclePlatform() { +BicyclePlatform::~BicyclePlatform() +{ if ((this == master) && (master)) { slave->master = 0; slave->slave = 0; @@ -126,3 +129,4 @@ BicyclePlatform::update(float elapsed_time) IMPLEMENT_FACTORY(BicyclePlatform, "bicycle-platform"); +/* EOF */