X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.hh;h=50c3da51a6418582569a88145be462acc5b017d6;hp=19559f38b0f54be1643f31fc29f2949323be977b;hb=64bd443538f57ad1bdff6c6b35953e72141129b2;hpb=bc2bc12125d6c223d2935557e01926fe21166e38 diff --git a/src/Character.hh b/src/Character.hh index 19559f3..50c3da5 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -31,9 +31,12 @@ #include +#include #include #include -#include +#include +#include +#include #include "Animation.hh" #include "Tilemap.hh" @@ -49,7 +52,7 @@ typedef boost::shared_ptr CharacterP; * includes the heroine herself and the bad guys. */ -struct Character : public Mf::Entity +struct Character : public Mf::Entity, public Mf::OctreeInsertable { protected: @@ -63,9 +66,21 @@ public: 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; - Tilemap tilemap; - Animation animation; + Mf::State2 previous; + Mf::State2 current; + + Tilemap tilemap; + Animation animation; + + Mf::Aabb aabb_; + Mf::Sphere sphere_; + +private: + + static const Mf::Scalar z = 96.0; };