uxn

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

commit 86c46be310032bc6588bdc813fae1bc235fac60b
parent efd70d34be20e08ad7b5582a97c129798af038cc
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun, 12 Nov 2023 17:05:46 -0800

(Screen) Removed unused variable

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

diff --git a/src/devices/screen.c b/src/devices/screen.c @@ -64,11 +64,10 @@ static void screen_2bpp(Uint8 *layer, Uint8 *addr, Uint16 x1, Uint16 y1, Uint16 color, int fx, int fy) { int row, w = uxn_screen.width, h = uxn_screen.height, opaque = (color % 5); - Uint8 *ch1 = addr, *ch2 = ch1 + 8; Uint16 y, ymod = (fy < 0 ? 7 : 0), ymax = y1 + ymod + fy * 8; Uint16 x, xmod = (fx > 0 ? 7 : 0), xmax = x1 + xmod - fx * 8; for(y = y1 + ymod; y != ymax; y += fy) { - int c = *ch1++ | (*ch2++ << 8); + int c = *addr++ | (*(addr + 7) << 8); if(y < h) for(x = x1 + xmod, row = y * w; x != xmax; x -= fx, c >>= 1) { Uint8 ch = (c & 1) | ((c >> 7) & 2); @@ -82,11 +81,10 @@ static void screen_1bpp(Uint8 *layer, Uint8 *addr, Uint16 x1, Uint16 y1, Uint16 color, int fx, int fy) { int row, w = uxn_screen.width, h = uxn_screen.height, opaque = (color % 5); - Uint8 *ch1 = addr; Uint16 y, ymod = (fy < 0 ? 7 : 0), ymax = y1 + ymod + fy * 8; Uint16 x, xmod = (fx > 0 ? 7 : 0), xmax = x1 + xmod - fx * 8; for(y = y1 + ymod; y != ymax; y += fy) { - int c = *ch1++; + int c = *addr++; if(y < h) for(x = x1 + xmod, row = y * w; x != xmax; x -= fx, c >>= 1) { Uint8 ch = c & 1;