From 85dc6db85b1baa810d1949eb11798f46ed37e8c5 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 16 Apr 2021 23:39:12 -0700 Subject: [PATCH] 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. --- desktop_version/src/Logic.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index b25df018..950047c0 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -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(); }