1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00

Interpolate left-moving star background

So that it looks all smooth and such.
This commit is contained in:
Misa 2020-04-28 19:30:37 -07:00 committed by Ethan Lee
parent 55ae3c73a9
commit 92cd695859

View File

@ -1805,13 +1805,15 @@ void Graphics::drawbackground( int t )
{
stars[i].w = 2;
stars[i].h = 2;
SDL_Rect star_rect = stars[i];
star_rect.x = lerp(star_rect.x + starsspeed[i], star_rect.x);
if (starsspeed[i] <= 6)
{
FillRect(backBuffer,stars[i], getRGB(0x22,0x22,0x22));
FillRect(backBuffer,star_rect, getRGB(0x22,0x22,0x22));
}
else
{
FillRect(backBuffer,stars[i], getRGB(0x55,0x55,0x55));
FillRect(backBuffer,star_rect, getRGB(0x55,0x55,0x55));
}
}
break;