diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-05 08:43:14 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-05 08:43:14 -0400 |
commit | 88f6f81f7742f389eb3c68593b91ea639e54ab3b (patch) | |
tree | 9621cd5e8814b4d82b0d179437bb9788ed608b9d /src/entities.cpp | |
parent | e5f462d5aad10cead4fee310792d8d893d1cd918 (diff) |
Added house texture
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index 85ba538..42f93c8 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -32,6 +32,8 @@ void Entity::draw(void){ //draws the entities glColor3ub(255,255,0); glRectf(loc.x+width/3,loc.y+height,loc.x+width*2/3,loc.y+height+width/3); } + }if(type==STRUCTURET){ + glColor3ub(255,255,255); } if(left){ glScalef(-1.0f,1.0f,1.0f); @@ -150,6 +152,7 @@ Structures::Structures(){ //sets the structure type speed = 0; alive = true; near = false; + texture = loadTexture("assets/house1.png"); } unsigned int Structures::spawn(_TYPE t, float x, float y){ //spawns a structure based off of type and coords @@ -162,8 +165,8 @@ unsigned int Structures::spawn(_TYPE t, float x, float y){ //spawns a structure //spawns between 1 and 5 villagers around the village if(type == STRUCTURET){ loc.y=100; - width = 20 * HLINE; - height = 20 * HLINE; + width = 30 * HLINE; + height = 30 * HLINE; int tempN = (getRand() % 5 + 2); //amount of villagers that will spawn for(int i=0;i<tempN;i++){ |