]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fixes, bug finds
authorClyne Sullivan <tullivan99@gmail.com>
Wed, 11 Jan 2017 01:29:08 +0000 (20:29 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Wed, 11 Jan 2017 01:29:08 +0000 (20:29 -0500)
include/components.hpp
include/weather.hpp
src/particle.cpp
src/ui.cpp
src/world.cpp

index 8e245a74088058a42d01bcec0b1af4a364574e64..805e8b2f390a1e3e244bae98675826fae701692b 100644 (file)
@@ -269,11 +269,6 @@ struct Animate {
        }
 };
 
-//TODO
-struct Input {
-
-};
-
 /**
  * @struct Visible
  * @brief If an entity is visible we want to be able to draw it.
index f2f5fed1309736efc97cdc7ea0655dfaa64bca2b..08208715ecf24c1a7eac158e6fc39baf2d84221f 100644 (file)
@@ -50,15 +50,15 @@ public:
                                        offset.y + game::SCREEN_HEIGHT / 2 + 100),
                                        ParticleType::Drop, 3000, 3);
                        }
-                       break; // TODO
+                       break;
                case Weather::Snowy:
-                       if (newPartDelay++ == 4) {
+                       if (newPartDelay++ == 6) {
                                newPartDelay = 0;
-                               partSystem.add(vec2(offset.x - game::SCREEN_WIDTH / 2 + randGet() % game::SCREEN_WIDTH,
-                                       offset.y + game::SCREEN_HEIGHT / 2 + 100),
+                               partSystem.add(vec2(offset.x - game::SCREEN_WIDTH + randGet() % game::SCREEN_WIDTH * 2,
+                                       offset.y + game::SCREEN_HEIGHT / 2 + 50),
                                        ParticleType::Confetti, 6000, 0);
                        }
-                       break; // TODO
+                       break;
                default:
                        break;
                }
index a8fab9da30496982c145a1ebeb0763dc40e540a4..2d92409fc48c2eb14d09c471dc959f9889cc23c5 100644 (file)
@@ -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;
index 88a314cb01d507a14fb4d41baae4b46fd18997fd..06e5841585e513f2d4d556cbcf541fc5b26bc8cf 100644 (file)
@@ -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();
index c882256dbe16c5e4a30d375fd220a38e14491083..a82fc8b5f04b0971a6f256d077bcc6a96905c8ae 100644 (file)
@@ -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];