projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- committed patch from Richard Smith
[supertux.git]
/
src
/
special.h
diff --git
a/src/special.h
b/src/special.h
index
24ce8c2
..
0e69b89
100644
(file)
--- a/
src/special.h
+++ b/
src/special.h
@@
-20,70
+20,70
@@
#ifndef SUPERTUX_SPECIAL_H
#define SUPERTUX_SPECIAL_H
#ifndef SUPERTUX_SPECIAL_H
#define SUPERTUX_SPECIAL_H
-#include <SDL.h>
+#include "SDL.h"
+
#include "bitmask.h"
#include "bitmask.h"
-#include "
typ
e.h"
-#include "
textur
e.h"
+#include "
special/bas
e.h"
+#include "
video/surfac
e.h"
#include "collision.h"
#include "player.h"
#include "collision.h"
#include "player.h"
-#include "physic.h"
+#include "
math/
physic.h"
/* Upgrade types: */
enum UpgradeKind {
UPGRADE_GROWUP,
/* Upgrade types: */
enum UpgradeKind {
UPGRADE_GROWUP,
+ UPGRADE_FIREFLOWER,
UPGRADE_ICEFLOWER,
UPGRADE_ICEFLOWER,
- UPGRADE_
HERRING
,
+ UPGRADE_
STAR
,
UPGRADE_1UP
};
void load_special_gfx();
void free_special_gfx();
UPGRADE_1UP
};
void load_special_gfx();
void free_special_gfx();
-class Upgrade : public
Game
Object
+class Upgrade : public
Moving
Object
{
public:
UpgradeKind kind;
Direction dir;
Physic physic;
{
public:
UpgradeKind kind;
Direction dir;
Physic physic;
- void init(float x, float y, Direction dir, UpgradeKind kind);
- void action(double frame_ratio);
- void draw();
- void collision(void* p_c_object, int c_object, CollisionType type);
- std::string type() { return "Upgrade"; };
+ Upgrade(const Vector& pos, Direction dir, UpgradeKind kind);
+ virtual ~Upgrade();
- ~Upgrade() {};
+ virtual void action(float frame_ratio);
+ virtual void draw(DrawingContext& context);
-private:
- /** removes the Upgrade from the global upgrade list. Note that after this
- * call the class doesn't exist anymore! So don't use any member variables
- * anymore then
- */
- void remove_me();
+ virtual void collision(const MovingObject& other, int);
+ void collision(void* p_c_object, int c_object, CollisionType type);
+private:
void bump(Player* player);
};
void bump(Player* player);
};
-class Bullet : public GameObject
+enum BulletsKind {
+ FIRE_BULLET,
+ ICE_BULLET
+};
+
+class Bullet : public MovingObject
{
{
- public:
- int life_count;
- base_type base;
- base_type old_base;
+public:
+ Bullet(const Vector& pos, float xm, int dir,
+ int kind);
- void init(float x, float y, float xm, Direction dir);
- void action(double frame_ratio);
- void draw();
+ virtual void action(float frame_ratio);
+ virtual void draw(DrawingContext& context);
void collision(int c_object);
void collision(int c_object);
- std::string type() { return "Bullet"; };
+ virtual void collision(const MovingObject& other_object, int type);
+
+ int kind;
+
private:
private:
- /** removes the Upgrade from the global upgrade list. Note that after this
- * call the class doesn't exist anymore! So don't use any member variables
- * anymore then
- */
- void remove_me();
+ int life_count;
+ Physic physic;
};
#endif /*SUPERTUX_SPECIAL_H*/
};
#endif /*SUPERTUX_SPECIAL_H*/