Fixes for firework effect.

This commit is contained in:
Fabian Schlenz 2019-10-02 06:20:39 +02:00
parent ac1f758b87
commit 54d357e6df

View File

@ -49,9 +49,9 @@ void FireworkEffectDot::draw() {
dim8_video( scale8( scale8( _color.g, ye), xe)), dim8_video( scale8( scale8( _color.g, ye), xe)),
dim8_video( scale8( scale8( _color.b, ye), xe))); dim8_video( scale8( scale8( _color.b, ye), xe)));
_window->addPixelColor(ix, iy, &c00); _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, &c10);
_window->addPixelColor(ix+1, iy+1, &c11); _window->addPixelColor(ix+1, iy-1, &c11);
} }
void FireworkEffectDot::move() { void FireworkEffectDot::move() {
@ -70,7 +70,7 @@ void FireworkEffectDot::move() {
} }
// Bounce if we hit the ground // 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) { if (type == FIREWORK_DOT_SPARK) {
show = 0; show = 0;
} else { } else {