mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Add linear interpolation of rendered entities
I've added a function Graphics::lerp() which simply interpolates between two values given a certain alpha value. It's just like drawing a straight line between two points. Also, Graphics now has an `alpha` attribute, and it is set on every deltatime update to be used in linear interpolation.
This commit is contained in:
@@ -543,6 +543,7 @@ int main(int argc, char *argv[])
|
||||
game.gameclock();
|
||||
}
|
||||
const float alpha = static_cast<float>(accumulator) / timesteplimit;
|
||||
graphics.alpha = alpha;
|
||||
|
||||
if (game.infocus)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user