aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h11
-rw-r--r--include/entities.h3
-rw-r--r--include/world.h9
3 files changed, 20 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h
index 038bf42..0a868df 100644
--- a/include/common.h
+++ b/include/common.h
@@ -14,6 +14,7 @@
#include <math.h>
#include <string>
#include <fstream>
+#include <thread>
#define GLEW_STATIC
#include <GL/glew.h>
@@ -34,7 +35,7 @@ typedef unsigned int uint;
* This flag lets the compiler know that we want to use shaders.
*/
-#define SHADERSs
+#define SHADERS
/**
* This structure contains a set of coordinates for ease of coding.
@@ -45,6 +46,12 @@ typedef struct {
float y;
} vec2;
+typedef struct {
+ float x;
+ float y;
+ float z;
+} vec3;
+
/**
* This structure contains two sets of coordinates for ray drawing.
*/
@@ -141,6 +148,8 @@ extern vec2 offset;
*/
extern unsigned int loops;
+extern GLuint shaderProgram;
+
/**
* This class contains a string for identification and a value. It can be used to
* save certain events for and decisions so that they can be recalled later.
diff --git a/include/entities.h b/include/entities.h
index 0f7ac9b..0fcc662 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -152,6 +152,7 @@ public:
GENDER gender;
Texturec *tex;
+ Texturec *ntex;
unsigned int randDialog;
@@ -169,7 +170,7 @@ public:
void baseLoad(char *);
};
-class Player : public Entity {
+class Player : public Entity{
public:
QuestHandler qh;
bool light = false;
diff --git a/include/world.h b/include/world.h
index cdcea3c..5021fbb 100644
--- a/include/world.h
+++ b/include/world.h
@@ -29,7 +29,7 @@
* Defines how many game ticks it takes for a day to elapse.
*/
-#define DAY_CYCLE 3000
+#define DAY_CYCLE 12000
/**
* The background type enum.
@@ -54,6 +54,11 @@ typedef enum {
RAIN /**< Rain (not implemented :) )*/
} WEATHER;
+
+typedef struct{
+ vec2 loc;
+ Color color;
+}Light;
/**
* The line structure.
* This structure is used to store the world's ground, stored in vertical
@@ -169,6 +174,7 @@ public:
std::vector<Entity *> entity;
std::vector<Object *> object;
std::vector<Particles *> particles;
+ std::vector<Light > light;
void addStructure(_TYPE t,BUILD_SUB sub,float x,float y,World *inside);
void addVillage(int bCount, int npcMin, int npcMax,_TYPE t,World *inside);
@@ -177,6 +183,7 @@ public:
void addNPC(float x,float y);
void addObject(ITEM_ID, bool, const char *, float, float);
void addParticle(float, float, float, float, float, float, Color color, int);
+ void addLight(vec2, Color);
NPC *getAvailableNPC(void);