Move all-sides warp background update code to logic functions

Otherwise it'll go by really fast and rapidly pulsate. To the point
where it seems like it would be an epilepsy trigger, although I
wouldn't know anything about epilepsy other than that it's bad.
This commit is contained in:
Misa authored and Ethan Lee committed 2020-06-19 09:05:48 -04:00
1 parent 8184a392eb
commit 66ac035576
2 files changed
+14 -7

No files matched your search

+10 -7
View File
@@ -2005,13 +2005,6 @@ void Graphics::drawbackground( int t )
warpfcol = RGBflip(0xFF, 0xFF, 0xFF);
}
backoffset += 1;
if (backoffset >= 16)
{
backoffset -= 16;
warpskip = (warpskip + 1) % 2;
}
for (int i = 10 ; i >= 0; i--)
{
temp = (i << 4) + backoffset;
@@ -2212,6 +2205,16 @@ void Graphics::updatebackground(int t)
backgrounddrawn = true;
}
break;
case 5:
//Warp zone, central
backoffset += 1;
if (backoffset >= 16)
{
backoffset -= 16;
warpskip = (warpskip + 1) % 2;
}
break;
case 6:
//Final Starfield
for (int i = 0; i < 50; i++)
+4
View File
@@ -3618,6 +3618,10 @@ void editorlogic()
graphics.rcol=ed.getwarpbackground(ed.levx, ed.levy);
graphics.updatebackground(4);
break;
case 3:
graphics.rcol=ed.getwarpbackground(ed.levx, ed.levy);
graphics.updatebackground(5);
break;
default:
break;
}