diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-01-13 07:53:55 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-01-13 07:53:55 -0500 |
commit | 5ec498c3e583a8fe18fdc9fec683df8c2541b28c (patch) | |
tree | 5e01d33ac4b488e11a503cee835d5e53bd4360bc /include | |
parent | 23a4b0cc3ab09d58127a73b12c43aff37e5056ef (diff) | |
parent | 9765c6303b763a60a2d917fc3c334b30e0fbbcfa (diff) |
Ass
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | include/entities.h | 14 | ||||
-rw-r--r-- | include/world.h | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/include/common.h b/include/common.h index 22ecb22..be32019 100644 --- a/include/common.h +++ b/include/common.h @@ -203,4 +203,6 @@ unsigned int millis(void); int getdir(const char *dir, std::vector<std::string> &files); void strVectorSortAlpha(std::vector<std::string> *v); +extern void *NULLPTR; + #endif // COMMON_H diff --git a/include/entities.h b/include/entities.h index fe0d014..8ef7c90 100644 --- a/include/entities.h +++ b/include/entities.h @@ -82,11 +82,11 @@ public: float velx; float vely; Color color; - int duration; + float duration; bool canMove; bool fountain; bool gravity; - Particles(float x, float y, float w, float h, float vx, float vy, Color c, int d){ + 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); @@ -100,14 +100,16 @@ public: fountain = false; gravity = true; } - ~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; @@ -204,15 +206,13 @@ public: typedef struct { EntitySavePacket esp; - World *inWorld; - World *inside; BUILD_SUB bsubtype; } __attribute__ ((packed)) StructuresSavePacket; class Structures : public Entity{ public: World *inWorld; - World *inside; + World **inside; BUILD_SUB bsubtype; Structures(); diff --git a/include/world.h b/include/world.h index 7f22cba..27936f7 100644 --- a/include/world.h +++ b/include/world.h @@ -176,8 +176,8 @@ public: std::vector<Particles *> particles; std::vector<Light > light; - void addStructure(BUILD_SUB sub,float x,float y,World *inside); - void addVillage(int x, int y, int bCount, int npcMin, int npcMax,World *inside); + void addStructure(BUILD_SUB sub,float x,float y,World **inside);//,World **outside); + void addVillage(int bCount, int npcMin, int npcMax,World **inside); void addMob(int t,float x,float y); void addMob(int t,float x,float y,void (*hey)(Mob *)); void addNPC(float x,float y); |