mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Interpolate left-moving star background
So that it looks all smooth and such.
This commit is contained in:
parent
55ae3c73a9
commit
92cd695859
1 changed files with 4 additions and 2 deletions
|
@ -1805,13 +1805,15 @@ void Graphics::drawbackground( int t )
|
||||||
{
|
{
|
||||||
stars[i].w = 2;
|
stars[i].w = 2;
|
||||||
stars[i].h = 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)
|
if (starsspeed[i] <= 6)
|
||||||
{
|
{
|
||||||
FillRect(backBuffer,stars[i], getRGB(0x22,0x22,0x22));
|
FillRect(backBuffer,star_rect, getRGB(0x22,0x22,0x22));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FillRect(backBuffer,stars[i], getRGB(0x55,0x55,0x55));
|
FillRect(backBuffer,star_rect, getRGB(0x55,0x55,0x55));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue