From 54d357e6df8c21a07d4ad0b0bca3bd97735bbf48 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 2 Oct 2019 06:20:39 +0200 Subject: [PATCH] Fixes for firework effect. --- src/effect_firework.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/effect_firework.cpp b/src/effect_firework.cpp index 0810db6..ef37d2f 100644 --- a/src/effect_firework.cpp +++ b/src/effect_firework.cpp @@ -49,9 +49,9 @@ void FireworkEffectDot::draw() { dim8_video( scale8( scale8( _color.g, ye), xe)), dim8_video( scale8( scale8( _color.b, ye), xe))); _window->addPixelColor(ix, iy, &c00); - _window->addPixelColor(ix, iy+1, &c01); + _window->addPixelColor(ix, iy-1, &c01); _window->addPixelColor(ix+1, iy, &c10); - _window->addPixelColor(ix+1, iy+1, &c11); + _window->addPixelColor(ix+1, iy-1, &c11); } void FireworkEffectDot::move() { @@ -70,7 +70,7 @@ void FireworkEffectDot::move() { } // Bounce if we hit the ground - if (_xv < 0 && _y - _window->height < (-_yv)) { + if (_yv < 0 && _y - _window->height < (-_yv)) { if (type == FIREWORK_DOT_SPARK) { show = 0; } else {