From 4e4cb561fcc8315bcd1fc728fd9d479ed27fca9d Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Wed, 6 Jul 2011 17:56:37 -0400 Subject: [PATCH] Forgot a couple necessary files --- entity.cpp | 15 +++++++++++++++ entity.h | 25 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 entity.cpp create mode 100644 entity.h diff --git a/entity.cpp b/entity.cpp new file mode 100644 index 0000000..7915d94 --- /dev/null +++ b/entity.cpp @@ -0,0 +1,15 @@ +#include "entity.h" + +// These are in a .cpp file solely because inline destructors can cause +// problems for some compilers + +Entity::Entity() +{ + +} + + +Entity::~Entity() +{ + +} diff --git a/entity.h b/entity.h new file mode 100644 index 0000000..dee9db4 --- /dev/null +++ b/entity.h @@ -0,0 +1,25 @@ +/* An entity is any object that needs to animate, or be clickable, or that we + * want to handle its own rendering. We can keep them all in a single list, and + * render/iterate them in a loop + */ + +#ifndef _ENTITY_H_ +#define _ENTITY_H_ + +#include + +class Entity +{ + public: + Entity(); + virtual ~Entity(); + + virtual bool init() = 0; + virtual void render(SDL_Surface* display) = 0; + virtual void iterate() = 0; + + protected: + +}; + +#endif