X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.hh;h=19559f38b0f54be1643f31fc29f2949323be977b;hp=b1965ce7dd129076ff82b3af3484ae3599157270;hb=bc2bc12125d6c223d2935557e01926fe21166e38;hpb=c2321281bf12a7efaedde930422c7ddbc92080d4 diff --git a/src/Character.hh b/src/Character.hh index b1965ce..19559f3 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -29,37 +29,43 @@ #ifndef _CHARACTER_HH_ #define _CHARACTER_HH_ -#include -#include -#include -#include +#include + +#include +#include +#include + +#include "Animation.hh" +#include "Tilemap.hh" + + + +struct Character; +typedef boost::shared_ptr CharacterP; /** - * Parent class of animate objects with "personalities." + * Parent class of animate objects with "personalities." This basically + * includes the heroine herself and the bad guys. */ -class Character : public Mf::Drawable +struct Character : public Mf::Entity { -public: - Character(const std::string& name); - ~Character(); +protected: - void draw(Mf::Scalar alpha); + Mf::Vector2 userForce; - Mf::Tilemap& getTilemap(); - Mf::Animation& getAnimation(); +public: + + Character(const std::string& name); + virtual ~Character() {} + virtual void update(Mf::Scalar t, Mf::Scalar dt); + virtual void draw(Mf::Scalar alpha) const; - struct Exception : public std::runtime_error - { - explicit Exception(const std::string& what_arg) : - std::runtime_error(what_arg) {} - }; -private: - Mf::Tilemap tilemap; - Mf::Animation animation; + Tilemap tilemap; + Animation animation; };