mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-04 18:29:41 +01: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:
parent
7a598f5811
commit
85dc6db85b
1 changed files with 1 additions and 7 deletions
|
@ -1130,8 +1130,6 @@ void gamelogic(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool screen_transition = false;
|
|
||||||
|
|
||||||
if (!map.warpy && !map.towermode)
|
if (!map.warpy && !map.towermode)
|
||||||
{
|
{
|
||||||
//Normal! Just change room
|
//Normal! Just change room
|
||||||
|
@ -1140,13 +1138,11 @@ void gamelogic(void)
|
||||||
{
|
{
|
||||||
obj.entities[player].yp -= 240;
|
obj.entities[player].yp -= 240;
|
||||||
GOTOROOM(game.roomx, game.roomy + 1);
|
GOTOROOM(game.roomx, game.roomy + 1);
|
||||||
screen_transition = true;
|
|
||||||
}
|
}
|
||||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_up > -2 && obj.entities[player].yp < -2)
|
if (INBOUNDS_VEC(player, obj.entities) && game.door_up > -2 && obj.entities[player].yp < -2)
|
||||||
{
|
{
|
||||||
obj.entities[player].yp += 240;
|
obj.entities[player].yp += 240;
|
||||||
GOTOROOM(game.roomx, game.roomy - 1);
|
GOTOROOM(game.roomx, game.roomy - 1);
|
||||||
screen_transition = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,13 +1154,11 @@ void gamelogic(void)
|
||||||
{
|
{
|
||||||
obj.entities[player].xp += 320;
|
obj.entities[player].xp += 320;
|
||||||
GOTOROOM(game.roomx - 1, game.roomy);
|
GOTOROOM(game.roomx - 1, game.roomy);
|
||||||
screen_transition = true;
|
|
||||||
}
|
}
|
||||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
|
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
|
||||||
{
|
{
|
||||||
obj.entities[player].xp -= 320;
|
obj.entities[player].xp -= 320;
|
||||||
GOTOROOM(game.roomx + 1, game.roomy);
|
GOTOROOM(game.roomx + 1, game.roomy);
|
||||||
screen_transition = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1384,7 +1378,7 @@ void gamelogic(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (screen_transition)
|
if (roomchange)
|
||||||
{
|
{
|
||||||
map.twoframedelayfix();
|
map.twoframedelayfix();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue