aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-02-23 22:29:12 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-02-23 22:29:12 -0500
commit8a2517c3068bb8fc7b22a01a2f75ab5537342063 (patch)
treed1a9973766afa8f09a6676155ff78908db4821ef /include
parentd1ee9a1b4b4d02b564b554a30314a97c1982da22 (diff)
parent0396f428411eb015f796643f9e7e38ca97f8fd42 (diff)
Merge branch 'master' of http://github.com/tcsullivan/gamedev
Diffstat (limited to 'include')
-rw-r--r--include/common.h2
-rw-r--r--include/ui.h8
-rw-r--r--include/world.h25
3 files changed, 34 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h
index 34260c9..a99e352 100644
--- a/include/common.h
+++ b/include/common.h
@@ -16,6 +16,8 @@
#include <string>
#include <fstream>
#include <thread>
+#include <mutex>
+#include <future>
#define GLEW_STATIC
#include <GL/glew.h>
diff --git a/include/ui.h b/include/ui.h
index 671a92c..6a81ff8 100644
--- a/include/ui.h
+++ b/include/ui.h
@@ -50,6 +50,12 @@ public:
std::vector<menuItem>items;
Menu *child;
Menu *parent;
+ ~Menu(){
+ child = NULL;
+ parent = NULL;
+ delete child;
+ delete parent;
+ }
void gotoChild();
void gotoParent();
@@ -104,6 +110,7 @@ namespace ui {
extern unsigned char dialogOptChosen;
extern bool dialogBoxExists;
extern bool dialogImportant;
+ extern bool dialogPassive;
extern unsigned int textWrapLimit;
@@ -148,6 +155,7 @@ namespace ui {
*/
void importantText(const char *text,...);
+ void passiveImportantText(int duration,const char *text,...);
/*
* Draw various UI elements (dialogBox, player health)
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