diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | include/entities.h | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/include/common.h b/include/common.h index bfd0126..48026b0 100644 --- a/include/common.h +++ b/include/common.h @@ -100,7 +100,7 @@ extern unsigned int SCREEN_HEIGHT; * */ -#define HLINE 1 +#define HLINE 3 /** * A 'wrapper' for libc's srand(), as we hope to eventually have our own random number diff --git a/include/entities.h b/include/entities.h index 1e6d316..412ec42 100644 --- a/include/entities.h +++ b/include/entities.h @@ -43,7 +43,8 @@ enum BUILD_SUB{ HOUSE3 = 3, HOUSE4 = 4, FOUNTAIN = 5, - LAMP_POST = 6 + LAMP_POST = 6, + FIRE_PIT = 7 }; typedef struct { @@ -81,9 +82,12 @@ public: float velx; float vely; Color color; - int duration; + float duration; bool canMove; - Particles(float x, float y, float w, float h, float vx, float vy, Color c, int d){ + bool fountain; + bool gravity; + bool behind; + Particles(float x, float y, float w, float h, float vx, float vy, Color c, float d){ loc.x = (x); loc.y = (y); width = (w); @@ -94,16 +98,22 @@ public: color.green = (c.green); color.blue = (c.blue); duration = d; + fountain = false; + gravity = true; + behind = false; + } + ~Particles(){ + } - ~Particles(){} void draw(){ glColor3f(color.red,color.green,color.blue); glRectf(loc.x,loc.y,loc.x+width,loc.y+height); } bool kill(float delta){ duration -= delta; - if(duration <= 0) + if(duration <= 0.0f){ return true; + } else return false; } }; |