1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Switch flipme script command to use flipme textbox attribute

This is why the text box attribute was named flipme, after all.

You may have noticed that the flipme command inverts textflipme instead
of simply setting it to true. Well, that's because it should be the same
as the previous behavior, which was essentially to invert it instead of
setting it to true - i.e. calling flipme twice would keep the original
text box position in Flip Mode, which means it would be upside-down
(this is a lot of flipping to keep track of...) - because flipme added
to texty in-place instead of simply assigning to it. (It did the
calculation incorrectly in 2.2 and previous, but I digress.)

Similarly, textflipme is not reset in hardreset(), because none of the
other script text box variables are reset either.
This commit is contained in:
Misa 2021-03-19 20:08:41 -07:00 committed by Ethan Lee
parent 6939563e6d
commit db9ee0d8e3
2 changed files with 5 additions and 2 deletions

View file

@ -30,6 +30,7 @@ scriptclass::scriptclass(void)
r = 0;
textx = 0;
texty = 0;
textflipme = false;
}
void scriptclass::clearcustom(void)
@ -624,7 +625,7 @@ void scriptclass::run(void)
}
else if (words[0] == "flipme")
{
if(graphics.flipmode) texty += 2*(120 - texty) - 8*(txt.size()+2);
textflipme = !textflipme;
}
else if (words[0] == "speak_active" || words[0] == "speak")
{
@ -634,7 +635,8 @@ void scriptclass::run(void)
{
txt.resize(1);
}
graphics.createtextbox(txt[0], textx, texty, r, g, b);
graphics.createtextboxreal(txt[0], textx, texty, r, g, b, textflipme);
textflipme = false;
if ((int) txt.size() > 1)
{
for (i = 1; i < (int) txt.size(); i++)

View file

@ -60,6 +60,7 @@ public:
int textx;
int texty;
int r,g,b;
bool textflipme;
//Misc
int i, j, k;