X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Fwind.cpp;h=ab23c3525d1f7f18e3e60ba634649db9c5af8422;hb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;hp=577c2a1bbe3d51596408d8b85eb113d2af680ed3;hpb=f406067af6cbeb0a638078fe1d386d092583909c;p=supertux.git diff --git a/src/object/wind.cpp b/src/object/wind.cpp index 577c2a1bb..ab23c3525 100644 --- a/src/object/wind.cpp +++ b/src/object/wind.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Wind // Copyright (C) 2006 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,23 +12,21 @@ // 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 . -#include +#include "object/wind.hpp" -#include "wind.hpp" -#include "video/drawing_context.hpp" +#include "math/random_generator.hpp" +#include "object/particles.hpp" #include "object/player.hpp" -#include "object_factory.hpp" -#include "random_generator.hpp" -#include "sector.hpp" -#include "particles.hpp" -#include "scripting/wind.hpp" #include "scripting/squirrel_util.hpp" -#include "lisp/lisp.hpp" +#include "scripting/wind.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" +#include "util/reader.hpp" +#include "video/drawing_context.hpp" -Wind::Wind(const lisp::Lisp& reader) +Wind::Wind(const Reader& reader) : blowing(true), acceleration(100), elapsed_time(0) { reader.get("name", name); @@ -65,7 +61,8 @@ Wind::update(float elapsed_time) // emit a particle Vector ppos = Vector(systemRandom.randf(bbox.p1.x+8, bbox.p2.x-8), systemRandom.randf(bbox.p1.y+8, bbox.p2.y-8)); Vector pspeed = Vector(speed.x, speed.y); - Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.4f, .4f, .4f), 3, .1f, LAYER_BACKGROUNDTILES+1)); + Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.4f, .4f, .4f), 3, .1f, + LAYER_BACKGROUNDTILES+1)); } } @@ -121,3 +118,5 @@ Wind::stop() } IMPLEMENT_FACTORY(Wind, "wind"); + +/* EOF */