Badguys from the start of the level were not appearing. Fixed.
[supertux.git] / src / door.h
index c66b8cd..50d0138 100644 (file)
 
 #include <string>
 
+#include "video/surface.h"
 #include "interactive_object.h"
 #include "serializable.h"
+#include "special/timer.h"
 
+namespace SuperTux {
 class Sprite;
-
 class LispReader;
+}
+
+/** data images */
+#define DOOR_OPENING_TIME 1500
+#define DOOR_OPENING_FRAMES 8
+extern Sprite* door;
+extern Surface* door_opening[DOOR_OPENING_FRAMES];
 
 class Door : public InteractiveObject, public Serializable
 {
 public:
   Door(LispReader& reader);
+  Door(int x, int y);
   virtual ~Door();
 
   virtual void write(LispWriter& writer);
@@ -42,9 +52,10 @@ public:
   virtual void interaction(InteractionType type);
 
 private:
-  Sprite* sprite;
   std::string target_sector;
   std::string target_spawnpoint;
+  Timer animation_timer; //Used for door animation
+  bool door_activated;
 };
 
 #endif /*SUPERTUX_DOOR_H*/