From 17beb406f2033ef522b0aebee07bae64317fa8fe Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 30 Apr 2022 10:13:23 -0700 Subject: til_fb: add draw flags for controlling texturability Just adds TIL_FB_DRAW_FLAG_TEXTURABLE so callers can granularly inhibit texturing if desired. --- src/modules/sparkler/particles.c | 4 ++-- src/modules/sparkler/rocket.c | 2 +- src/modules/sparkler/simple.c | 2 +- src/modules/sparkler/spark.c | 2 +- src/modules/sparkler/xplode.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/sparkler') diff --git a/src/modules/sparkler/particles.c b/src/modules/sparkler/particles.c index a567cea..2389e93 100644 --- a/src/modules/sparkler/particles.c +++ b/src/modules/sparkler/particles.c @@ -265,7 +265,7 @@ static void draw_line(til_fb_fragment_t *fragment, int x1, int y1, int x2, int y minor -= x_delta; } - til_fb_fragment_put_pixel_checked(fragment, x1, y1, 0xffffffff); + til_fb_fragment_put_pixel_checked(fragment, TIL_FB_DRAW_FLAG_TEXTURABLE, x1, y1, 0xffffffff); } } else { /* Y-major */ @@ -275,7 +275,7 @@ static void draw_line(til_fb_fragment_t *fragment, int x1, int y1, int x2, int y minor -= y_delta; } - til_fb_fragment_put_pixel_checked(fragment, x1, y1, 0xffffffff); + til_fb_fragment_put_pixel_checked(fragment, TIL_FB_DRAW_FLAG_TEXTURABLE, x1, y1, 0xffffffff); } } } diff --git a/src/modules/sparkler/rocket.c b/src/modules/sparkler/rocket.c index 3885304..0949d30 100644 --- a/src/modules/sparkler/rocket.c +++ b/src/modules/sparkler/rocket.c @@ -129,7 +129,7 @@ static void rocket_draw(particles_t *particles, const particles_conf_t *conf, pa /* kill off parts that wander off screen */ return; - til_fb_fragment_put_pixel_unchecked(f, x, y, 0xff0000); + til_fb_fragment_put_pixel_unchecked(f, 0, x, y, 0xff0000); } diff --git a/src/modules/sparkler/simple.c b/src/modules/sparkler/simple.c index 14c5d49..78e415b 100644 --- a/src/modules/sparkler/simple.c +++ b/src/modules/sparkler/simple.c @@ -104,7 +104,7 @@ static void simple_draw(particles_t *particles, const particles_conf_t *conf, pa /* immediately kill off stars that wander off screen */ return; - til_fb_fragment_put_pixel_unchecked(f, x, y, makergb(0xff, 0xff, 0xff, ((float)ctxt->longevity / ctxt->lifetime))); + til_fb_fragment_put_pixel_unchecked(f, 0, x, y, makergb(0xff, 0xff, 0xff, ((float)ctxt->longevity / ctxt->lifetime))); } diff --git a/src/modules/sparkler/spark.c b/src/modules/sparkler/spark.c index 8eff728..8627baa 100644 --- a/src/modules/sparkler/spark.c +++ b/src/modules/sparkler/spark.c @@ -54,7 +54,7 @@ static void spark_draw(particles_t *particles, const particles_conf_t *conf, par /* offscreen */ return; - til_fb_fragment_put_pixel_unchecked(f, x, y, makergb(0xff, 0xa0, 0x20, ((float)ctxt->longevity / ctxt->lifetime))); + til_fb_fragment_put_pixel_unchecked(f, 0, x, y, makergb(0xff, 0xa0, 0x20, ((float)ctxt->longevity / ctxt->lifetime))); } diff --git a/src/modules/sparkler/xplode.c b/src/modules/sparkler/xplode.c index 931ec83..31f56fd 100644 --- a/src/modules/sparkler/xplode.c +++ b/src/modules/sparkler/xplode.c @@ -72,7 +72,7 @@ static void xplode_draw(particles_t *particles, const particles_conf_t *conf, pa color = makergb(0xff, 0xff, 0x00, ((float)ctxt->longevity / ctxt->lifetime)); } - til_fb_fragment_put_pixel_unchecked(f, x, y, color); + til_fb_fragment_put_pixel_unchecked(f, 0, x, y, color); } -- cgit v1.2.3