Removed unused hatch files.
authorStephen Groundwater <slacker@gluebox.com>
Tue, 4 Jul 2006 21:00:40 +0000 (21:00 +0000)
committerStephen Groundwater <slacker@gluebox.com>
Tue, 4 Jul 2006 21:00:40 +0000 (21:00 +0000)
SVN-Revision: 3883

data/Jamfile
data/images/objects/hatch/hatch-0.png [deleted file]
data/images/objects/hatch/hatch-1.png [deleted file]
data/images/objects/hatch/hatch-2.png [deleted file]
data/images/objects/hatch/hatch-3.png [deleted file]
data/images/objects/hatch/hatch-4.png [deleted file]
data/images/objects/hatch/hatch-5.png [deleted file]
data/images/objects/hatch/hatch.sprite [deleted file]
data/levels/test/sectors.stl
src/trigger/hatch.cpp [deleted file]
src/trigger/hatch.hpp [deleted file]

index 9e44430..2707b99 100644 (file)
@@ -64,7 +64,6 @@ IMAGEPATHS =
        images/objects/eat-me
        images/objects/firefly
        images/objects/flying_platform
-       images/objects/hatch
        images/objects/icecube
        images/objects/invisible
        images/objects/keys
diff --git a/data/images/objects/hatch/hatch-0.png b/data/images/objects/hatch/hatch-0.png
deleted file mode 100644 (file)
index ac56856..0000000
Binary files a/data/images/objects/hatch/hatch-0.png and /dev/null differ
diff --git a/data/images/objects/hatch/hatch-1.png b/data/images/objects/hatch/hatch-1.png
deleted file mode 100644 (file)
index 639fc3c..0000000
Binary files a/data/images/objects/hatch/hatch-1.png and /dev/null differ
diff --git a/data/images/objects/hatch/hatch-2.png b/data/images/objects/hatch/hatch-2.png
deleted file mode 100644 (file)
index 75883d2..0000000
Binary files a/data/images/objects/hatch/hatch-2.png and /dev/null differ
diff --git a/data/images/objects/hatch/hatch-3.png b/data/images/objects/hatch/hatch-3.png
deleted file mode 100644 (file)
index 29f50ac..0000000
Binary files a/data/images/objects/hatch/hatch-3.png and /dev/null differ
diff --git a/data/images/objects/hatch/hatch-4.png b/data/images/objects/hatch/hatch-4.png
deleted file mode 100644 (file)
index bf36127..0000000
Binary files a/data/images/objects/hatch/hatch-4.png and /dev/null differ
diff --git a/data/images/objects/hatch/hatch-5.png b/data/images/objects/hatch/hatch-5.png
deleted file mode 100644 (file)
index 057ab84..0000000
Binary files a/data/images/objects/hatch/hatch-5.png and /dev/null differ
diff --git a/data/images/objects/hatch/hatch.sprite b/data/images/objects/hatch/hatch.sprite
deleted file mode 100644 (file)
index 8216ae9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-(supertux-sprite
-       (action
-          (name "normal")
-          (hitbox 0 0 0 0)
-          (images "hatch-0.png"))
-       (action
-          (name "open")
-          (hitbox 0 0 0 0)
-          (images "hatch-0.png"
-                  "hatch-1.png"
-                  "hatch-2.png"
-                  "hatch-3.png"
-                  "hatch-4.png"
-                  "hatch-5.png"))
-)
index 36d2b3e..d128f47 100644 (file)
@@ -91,7 +91,7 @@
          (x 0) (y 320)         (sector "another_world")
          (spawnpoint "main")
          )
-       (hatch
+       (door
          (x 832) (y 320)         (sector "another_world")
          (spawnpoint "main")
          )
diff --git a/src/trigger/hatch.cpp b/src/trigger/hatch.cpp
deleted file mode 100644 (file)
index 945a267..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-//  $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 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 "hatch.hpp"
-#include "game_session.hpp"
-#include "resources.hpp"
-#include "object_factory.hpp"
-#include "sprite/sprite.hpp"
-#include "sprite/sprite_manager.hpp"
-#include "video/drawing_context.hpp"
-#include "lisp/lisp.hpp"
-#include "lisp/writer.hpp"
-
-Hatch::Hatch(const lisp::Lisp& reader)
-{
-  reader.get("x", bbox.p1.x);
-  reader.get("y", bbox.p1.y);
-  bbox.set_size(64, 64);
-
-  reader.get("sector", target_sector);
-  reader.get("spawnpoint", target_spawnpoint);
-
-  sprite = sprite_manager->create("images/objects/hatch/hatch.sprite");
-}
-
-Hatch::Hatch(int x, int y, std::string sector, std::string spawnpoint)
-{
-  bbox.set_pos(Vector(x, y));
-  bbox.set_size(64, 64);
-  target_sector = sector;
-  target_spawnpoint = spawnpoint;
-
-  sprite = sprite_manager->create("images/objects/hatch/hatch.sprite");
-}
-
-Hatch::~Hatch()
-{
-  delete sprite;
-}
-
-void
-Hatch::write(lisp::Writer& writer)
-{
-  writer.start_list("hatch");
-
-  writer.write_float("x", bbox.p1.x);
-  writer.write_float("y", bbox.p1.y);
-  writer.write_float("width", bbox.get_width());
-  writer.write_float("height", bbox.get_height());
-  
-  writer.write_string("sector", target_sector);
-  writer.write_string("spawnpoint", target_spawnpoint);
-
-  writer.end_list("hatch");
-}
-
-void
-Hatch::update(float )
-{
-  //Check if hatch animation is complete
-  if(sprite->animation_done()) {
-    sprite->set_action("normal");
-    GameSession::current()->respawn(target_sector, target_spawnpoint);
-  }
-}
-
-void
-Hatch::draw(DrawingContext& context)
-{
-  sprite->draw(context, bbox.p1, LAYER_TILES);
-}
-
-void
-Hatch::event(Player& , EventType type)
-{
-  if(type == EVENT_ACTIVATE) {
-    sprite->set_action("open", 1);
-  }
-}
-
-IMPLEMENT_FACTORY(Hatch, "hatch");
diff --git a/src/trigger/hatch.hpp b/src/trigger/hatch.hpp
deleted file mode 100644 (file)
index 23be141..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//  $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 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.
-
-#ifndef SUPERTUX_HATCH_H
-#define SUPERTUX_HATCH_H
-
-#include <string>
-
-#include "video/surface.hpp"
-#include "sprite/sprite.hpp"
-#include "trigger_base.hpp"
-#include "serializable.hpp"
-#include "timer.hpp"
-
-class Hatch : public TriggerBase, public Serializable
-{
-public:
-  Hatch(const lisp::Lisp& reader);
-  Hatch(int x, int y, std::string sector, std::string spawnpoint);
-  virtual ~Hatch();
-
-  virtual void write(lisp::Writer& writer);
-  
-  virtual void update(float elapsed_time);
-  virtual void draw(DrawingContext& context);
-  virtual void event(Player& player, EventType type);
-
-private:
-  std::string target_sector;
-  std::string target_spawnpoint;
-  Sprite* sprite;
-};
-
-#endif