X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdoor.h;h=50d01389974df37d63f89c59802f266f2a5ec3c1;hb=35fa5542fadf1848919363620c7a76b04150c283;hp=a0bae41c415eea073d3423513e9cbf6ba8c85e15;hpb=cf4de5d58eb99a11369c329c01bfa5abe4b0a398;p=supertux.git diff --git a/src/door.h b/src/door.h index a0bae41c4..50d013899 100644 --- a/src/door.h +++ b/src/door.h @@ -16,21 +16,33 @@ // 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 __DOOR_H__ -#define __DOOR_H__ + +#ifndef SUPERTUX_DOOR_H +#define SUPERTUX_DOOR_H #include + +#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); @@ -40,10 +52,11 @@ 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 +#endif /*SUPERTUX_DOOR_H*/