+// $Id$
+//
+// SuperTux
+// Copyright (C) 2005 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 distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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>
+
#include "spike.h"
Spike::Spike(const Vector& pos, Direction dir)
bbox.set_pos(Vector(0, 0));
bbox.set_size(32, 32);
set_direction(dir);
+ countMe = false;
}
-Spike::Spike(LispReader& reader)
+Spike::Spike(const lisp::Lisp& reader)
{
sprite = sprite_manager->create("spike");
- reader.read_float("x", start_position.x);
- reader.read_float("y", start_position.y);
+ reader.get("x", start_position.x);
+ reader.get("y", start_position.y);
bbox.set_size(32, 32);
int idir = 0;
- reader.read_int("direction", idir);
+ reader.get("direction", idir);
set_direction((Direction) idir);
+ countMe = false;
}
void
}
void
-Spike::write(LispWriter& writer)
+Spike::write(lisp::Writer& writer)
{
writer.start_list("spike");
writer.write_float("x", start_position.x);
}
void
-Spike::active_action(float )
+Spike::active_update(float )
{
}
+
+IMPLEMENT_FACTORY(Spike, "spike")