uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 77edd1dbbf1d9a14208b452ec0b1d408c694155f
parent d80885ee22259319f5afec0cc06da0b23d1aa43a
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Thu,  4 May 2023 20:32:44 -0700

(screen) Renamed pixels attr to layer

Diffstat:
Msrc/devices/screen.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/devices/screen.c b/src/devices/screen.c @@ -34,16 +34,16 @@ screen_change(int x1, int y1, int x2, int y2) } static void -screen_fill(Uint8 *pixels, int x1, int y1, int x2, int y2, int color) +screen_fill(Uint8 *layer, int x1, int y1, int x2, int y2, int color) { int x, y, width = uxn_screen.width, height = uxn_screen.height; for(y = y1; y < y2 && y < height; y++) for(x = x1; x < x2 && x < width; x++) - pixels[x + y * width] = color; + layer[x + y * width] = color; } static void -screen_blit(Uint8 *pixels, Uint8 *ram, Uint16 addr, int x1, int y1, int color, int flipx, int flipy, int twobpp) +screen_blit(Uint8 *layer, Uint8 *ram, Uint16 addr, int x1, int y1, int color, int flipx, int flipy, int twobpp) { int v, h, width = uxn_screen.width, height = uxn_screen.height, opaque = (color % 5) || !color; for(v = 0; v < 8; v++) { @@ -54,7 +54,7 @@ screen_blit(Uint8 *pixels, Uint8 *ram, Uint16 addr, int x1, int y1, int color, i if(opaque || ch) { Uint16 x = x1 + (flipx ? 7 - h : h); if(x < width && y < height) - pixels[x + y * width] = blending[ch][color]; + layer[x + y * width] = blending[ch][color]; } } }