added a bell object which is a new better way to do reset points
[supertux.git] / src / object / platform.cpp
index e1a868d..69c6c0d 100644 (file)
@@ -5,14 +5,16 @@
 #include "resources.h"
 #include "player.h"
 #include "special/sprite_manager.h"
-#include "utils/lispreader.h"
+#include "lisp/lisp.h"
+#include "lisp/writer.h"
+#include "object_factory.h"
 
-Platform::Platform(LispReader& reader)
+Platform::Platform(const lisp::Lisp& reader)
 {
   sprite = sprite_manager->create("flying_platform");
   movement = Vector(0, 1);
-  reader.read_float("x", bbox.p1.x);
-  reader.read_float("y", bbox.p1.y);
+  reader.get("x", bbox.p1.x);
+  reader.get("y", bbox.p1.y);
   bbox.set_size(sprite->get_width(), sprite->get_height());
 
   flags |= FLAG_SOLID;
@@ -26,7 +28,7 @@ Platform::~Platform()
 }
 
 HitResponse
-Platform::collision(GameObject& object, const CollisionHit& hit)
+Platform::collision(GameObject& , const CollisionHit& )
 {
 #if 0
   if(typeid(object) == typeid(Player)) {
@@ -38,7 +40,7 @@ Platform::collision(GameObject& object, const CollisionHit& hit)
 }
 
 void
-Platform::action(float elapsed_time)
+Platform::action(float )
 {
   // just some test code...
   if(state == 0) {
@@ -73,3 +75,5 @@ Platform::draw(DrawingContext& context)
 {
   sprite->draw(context, get_pos(), LAYER_OBJECTS);
 }
+
+IMPLEMENT_FACTORY(Platform, "flying_platform");