Merged changes from branches/supertux-milestone2-grumbel/ to trunk/supertux/
[supertux.git] / src / badguy / flame.cpp
index ae6b790..0956160 100644 (file)
@@ -1,12 +1,10 @@
-//  $Id$
-//
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
-//  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
 //  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 <config.h>
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-#include "flame.hpp"
+#include "badguy/flame.hpp"
 
-#include "log.hpp"
-#include "lisp/writer.hpp"
-#include "lisp/lisp.hpp"
-#include "object_factory.hpp"
 #include "audio/sound_manager.hpp"
+#include "lisp/lisp.hpp"
+#include "supertux/object_factory.hpp"
 
 #include <math.h>
 
 static const std::string SOUNDFILE = "sounds/flame.wav";
 
-Flame::Flame(const lisp::Lisp& reader)
-  : BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), angle(0), radius(100), speed(2)
+Flame::Flame(const Reader& reader) :
+  BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), 
+  angle(0), 
+  radius(100), 
+  speed(2),
+  sound_source()
 {
   reader.get("radius", radius);
   reader.get("speed", speed);
@@ -45,19 +42,6 @@ Flame::Flame(const lisp::Lisp& reader)
 }
 
 void
-Flame::write(lisp::Writer& writer)
-{
-  writer.start_list("flame");
-
-  writer.write("x", start_position.x);
-  writer.write("y", start_position.y);
-  writer.write("radius", radius);
-  writer.write("speed", speed);
-
-  writer.end_list("flame");
-}
-
-void
 Flame::active_update(float elapsed_time)
 {
   angle = fmodf(angle + elapsed_time * speed, (float) (2*M_PI));
@@ -90,4 +74,6 @@ Flame::kill_fall()
 {
 }
 
-IMPLEMENT_FACTORY(Flame, "flame")
+IMPLEMENT_FACTORY(Flame, "flame");
+
+/* EOF */