aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/particle.cpp2
-rw-r--r--src/render.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/particle.cpp b/src/particle.cpp
index 198387c..6eeec33 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -89,6 +89,7 @@ void ParticleSystem::update(entityx::EntityManager &en, entityx::EventManager &e
for (unsigned int i = 0; i < parts.size(); i++) {
auto& p = parts[i];
+ auto& vel = p.velocity;
// update timers
if (p.timeLeft > 0)
@@ -97,7 +98,6 @@ void ParticleSystem::update(entityx::EntityManager &en, entityx::EventManager &e
continue;
// update movement
- auto& vel = p.velocity;
switch (p.type) {
case ParticleType::Drop:
if (vel.y > -.6)
diff --git a/src/render.cpp b/src/render.cpp
index a63d63a..5cbd11e 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -79,7 +79,7 @@ void init(void)
+ reinterpret_cast<const char *>(glewGetErrorString(glewError)));
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); // anti-aliasing
- SDL_GL_SetSwapInterval(0); // v-sync
+ SDL_GL_SetSwapInterval(1); // v-sync
SDL_ShowCursor(SDL_DISABLE); // hide the cursor
glViewport(0, 0, game::SCREEN_WIDTH, game::SCREEN_HEIGHT); // pixel coordinates
glEnable(GL_BLEND); // alpha enabling