1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 22:18:30 +02:00

Axe screen_transition variable in favor of roomchange

When I added the two-frame delay fix, I didn't realize that Game had a
roomchange variable that was being used as a temporary variable here.
Now that it's fully spelled out and obvious (just look at the top of
gamelogic()), I realize that the variable exists and is being used, and
other readers will realize it's being used too - so now that I know it
exists, I can axe the screen_transition variable I added in favor of
using roomchange instead.
This commit is contained in:
Misa 2021-04-16 23:39:12 -07:00 committed by Misa Elizabeth Kai
parent 7a598f5811
commit 85dc6db85b

View File

@ -1130,8 +1130,6 @@ void gamelogic(void)
}
}
bool screen_transition = false;
if (!map.warpy && !map.towermode)
{
//Normal! Just change room
@ -1140,13 +1138,11 @@ void gamelogic(void)
{
obj.entities[player].yp -= 240;
GOTOROOM(game.roomx, game.roomy + 1);
screen_transition = true;
}
if (INBOUNDS_VEC(player, obj.entities) && game.door_up > -2 && obj.entities[player].yp < -2)
{
obj.entities[player].yp += 240;
GOTOROOM(game.roomx, game.roomy - 1);
screen_transition = true;
}
}
@ -1158,13 +1154,11 @@ void gamelogic(void)
{
obj.entities[player].xp += 320;
GOTOROOM(game.roomx - 1, game.roomy);
screen_transition = true;
}
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
{
obj.entities[player].xp -= 320;
GOTOROOM(game.roomx + 1, game.roomy);
screen_transition = true;
}
}
@ -1384,7 +1378,7 @@ void gamelogic(void)
}
}
if (screen_transition)
if (roomchange)
{
map.twoframedelayfix();
}