diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/entities.h | 5 | ||||
-rw-r--r-- | include/world.h | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/include/entities.h b/include/entities.h index e7389dc..2687c24 100644 --- a/include/entities.h +++ b/include/entities.h @@ -5,6 +5,7 @@ class Entity{ public: + void *inWorld; float width; float height; float speed; @@ -15,7 +16,7 @@ public: bool alive; unsigned int texture[]; - + void spawn(float, float); void draw(void); void wander(int, vec2*); @@ -38,7 +39,7 @@ public: class Structures : public Entity{ public: Structures(); - void spawn(int, float, float); + unsigned int spawn(int, float, float); }; #endif // ENTITIES_H diff --git a/include/world.h b/include/world.h index 2a1d3c3..ff1a3ef 100644 --- a/include/world.h +++ b/include/world.h @@ -3,8 +3,6 @@ #include <common.h> // For HLINE, vec2, OpenGL utilities, etc. -//#define WORLD_ENTITY_MAX 64 // Maximum number of entities that can be bound to a world - /* * World - creates and handles an area of land */ @@ -29,8 +27,6 @@ private: int x_start; // Worlds are centered on the x axis (0,n), this contains // where to start drawing the world to have it centered properly. World *behind,*infront; // Pointers to other areas of land that are behind or in front of this one, respectively. - //Entity **peeps; // Stores pointers to entities that are bound to the world - //unsigned int peepCount; // Number of entities bound to the world void singleDetect(Entity *e); public: World *toLeft,*toRight; // Pointers to areas to the left and right of this world. These are made public @@ -59,8 +55,7 @@ public: // world is drawn the world has to appear directly behind the player) World *goWorldFront(Player *p); // Functions the same as goWorldBack(), but checks/returns the world in front of // this one. - - //void addEntity(Entity *e); // Binds an entity to this world (this world will then handle its drawing and detection) + }; #endif // WORLD_H |