projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
-Worldmap cleanups (use DrawingContext transformstack)
[supertux.git]
/
src
/
object
/
block.h
diff --git
a/src/object/block.h
b/src/object/block.h
index
ae11d22
..
9f54049
100644
(file)
--- a/
src/object/block.h
+++ b/
src/object/block.h
@@
-1,7
+1,8
@@
-#ifndef __B
OX
_H__
-#define __B
OX
_H__
+#ifndef __B
LOCK
_H__
+#define __B
LOCK
_H__
#include "special/moving_object.h"
#include "special/moving_object.h"
+#include "lisp/lisp.h"
namespace SuperTux {
class Sprite;
namespace SuperTux {
class Sprite;
@@
-13,7
+14,7
@@
using namespace SuperTux;
class Block : public MovingObject
{
public:
class Block : public MovingObject
{
public:
- Block(
const Vector& pos, Sprite* sprite
);
+ Block(
Sprite* sprite = 0
);
~Block();
virtual HitResponse collision(GameObject& other, const CollisionHit& hit);
~Block();
virtual HitResponse collision(GameObject& other, const CollisionHit& hit);
@@
-35,6
+36,7
@@
class BonusBlock : public Block
{
public:
BonusBlock(const Vector& pos, int data);
{
public:
BonusBlock(const Vector& pos, int data);
+ BonusBlock(const lisp::Lisp& lisp);
void try_open();
void try_open();
@@
-42,7
+44,15
@@
protected:
virtual void hit(Player& player);
private:
virtual void hit(Player& player);
private:
- int data;
+ enum Contents {
+ CONTENT_COIN,
+ CONTENT_FIREGROW,
+ CONTENT_ICEGROW,
+ CONTENT_STAR,
+ CONTENT_1UP
+ };
+
+ Contents contents;
};
class Brick : public Block
};
class Brick : public Block