From 1c1bcb0cdc9699f451c0f2fa9aec60577eff4b63 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 21 Jul 2018 21:26:14 -0400 Subject: [PATCH] fix stasis wall not having any blob mode effects --- src/graphics/Renderer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index c8c354fc1..57bec3db8 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -748,7 +748,7 @@ void Renderer::DrawWalls() if (wt == WL_EWALL || wt == WL_STASIS) { bool reverse = wt == WL_STASIS; - if ((powered>0) ^ reverse) + if ((powered > 0) ^ reverse) { for (int j = 0; j < CELL; j++) for (int i =0; i < CELL; i++) @@ -869,21 +869,22 @@ void Renderer::DrawWalls() switch (sim->wtypes[wt].drawstyle) { case 0: - if (wt == WL_EWALL) + if (wt == WL_EWALL || wt == WL_STASIS) { - if (powered) + bool reverse = wt == WL_STASIS; + if ((powered>0) ^ reverse) { for (int j = 0; j < CELL; j++) for (int i =0; i < CELL; i++) if (i&j&1) - drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); } else { for (int j = 0; j < CELL; j++) for (int i = 0; i < CELL; i++) if (!(i&j&1)) - drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); } } else if (wt == WL_WALLELEC)