Remove allowspecial, replace with opaqueness check

When I added the over-30-FPS mode, I kept running into this problem
where the special images of text boxes would render during the
deltaframes of fade-in/fade-out animations, even though they shouldn't
be. So I simply added a flag to the text box that enables drawing these
special images.

However, this doesn't solve the problem fully, and there's still a small
chance that a special-image text box could draw another special image
during its deltaframes. It's really rare and you have to have your
deltaframe luck juuuuuust right (or you could use libTAS, probably), but
it helps to be in 40% slowmode and have a high refresh rate (which, if
it isn't a multiple of 30, you should disable VSync, too, in order to
not have a low framerate).

So instead, special images will only be drawn if the text box has fully
faded in completely. That solves the issue completely.
This commit is contained in:
Misa
2020-08-04 20:42:43 -07:00
committed by Ethan Lee
parent 2710ebeff9
commit 43cf3c4f19
5 changed files with 40 additions and 40 deletions

View File

@@ -2178,11 +2178,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 180, 165, 165, 255, true);
graphics.createtextbox("", -1, 180, 165, 165, 255);
}
else
{
graphics.createtextbox("", -1, 12, 165, 165, 255, true);
graphics.createtextbox("", -1, 12, 165, 165, 255);
}
//graphics.addline(" Level Complete! ");
graphics.addline(" ");
@@ -2202,11 +2202,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 104, 175,174,174, true);
graphics.createtextbox("", -1, 104, 175,174,174);
}
else
{
graphics.createtextbox("", -1, 64+8+16, 175,174,174, true);
graphics.createtextbox("", -1, 64+8+16, 175,174,174);
}
graphics.addline(" You have rescued ");
graphics.addline(" a crew member! ");
@@ -2295,11 +2295,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 180, 165, 165, 255, true);
graphics.createtextbox("", -1, 180, 165, 165, 255);
}
else
{
graphics.createtextbox("", -1, 12, 165, 165, 255, true);
graphics.createtextbox("", -1, 12, 165, 165, 255);
}
//graphics.addline(" Level Complete! ");
graphics.addline(" ");
@@ -2319,11 +2319,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 104, 174,175,174, true);
graphics.createtextbox("", -1, 104, 174,175,174);
}
else
{
graphics.createtextbox("", -1, 64+8+16, 174,175,174, true);
graphics.createtextbox("", -1, 64+8+16, 174,175,174);
}
graphics.addline(" You have rescued ");
graphics.addline(" a crew member! ");
@@ -2411,11 +2411,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 180, 165, 165, 255, true);
graphics.createtextbox("", -1, 180, 165, 165, 255);
}
else
{
graphics.createtextbox("", -1, 12, 165, 165, 255, true);
graphics.createtextbox("", -1, 12, 165, 165, 255);
}
//graphics.addline(" Level Complete! ");
graphics.addline(" ");
@@ -2435,11 +2435,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 104, 174,174,175, true);
graphics.createtextbox("", -1, 104, 174,174,175);
}
else
{
graphics.createtextbox("", -1, 64+8+16, 174,174,175, true);
graphics.createtextbox("", -1, 64+8+16, 174,174,175);
}
graphics.addline(" You have rescued ");
graphics.addline(" a crew member! ");
@@ -2528,11 +2528,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 180, 165, 165, 255, true);
graphics.createtextbox("", -1, 180, 165, 165, 255);
}
else
{
graphics.createtextbox("", -1, 12, 165, 165, 255, true);
graphics.createtextbox("", -1, 12, 165, 165, 255);
}
//graphics.addline(" Level Complete! ");
graphics.addline(" ");
@@ -2552,11 +2552,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 104, 175,175,174, true);
graphics.createtextbox("", -1, 104, 175,175,174);
}
else
{
graphics.createtextbox("", -1, 64+8+16, 175,175,174, true);
graphics.createtextbox("", -1, 64+8+16, 175,175,174);
}
graphics.addline(" You have rescued ");
graphics.addline(" a crew member! ");
@@ -2663,11 +2663,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 180, 165, 165, 255, true);
graphics.createtextbox("", -1, 180, 165, 165, 255);
}
else
{
graphics.createtextbox("", -1, 12, 165, 165, 255, true);
graphics.createtextbox("", -1, 12, 165, 165, 255);
}
//graphics.addline(" Level Complete! ");
graphics.addline(" ");
@@ -2687,11 +2687,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 104, 175,174,175, true);
graphics.createtextbox("", -1, 104, 175,174,175);
}
else
{
graphics.createtextbox("", -1, 64+8+16, 175,174,175, true);
graphics.createtextbox("", -1, 64+8+16, 175,174,175);
}
graphics.addline(" You have rescued ");
graphics.addline(" a crew member! ");
@@ -2959,11 +2959,11 @@ void Game::updatestate()
if (graphics.flipmode)
{
graphics.createtextbox("", -1, 180, 164, 165, 255, true);
graphics.createtextbox("", -1, 180, 164, 165, 255);
}
else
{
graphics.createtextbox("", -1, 12, 164, 165, 255, true);
graphics.createtextbox("", -1, 12, 164, 165, 255);
}
graphics.addline(" ");
graphics.addline("");