aboutsummaryrefslogtreecommitdiffstats
path: root/include/world.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-11-20 08:50:57 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-11-20 08:50:57 -0500
commit6be7b11513cdedc17358da314c6e5a5630be00c1 (patch)
tree67ecbdfb7f2f31c87707959404cced383fb3a0b6 /include/world.h
parent5598e4d1f52224f2d075dc318868e284b2f20a78 (diff)
background draw re-do
Diffstat (limited to 'include/world.h')
-rw-r--r--include/world.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/include/world.h b/include/world.h
index 8f4ea51..1a96252 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,16 +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 removeObjet(Object);
void update(Player *p,unsigned int delta);
@@ -107,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.
*/