Merged changes from branches/supertux-milestone2-grumbel/ to trunk/supertux/
[supertux.git] / src / badguy / walking_badguy.cpp
index e68b1d1..90ba94d 100644 (file)
@@ -1,12 +1,10 @@
-//  $Id$
-//
 //  SuperTux - WalkingBadguy
 //  Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.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 "walking_badguy.hpp"
+#include "badguy/walking_badguy.hpp"
 
-#include "log.hpp"
-#include "timer.hpp"
-#include "lisp/writer.hpp"
 #include "sprite/sprite.hpp"
 
-WalkingBadguy::WalkingBadguy(const Vector& pos, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer)
-  : BadGuy(pos, sprite_name, layer), walk_left_action(walk_left_action), walk_right_action(walk_right_action), walk_speed(80), max_drop_height(-1)
-{
-}
-
-WalkingBadguy::WalkingBadguy(const Vector& pos, Direction direction, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer)
-  : BadGuy(pos, direction, sprite_name, layer), walk_left_action(walk_left_action), walk_right_action(walk_right_action), walk_speed(80), max_drop_height(-1)
+WalkingBadguy::WalkingBadguy(const Vector& pos, 
+                             const std::string& sprite_name, 
+                             const std::string& walk_left_action, 
+                             const std::string& walk_right_action, 
+                             int layer) :
+  BadGuy(pos, sprite_name, layer), 
+  walk_left_action(walk_left_action), 
+  walk_right_action(walk_right_action), 
+  walk_speed(80), 
+  max_drop_height(-1),
+  turn_around_timer(),
+  turn_around_counter()
 {
 }
 
-WalkingBadguy::WalkingBadguy(const lisp::Lisp& reader, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer)
-  : BadGuy(reader, sprite_name, layer), walk_left_action(walk_left_action), walk_right_action(walk_right_action), walk_speed(80), max_drop_height(-1)
+WalkingBadguy::WalkingBadguy(const Vector& pos, 
+                             Direction direction, 
+                             const std::string& sprite_name, 
+                             const std::string& walk_left_action, 
+                             const std::string& walk_right_action, 
+                             int layer) :
+  BadGuy(pos, direction, sprite_name, layer), 
+  walk_left_action(walk_left_action), 
+  walk_right_action(walk_right_action), 
+  walk_speed(80), 
+  max_drop_height(-1),
+  turn_around_timer(),
+  turn_around_counter()
 {
 }
 
-void
-WalkingBadguy::write(lisp::Writer& writer)
+WalkingBadguy::WalkingBadguy(const Reader& reader, 
+                             const std::string& sprite_name, 
+                             const std::string& walk_left_action, 
+                             const std::string& walk_right_action, 
+                             int layer) :
+  BadGuy(reader, sprite_name, layer), 
+  walk_left_action(walk_left_action), 
+  walk_right_action(walk_right_action), 
+  walk_speed(80), 
+  max_drop_height(-1),
+  turn_around_timer(),
+  turn_around_counter()
 {
-  writer.write("x", start_position.x);
-  writer.write("y", start_position.y);
 }
 
 void
@@ -135,7 +151,6 @@ WalkingBadguy::unfreeze()
   WalkingBadguy::initialize();
 }
 
-
 float
 WalkingBadguy::get_velocity_y() const
 {
@@ -147,3 +162,5 @@ WalkingBadguy::set_velocity_y(float vy)
 {
   physic.set_velocity_y(vy);
 }
+
+/* EOF */