From afec8e7c3aec1a186512b997ed3b717efef8fc43 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 11 Feb 2008 00:19:11 +0000 Subject: renamed Entity.base_* to Entity.core_* fixed camera::mode::Overview --- src/core/entity.h | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'src/core/entity.h') diff --git a/src/core/entity.h b/src/core/entity.h index 518166b..62b8a39 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -34,41 +34,47 @@ class Entity { public: /// create a new entity and add it to the registry - Entity(unsigned int entity_flags = 0, unsigned int entity_type = entity::Default); + Entity(unsigned int entity_flags = 0); virtual ~Entity(); - /// id of the entity - unsigned int id; + /// core type of this entity + virtual inline unsigned int core_type() { return entity::Default; } - /// flags - unsigned int flags; - - /// type - unsigned int type; - - /// base shape - entity::Shape base_shape; + /// core shape + entity::Shape core_shape; - /// base color - math::Color base_color; + /// core color + math::Color core_color; - /// base radius - float base_radius; + /// core radius + float core_radius; /// label std::string label; + /// custom game type of this entity + unsigned int type; + + /// id of the entity + unsigned int id; + + /// flags + unsigned int flags; + /* updateable */ /// location of the entity math::Vector3f location; }; -/// an entity that can move +/// an entity that can move around in the game world class EntityDynamic : public Entity { public: - EntityDynamic(unsigned int entity_flags = 0, unsigned int entity_type=entity::Dynamic); + EntityDynamic(unsigned int entity_flags = 0); + + /// core type of this entity + virtual inline unsigned int core_type() { return entity::Dynamic; } /* updateable */ @@ -80,7 +86,10 @@ public: class EntityControlable : public EntityDynamic { public: - EntityControlable(unsigned int entity_flags = 0, unsigned int entity_type=entity::Controlable); + EntityControlable(unsigned int entity_flags = 0); + + /// core type of this entity + virtual inline unsigned int core_type() { return entity::Controlable; } /// owner of this controllable entity Player *owner; -- cgit v1.2.3