X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbadguy%2Figel.cpp;h=382aff4c75b9dba906272ee8944ecf730c7d09f6;hb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;hp=cd37105af4ef14c033956bef63101e167c9c2af2;hpb=f406067af6cbeb0a638078fe1d386d092583909c;p=supertux.git diff --git a/src/badguy/igel.cpp b/src/badguy/igel.cpp index cd37105af..382aff4c7 100644 --- a/src/badguy/igel.cpp +++ b/src/badguy/igel.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Badguy "Igel" // 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,48 +12,39 @@ // 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 "igel.hpp" -#include "object/block.hpp" -#include "sector.hpp" +#include "badguy/igel.hpp" #include "object/bullet.hpp" +#include "supertux/sector.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +#include "supertux/object_factory.hpp" namespace { - const float WALKSPEED = 80; /**< speed at which we walk around */ - const float TURN_RECOVER_TIME = 0.5; /**< seconds before we will again turn around when shot at */ - const float RANGE_OF_VISION = 256; /**< range in px at which we can see bullets */ -} -Igel::Igel(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/igel/igel.sprite", "walking-left", "walking-right") +const float WALKSPEED = 80; /**< speed at which we walk around */ +const float TURN_RECOVER_TIME = 0.5; /**< seconds before we will again turn around when shot at */ +const float RANGE_OF_VISION = 256; /**< range in px at which we can see bullets */ + +} // namespace + +Igel::Igel(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/igel/igel.sprite", "walking-left", "walking-right"), + turn_recover_timer() { walk_speed = WALKSPEED; max_drop_height = 16; } -Igel::Igel(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/igel/igel.sprite", "walking-left", "walking-right") +Igel::Igel(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/igel/igel.sprite", "walking-left", "walking-right"), + turn_recover_timer() { walk_speed = WALKSPEED; max_drop_height = 16; } void -Igel::write(lisp::Writer& writer) -{ - writer.start_list("igel"); - WalkingBadguy::write(writer); - writer.end_list("igel"); -} - -void Igel::be_normal() { initialize(); @@ -127,4 +116,6 @@ Igel::collision_squished(GameObject& ) return false; } -IMPLEMENT_FACTORY(Igel, "igel") +IMPLEMENT_FACTORY(Igel, "igel"); + +/* EOF */