aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-01-10 20:29:08 -0500
committerClyne Sullivan <tullivan99@gmail.com>2017-01-10 20:29:08 -0500
commitc6651145a4a6e6611b585c1a87c127f38751db4b (patch)
treedec1526556b612cc1a617ea1c2a80cd6f094c628 /src
parentfbd59263b52a42f85453ae918f8d2ab5817bd470 (diff)
fixes, bug finds
Diffstat (limited to 'src')
-rw-r--r--src/particle.cpp5
-rw-r--r--src/ui.cpp2
-rw-r--r--src/world.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/particle.cpp b/src/particle.cpp
index a8fab9d..2d92409 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -84,12 +84,11 @@ void ParticleSystem::update(entityx::EntityManager &en, entityx::EventManager &e
{
(void)en;
(void)ev;
- (void)dt; // TODO use for time to die
auto& worldSystem = *game::engine.getSystem<WorldSystem>();
- for (auto part = std::begin(parts); part != std::end(parts); part++) {
- auto& p = *part;
+ for (unsigned int i = 0; i < parts.size(); i++) {
+ auto& p = parts[i];
// update timers
p.timeLeft -= dt;
diff --git a/src/ui.cpp b/src/ui.cpp
index 88a314c..06e5841 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -309,7 +309,7 @@ namespace ui {
glVertexAttribPointer(Render::textShader.tex, 2, GL_FLOAT, GL_FALSE, 0, tex_coord);
glDrawArrays(GL_TRIANGLES, 0, 6);
- glUniform4f(Render::textShader.uniform[WU_tex_color], 1.0, 1.0, 1.0, 1.0);
+ glUniform4f(Render::textShader.uniform[WU_tex_color], 1.0, 1.0, 1.0, 1.0); // TODO seg faults
Render::textShader.disable();
Render::textShader.unuse();
diff --git a/src/world.cpp b/src/world.cpp
index c882256..a82fc8b 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -763,7 +763,7 @@ void WorldSystem::render(void)
//glUniform4f(Render::worldShader.uniform[WU_tex_color], 1.0, 1.0, 1.0, 1.3 - static_cast<float>(alpha) / 255.0f);
//makeWorldDrawingSimplerEvenThoughAndyDoesntThinkWeCanMakeItIntoFunctions(0, fron_tex_coord, tex_coord, 6);
- // TODO make stars dynamic
+ // TODO make stars dynamic (make them particles??)
/*static GLuint starTex = Texture::loadTexture("assets/style/classic/bg/star.png");
const static float stardim = 24;
GLfloat star_coord[star.size() * 5 * 6 + 1];