diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-26 16:07:07 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-26 16:07:07 -0400 |
commit | 75b782c83954e77554d2ad30f9e45e723e91765e (patch) | |
tree | dd578b850bcea82265264987ffc9bb01937172ef /include/world.h | |
parent | 419d06f319c631c9c4860aababbfc49ee26aeefc (diff) |
created base for indoor areas
Diffstat (limited to 'include/world.h')
-rw-r--r-- | include/world.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/world.h b/include/world.h index ff1a3ef..444b2c4 100644 --- a/include/world.h +++ b/include/world.h @@ -7,7 +7,7 @@ * World - creates and handles an area of land */ class World { -private: +protected: /* * struct line_t * @@ -32,13 +32,15 @@ public: World *toLeft,*toRight; // Pointers to areas to the left and right of this world. These are made public // so that they can easily be set without a function. - World(unsigned int width); // Generates a world of width 'width'. + World(void); ~World(void); // Frees the 'line' array. + virtual void generate(unsigned int width); // Generate the world + void addLayer(unsigned int width); // Generates a new world and makes 'behind' point to it. If 'behind' // already points to a world, the new world will be set to be behind 'behind'. - void draw(vec2 *vec); // Draws the world around the coordinates 'vec' + virtual void draw(vec2 *vec); // Draws the world around the coordinates 'vec' void detect(Player *p); // Insures objects/entities stored in an Entity class stay outside of the @@ -58,4 +60,16 @@ public: }; +/* + * IndoorWorld - Indoor settings stored in a World class ;) + */ +class IndoorWorld : public World { +public: + IndoorWorld(void); + ~IndoorWorld(void); + + void generate(unsigned int width); + void draw(vec2 *vec); +}; + #endif // WORLD_H |