X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Fpulsing_light.cpp;h=a37a7c015c6672e85e95fd907585a78d8127ad66;hb=d794aac09d4a3b3f5f93985cd74381bb4de4ce84;hp=c5d5872b220282a424fb0b8e250c26a4695897d0;hpb=fea3446f05e1e7673607b835c269d3e8d1929ab3;p=supertux.git diff --git a/src/object/pulsing_light.cpp b/src/object/pulsing_light.cpp index c5d5872b2..a37a7c015 100644 --- a/src/object/pulsing_light.cpp +++ b/src/object/pulsing_light.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Pulsing Light // 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,24 @@ // 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 "pulsing_light.hpp" -#include "video/color.hpp" +#include "object/pulsing_light.hpp" #include -#include "random_generator.hpp" -PulsingLight::PulsingLight(const Vector& center, float cycle_len, float min_alpha, float max_alpha, const Color& color) - : Light(center, color), min_alpha(min_alpha), max_alpha(max_alpha), cycle_len(cycle_len), t(0) +#include "math/random_generator.hpp" + +PulsingLight::PulsingLight(const Vector& center, float cycle_len_, float min_alpha_, float max_alpha_, const Color& color_) : + Light(center, color_), + min_alpha(min_alpha_), + max_alpha(max_alpha_), + cycle_len(cycle_len_), + t(0) { assert(cycle_len > 0); // start with random phase offset - t = systemRandom.randf(0.0, cycle_len); + t = gameRandom.randf(0.0, cycle_len); } PulsingLight::~PulsingLight() @@ -56,3 +55,5 @@ PulsingLight::draw(DrawingContext& context) color = old_color; } + +/* EOF */