X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fspecial.h;h=0e69b8914b2466a3ec55738e237e17e902265745;hb=e68610f027ad6f35025d9aca87202ceb4501e97e;hp=5ea0d59c2d854cbd46045e12eb3ce98e4c543055;hpb=403f2652505e814b645892bffaf89a584984f9b8;p=supertux.git diff --git a/src/special.h b/src/special.h index 5ea0d59c2..0e69b8914 100644 --- a/src/special.h +++ b/src/special.h @@ -20,13 +20,14 @@ #ifndef SUPERTUX_SPECIAL_H #define SUPERTUX_SPECIAL_H -#include +#include "SDL.h" + #include "bitmask.h" -#include "type.h" -#include "texture.h" +#include "special/base.h" +#include "video/surface.h" #include "collision.h" #include "player.h" -#include "physic.h" +#include "math/physic.h" /* Upgrade types: */ @@ -34,33 +35,29 @@ enum UpgradeKind { UPGRADE_GROWUP, UPGRADE_FIREFLOWER, UPGRADE_ICEFLOWER, - UPGRADE_HERRING, + UPGRADE_STAR, UPGRADE_1UP }; void load_special_gfx(); void free_special_gfx(); -class Upgrade : public MovingObject, public Drawable +class Upgrade : public MovingObject { public: UpgradeKind kind; Direction dir; Physic physic; - Upgrade(DisplayManager& display_manager, const Vector& pos, Direction dir, - UpgradeKind kind); + Upgrade(const Vector& pos, Direction dir, UpgradeKind kind); virtual ~Upgrade(); virtual void action(float frame_ratio); - virtual void draw(ViewPort& viewport, int layer); + virtual void draw(DrawingContext& context); virtual void collision(const MovingObject& other, int); void collision(void* p_c_object, int c_object, CollisionType type); - virtual std::string type() const - { return "Upgrade"; }; - private: void bump(Player* player); }; @@ -70,19 +67,17 @@ enum BulletsKind { ICE_BULLET }; -class Bullet : public MovingObject, public Drawable +class Bullet : public MovingObject { public: - Bullet(DisplayManager& manager, const Vector& pos, float xm, int dir, + Bullet(const Vector& pos, float xm, int dir, int kind); virtual void action(float frame_ratio); - virtual void draw(ViewPort& viewport, int layer); + virtual void draw(DrawingContext& context); void collision(int c_object); virtual void collision(const MovingObject& other_object, int type); - virtual std::string type() const - { return "Bullet"; }; int kind;