aboutsummaryrefslogtreecommitdiffstats
path: root/include/world.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/world.h')
-rw-r--r--include/world.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/world.h b/include/world.h
index 48ab409..f9e952e 100644
--- a/include/world.h
+++ b/include/world.h
@@ -81,13 +81,32 @@ typedef struct line_t {
unsigned char color; /**< Lightness of dirt (brown) */
} line_t;
+/*
+ * Handle all logic that has to do with villages
+ */
+
+
+struct Village{
+ std::string name;
+ vec2 start;
+ vec2 end;
+ bool in;
+
+ std::vector<Structures *> build;
+ Village(const char *meme){
+ name = meme;
+ end.x = -0xffffffff;
+ start.x = 0xffffffff;
+ in = false;
+ }
+};
+
/**
* The world class. This class does everything a world should do.
*/
class World {
protected:
-
/**
* The line array.
* This array is created through 'new' in World::generate(), with an amount
@@ -113,6 +132,8 @@ protected:
*/
void singleDetect(Entity *e);
+
+ static void villageLogic(World *world);
/**
* Empties all entity vectors.
@@ -244,6 +265,8 @@ public:
std::vector<std::string > sTexLoc;
+ std::vector<Village>village;
+
/**
* NULLifies pointers and allocates necessary memory. This should be