Permalink
Browse files

fix stasis wall not having any blob mode effects

  • Loading branch information...
jacob1 committed Jul 22, 2018
1 parent 92244f7 commit 1c1bcb0cdc9699f451c0f2fa9aec60577eff4b63
Showing with 6 additions and 5 deletions.
  1. +6 −5 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)

0 comments on commit 1c1bcb0

Please sign in to comment.