X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.hh;h=50c3da51a6418582569a88145be462acc5b017d6;hp=2f175ad65d3b7c90aeafaa03a7f6f6de3ba9c5b6;hb=64bd443538f57ad1bdff6c6b35953e72141129b2;hpb=79becf045222f385da5a1b9eb79081f6f5266c86 diff --git a/src/Character.hh b/src/Character.hh index 2f175ad..50c3da5 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -29,29 +29,62 @@ #ifndef _CHARACTER_HH_ #define _CHARACTER_HH_ +#include + +#include +#include +#include +#include +#include +#include + +#include "Animation.hh" +#include "Tilemap.hh" + + + +struct Character; +typedef boost::shared_ptr CharacterP; + + /** - * @file Character.hh - * 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 dc::resource, public dc::drawable +struct Character : public Mf::Entity, public Mf::OctreeInsertable { +protected: + + Mf::Vector2 userForce; + public: - struct exception : public std::runtime_error - { - explicit exception(const std::string& what_arg) : - std::runtime_error(what_arg) {} - }; Character(const std::string& name); + virtual ~Character() {} + + virtual void update(Mf::Scalar t, Mf::Scalar dt); + virtual void draw(Mf::Scalar alpha) const; + + virtual bool isInsideAabb(const Mf::Aabb& aabb) const; + virtual int getOctant(const Mf::Aabb& aabb) const; - void draw(dc::scalar alpha); + Mf::State2 previous; + Mf::State2 current; - dc::tilemap* texture; - dc::animation* anim; + Tilemap tilemap; + Animation animation; + + Mf::Aabb aabb_; + Mf::Sphere sphere_; + +private: + + static const Mf::Scalar z = 96.0; }; #endif // _CHARACTER_HH_ +/** vim: set ts=4 sw=4 tw=80: *************************************************/ +