aboutsummaryrefslogtreecommitdiffstats
path: root/src/items.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-06-16 08:49:43 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-06-16 08:49:43 -0400
commit18377e3c0efe9359c341c0c330f6de1697afb788 (patch)
tree3ee15915820fa10832dfb17a0cf63382b476de58 /src/items.cpp
parent1b49be1c9c8e8887564dbb0aa69519bc538d81e7 (diff)
Changes
Diffstat (limited to 'src/items.cpp')
-rw-r--r--src/items.cpp28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/items.cpp b/src/items.cpp
index eacf5a9..f0b2f84 100644
--- a/src/items.cpp
+++ b/src/items.cpp
@@ -74,28 +74,9 @@ int Sword::useItem()
else
e->takeHit(damage, 600);
- static GLuint sColor = Texture::genColor(Color(255,0,0));
- GLfloat t[] = {0.0, 0.0,
- 1.0, 1.0};
- GLfloat v[] = {hitbox.start.x, hitbox.start.y, 1.0,
- hitbox.end.x, hitbox.end.y, 1.0};
-
-
- glBindTexture(GL_TEXTURE_2D, sColor);
- glUseProgram(worldShader);
- glEnableVertexAttribArray(worldShader_attribute_coord);
- glEnableVertexAttribArray(worldShader_attribute_tex);
-
- glVertexAttribPointer(worldShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 0, v);
- glVertexAttribPointer(worldShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 0, t);
- glDrawArrays(GL_LINES, 0, 2);
-
- glDisableVertexAttribArray(worldShader_attribute_coord);
- glDisableVertexAttribArray(worldShader_attribute_tex);
- glUseProgram(0);
// add some blood
- // for(int r = 0; r < (rand()%5);r++)
- // currentWorld->addParticle(rand()%game::HLINE*3 + e->loc.x - .05f,e->loc.y + e->height*.5, game::HLINE,game::HLINE, -(rand()%10)*.01,((rand()%4)*.001-.002), {(rand()%75+10)/100.0f,0,0}, 10000);
+ //for(int r = 0; r < (rand()%5);r++)
+ //currentWorld->addParticle(rand()%game::HLINE*3 + e->loc.x - .05f,e->loc.y + e->height*.5, game::HLINE,game::HLINE, -(rand()%10)*.01,((rand()%4)*.001-.002), {(rand()%75+10)/100.0f,0,0}, 10000);
}
}
@@ -160,7 +141,10 @@ int Food::useItem()
int ItemLight::useItem()
{
- std::cout << "fsdfsdf" << std::endl;
+ if (player->light.radius > 0)
+ player->light.radius = 0;
+ else
+ player->light.radius = 500;
return 0;
}