// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#define BULLET_STARTING_YM 1
-#define BULLET_XM 5
-
#ifndef SUPERTUX_SPECIAL_H
#define SUPERTUX_SPECIAL_H
enum UpgradeKind {
UPGRADE_GROWUP,
+ UPGRADE_FIREFLOWER,
UPGRADE_ICEFLOWER,
UPGRADE_HERRING,
UPGRADE_1UP
void load_special_gfx();
void free_special_gfx();
-class Upgrade
+class Upgrade : public GameObject
{
public:
UpgradeKind kind;
- int dir;
- base_type base;
- base_type old_base;
+ Direction dir;
Physic physic;
- void init(float x, float y, int dir, UpgradeKind kind);
+ 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);
+ void collision(void* p_c_object, int c_object, CollisionType type);
+ std::string type() { return "Upgrade"; };
+
+ ~Upgrade() {};
private:
/** removes the Upgrade from the global upgrade list. Note that after this
* anymore then
*/
void remove_me();
+
+ void bump(Player* player);
+};
+
+enum BulletsKind {
+ FIRE_BULLET,
+ ICE_BULLET
};
-class Bullet
+class Bullet : public GameObject
{
public:
+ int life_count;
base_type base;
base_type old_base;
+
+ int kind;
- void init(float x, float y, float xm, int dir);
+ void init(float x, float y, float xm, Direction dir, int kind_);
void action(double frame_ratio);
void draw();
void collision(int c_object);
+ std::string type() { return "Bullet"; };
private:
/** removes the Upgrade from the global upgrade list. Note that after this