commit 24dbc7d5f80cea64b327d326a85e7040a746421d
parent daa421c25902dd7d3b550303cf6576a3f229a8f1
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Tue, 11 Apr 2023 10:42:32 -0700
(screen) Rename screen_clear to screen_fill
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/devices/screen.c b/src/devices/screen.c
@@ -93,17 +93,17 @@ screen_resize(UxnScreen *p, Uint16 width, Uint16 height)
if(bg && fg && pixels) {
p->width = width;
p->height = height;
- screen_clear(p, &p->bg);
- screen_clear(p, &p->fg);
+ screen_fill(p, &p->bg, 0);
+ screen_fill(p, &p->fg, 0);
}
}
void
-screen_clear(UxnScreen *p, Layer *layer)
+screen_fill(UxnScreen *p, Layer *layer, Uint8 color)
{
Uint32 i, size = p->width * p->height;
for(i = 0; i < size; i++)
- layer->pixels[i] = 0x00;
+ layer->pixels[i] = color;
layer->changed = 1;
}
diff --git a/src/devices/screen.h b/src/devices/screen.h
@@ -27,7 +27,7 @@ extern UxnScreen uxn_screen;
void screen_palette(UxnScreen *p, Uint8 *addr);
void screen_resize(UxnScreen *p, Uint16 width, Uint16 height);
-void screen_clear(UxnScreen *p, Layer *layer);
+void screen_fill(UxnScreen *p, Layer *layer, Uint8 color);
void screen_redraw(UxnScreen *p);
void screen_mono(UxnScreen *p);