mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Interpolate cutscene bars position
Cutscene bars will now smoothly fade in and out at above 30 FPS instead of at 30 FPS only.
This commit is contained in:
@@ -33,6 +33,7 @@ void Graphics::init()
|
||||
|
||||
showcutscenebars = false;
|
||||
cutscenebarspos = 0;
|
||||
oldcutscenebarspos = 0;
|
||||
notextoutline = false;
|
||||
|
||||
flipmode = false;
|
||||
@@ -837,10 +838,11 @@ void Graphics::drawpartimage( int t, int xp, int yp, int wp, int hp)
|
||||
|
||||
void Graphics::cutscenebars()
|
||||
{
|
||||
int usethispos = lerp(oldcutscenebarspos, cutscenebarspos);
|
||||
if (showcutscenebars)
|
||||
{
|
||||
FillRect(backBuffer, 0, 0, cutscenebarspos, 16, 0x000000);
|
||||
FillRect(backBuffer, 360-cutscenebarspos, 224, cutscenebarspos, 16, 0x000000);
|
||||
FillRect(backBuffer, 0, 0, usethispos, 16, 0x000000);
|
||||
FillRect(backBuffer, 360-usethispos, 224, usethispos, 16, 0x000000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -848,14 +850,15 @@ void Graphics::cutscenebars()
|
||||
if (cutscenebarspos > 0)
|
||||
{
|
||||
//draw
|
||||
FillRect(backBuffer, 0, 0, cutscenebarspos, 16, 0x000000);
|
||||
FillRect(backBuffer, 360-cutscenebarspos, 224, cutscenebarspos, 16, 0x000000);
|
||||
FillRect(backBuffer, 0, 0, usethispos, 16, 0x000000);
|
||||
FillRect(backBuffer, 360-usethispos, 224, usethispos, 16, 0x000000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::cutscenebarstimer()
|
||||
{
|
||||
oldcutscenebarspos = cutscenebarspos;
|
||||
if (showcutscenebars)
|
||||
{
|
||||
cutscenebarspos += 25;
|
||||
|
||||
Reference in New Issue
Block a user