1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Move gravity line color updating to gamelogic()

So it doesn't keep updating really quickly.
This commit is contained in:
Misa 2020-04-28 21:17:16 -07:00 committed by Ethan Lee
parent 40cedc8c94
commit 837ccfc735
2 changed files with 15 additions and 12 deletions

View file

@ -1447,18 +1447,6 @@ void Graphics::drawtrophytext()
void Graphics::drawentities()
{
//Update line colours!
if (linedelay <= 0)
{
linestate++;
if (linestate >= 10) linestate = 0;
linedelay = 2;
}
else
{
linedelay--;
}
point tpoint;
SDL_Rect drawRect;

View file

@ -1530,4 +1530,19 @@ void gamelogic()
{
graphics.updatebackground(map.background);
}
if (!game.blackout)
{
//Update line colours!
if (graphics.linedelay <= 0)
{
graphics.linestate++;
if (graphics.linestate >= 10) graphics.linestate = 0;
graphics.linedelay = 2;
}
else
{
graphics.linedelay--;
}
}
}