shorten unstable time
[supertux.git] / src / object / block.h
index bd750a0..d70bc6d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __BOX_H__
-#define __BOX_H__
+#ifndef __BLOCK_H__
+#define __BLOCK_H__
 
 #include "special/moving_object.h"
 
@@ -21,7 +21,7 @@ public:
   virtual void draw(DrawingContext& context);
 
 protected:
-  virtual void hit(Player* player) = 0;
+  virtual void hit(Player& player) = 0;
   void start_bounce();
 
   Sprite* sprite;
@@ -36,8 +36,10 @@ class BonusBlock : public Block
 public:
   BonusBlock(const Vector& pos, int data);
 
+  void try_open();
+
 protected:
-  virtual void hit(Player* player);
+  virtual void hit(Player& player);
 
 private:
   int data;
@@ -48,8 +50,10 @@ class Brick : public Block
 public:
   Brick(const Vector& pos, int data);
 
+  void try_break(bool playerhit = false);
+
 protected:
-  virtual void hit(Player* player);
+  virtual void hit(Player& player);
 
 private:
   bool breakable;