diff options
Diffstat (limited to 'src/modules/sparkler/rocket.c')
-rw-r--r-- | src/modules/sparkler/rocket.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/sparkler/rocket.c b/src/modules/sparkler/rocket.c index 6b9dc5e..ae628d3 100644 --- a/src/modules/sparkler/rocket.c +++ b/src/modules/sparkler/rocket.c @@ -1,6 +1,7 @@ #include <stdlib.h> -#include "draw.h" +#include "fb.h" +#include "helpers.h" #include "particle.h" #include "particles.h" @@ -122,10 +123,11 @@ static void rocket_draw(particles_t *particles, particle_t *p, int x, int y, fb_ { rocket_ctxt_t *ctxt = p->ctxt; - if (!draw_pixel(f, x, y, 0xff0000)) { + if (!should_draw_expire_if_oob(particles, p, x, y, f, &ctxt->longevity)) /* kill off parts that wander off screen */ - ctxt->longevity = 0; - } + return; + + fb_fragment_put_pixel_unchecked(f, x, y, 0xff0000); } |