aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Texture.h13
-rw-r--r--include/world.h33
2 files changed, 32 insertions, 14 deletions
diff --git a/include/Texture.h b/include/Texture.h
index fdb294d..81a743e 100644
--- a/include/Texture.h
+++ b/include/Texture.h
@@ -3,23 +3,22 @@
#include <common.h>
+#define DEBUG
+
namespace Texture{
GLuint loadTexture(const char *fileName);
}
class Texturec{
+private:
+ GLuint *image;
+ int texState;
public:
Texturec(uint amt, ...);
void bindNext();
void bindPrev();
void bind(int);
void walk();
-
- GLuint *image;
- int texState;
-private:
-
-
};
-#endif //TEXTURE_H \ No newline at end of file
+#endif //TEXTURE_H
diff --git a/include/world.h b/include/world.h
index a32c7f2..4c82b2c 100644
--- a/include/world.h
+++ b/include/world.h
@@ -9,6 +9,18 @@
// or not calculated at all, so GEN_INC is also used to decrease 'lineCount' in functions like draw()
// and detect().
+#define DAY_CYCLE 3000
+
+typedef enum {
+ BG_FOREST
+} WORLD_BG_TYPE;
+
+typedef enum {
+ SUNNY = 0,
+ DARK,
+ RAIN
+} WEATHER;
+
struct line_t {
bool gs;
float y,gh[2];
@@ -56,6 +68,14 @@ protected:
unsigned int lineCount;
+ /*
+ * Contains the background image layers (including the background image).
+ */
+
+ vec2 *star;
+
+ Texturec *bgTex;
+
public:
/*
@@ -78,18 +98,11 @@ public:
std::vector<Entity *> entity;
std::vector<Object *> object;
- //template<class T>
- //void getEntityLocation(std::vector<T*>&, unsigned int);
-
void addStructure(_TYPE t,float x,float y,World *outside,World *inside);
void addMob(int t,float x,float y);
void addMob(int t,float x,float y,void (*hey)());
void addNPC(float x,float y);
- void addObject(int, float, float);
void addObject(int, bool, char*, float, float);
-
-
- //void removeObjet(Object);
void update(Player *p,unsigned int delta);
@@ -109,6 +122,12 @@ public:
void generateFunc(unsigned int width,float(*func)(float));
/*
+ * Adds images to using for the background.
+ */
+
+ void setBackground(WORLD_BG_TYPE bgt);
+
+ /*
* Looks for the furthest back layer in this world and adds a new layer of width `width` behind it.
*/