]> Dogcows Code - chaz/yoink/blobdiff - src/Character.hh
house-keeping
[chaz/yoink] / src / Character.hh
index 2f175ad65d3b7c90aeafaa03a7f6f6de3ba9c5b6..28e588b627da8ccc0b45b49dc80cbac1b37fc258 100644 (file)
 #ifndef _CHARACTER_HH_
 #define _CHARACTER_HH_
 
+#include <boost/shared_ptr.hpp>
+
+#include <Moof/Aabb.hh>
+#include <Moof/Entity.hh>
+#include <Moof/Math.hh>
+#include <Moof/Octree.hh>
+#include <Moof/RigidBody.hh>
+#include <Moof/Sphere.hh>
+
+#include "Animation.hh"
+#include "Tilemap.hh"
+
+
+
+class Character;
+typedef boost::shared_ptr<Character> 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
+class Character : public Mf::RigidBody2, public Mf::OctreeInsertable
 {
 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;
+
+       void setZCoord(Mf::Scalar z);
+
+       void addImpulse(Mf::Vector2 impulse);
+       void addForce(Mf::Vector2 force);
+       void setPosition(Mf::Vector2 position);
 
-       void draw(dc::scalar alpha);
+       virtual int getOctant(const Mf::Aabb& aabb) const;
 
-       dc::tilemap* texture;
-       dc::animation* anim;
+       Tilemap         tilemap;
+       Animation       animation;
+
+private:
+
+       mutable Mf::Scalar mZCoord;
 };
 
 
 #endif // _CHARACTER_HH_
 
+/** vim: set ts=4 sw=4 tw=80: *************************************************/
+
This page took 0.018144 seconds and 4 git commands to generate.